Skip to content

Commit 9248363

Browse files
committed
[GR-65148] Deploy the new unchained standalones
1 parent 4b8b2b0 commit 9248363

File tree

8 files changed

+67
-53
lines changed

8 files changed

+67
-53
lines changed

sdk/mx.sdk/mx_sdk_vm_ng.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1077,6 +1077,8 @@ def __init__(self, suite, name=None, deps=None, excludedLibs=None, platformDepen
10771077
}
10781078
self.standalone_dir_dist = standalone_dir_dist
10791079
maven = { 'groupId': 'org.graalvm', 'tag': 'standalone' }
1080+
assert theLicense is None, "the 'license' attribute is ignored for DeliverableStandaloneArchive"
1081+
theLicense = ['GFTC' if is_enterprise() else 'UPL']
10801082
super().__init__(suite, name=dist_name, deps=[], layout=layout, path=None, theLicense=theLicense, platformDependent=True, path_substitutions=path_substitutions, string_substitutions=string_substitutions, maven=maven, defaultBuild=defaultBuild)
10811083
self.buildDependencies.append(standalone_dir_dist)
10821084

@@ -1085,7 +1087,6 @@ def resolveDeps(self):
10851087
resolved = [self.standalone_dir_dist]
10861088
self._resolveDepsHelper(resolved)
10871089
self.standalone_dir_dist = resolved[0]
1088-
self.theLicense = self.standalone_dir_dist.theLicense
10891090

10901091
def get_artifact_metadata(self):
10911092
return {'edition': 'ee' if is_enterprise() else 'ce', 'type': 'standalone', 'project': 'graal'}

vm/ci/ci_common/common.jsonnet

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,13 @@ local devkits = graal_common.devkits;
149149
svm_common: graal_common.deps.svm,
150150
svm_common_windows_amd64(jdk): self.svm_common + graal_common.devkits["windows-jdk" + jdk],
151151

152-
maven_deploy_sdk: ['--suite', 'sdk', 'maven-deploy', '--validate', 'none', '--all-distribution-types', '--with-suite-revisions-metadata'],
152+
maven_deploy_sdk: ['--suite', 'sdk', 'maven-deploy', '--validate', 'none', '--all-distribution-types', '--with-suite-revisions-metadata'],
153153
deploy_artifacts_sdk(os, base_dist_name=null): (if base_dist_name != null then ['--base-dist-name=' + base_dist_name] else []) + ['--suite', 'sdk', 'deploy-artifacts', '--uploader', if os == 'windows' then 'artifact_uploader.cmd' else 'artifact_uploader'],
154154

155+
maven_deploy_all_suites: ['maven-deploy', '--all-suites', '--validate', 'none', '--all-distribution-types', '--with-suite-revisions-metadata'],
156+
deploy_artifacts_all_suites(os): ['deploy-artifacts', '--all-suites', '--uploader', if os == 'windows' then 'artifact_uploader.cmd' else 'artifact_uploader'],
157+
158+
# All 3 used in vm.jsonnet
155159
maven_deploy_sdk_base: self.maven_deploy_sdk + ['--tags', 'graalvm', vm.binaries_repository],
156160
artifact_deploy_sdk_base(os, base_dist_name): self.deploy_artifacts_sdk(os, base_dist_name) + ['--tags', 'graalvm'],
157161
deploy_sdk_base(os, base_dist_name=null): [self.mx_vm_common + vm.vm_profiles + self.maven_deploy_sdk_base, self.mx_vm_common + vm.vm_profiles + self.artifact_deploy_sdk_base(os, base_dist_name)],
@@ -160,16 +164,16 @@ local devkits = graal_common.devkits;
160164
artifact_deploy_sdk_base_dry_run(os, base_dist_name): self.deploy_artifacts_sdk(os, base_dist_name) + ['--tags', 'graalvm', '--dry-run'],
161165
deploy_sdk_base_dry_run(os, base_dist_name=null): [self.mx_vm_common + vm.vm_profiles + self.maven_deploy_sdk_base_dry_run, self.mx_vm_common + vm.vm_profiles + self.artifact_deploy_sdk_base_dry_run(os, base_dist_name)],
162166

163-
deploy_sdk_components(os, tags): [
164-
$.mx_vm_complete + self.maven_deploy_sdk + ['--tags', tags, vm.binaries_repository],
165-
$.mx_vm_complete + self.deploy_artifacts_sdk(os) + ['--tags', tags]
167+
deploy_standalones(os, tags): [
168+
$.mx_vm_complete + self.maven_deploy_all_suites + ['--tags', tags, vm.binaries_repository],
169+
$.mx_vm_complete + self.deploy_artifacts_all_suites(os) + ['--tags', tags]
166170
],
167171

168-
maven_deploy_sdk_components_dry_run: self.maven_deploy_sdk + ['--tags', 'standalone', '--dry-run', vm.binaries_repository],
169-
artifact_deploy_sdk_components_dry_run(os): self.deploy_artifacts_sdk(os) + ['--tags', 'standalone', '--dry-run'],
170-
deploy_sdk_components_dry_run(os): [
171-
$.mx_vm_complete + self.maven_deploy_sdk_components_dry_run,
172-
$.mx_vm_complete + self.artifact_deploy_sdk_components_dry_run(os)
172+
maven_deploy_standalones_dry_run: self.maven_deploy_all_suites + ['--tags', 'standalone', '--dry-run', vm.binaries_repository],
173+
artifact_deploy_standalones_dry_run(os): self.deploy_artifacts_all_suites(os) + ['--tags', 'standalone', '--dry-run'],
174+
deploy_standalones_dry_run(os): [
175+
$.mx_vm_complete + self.maven_deploy_standalones_dry_run,
176+
$.mx_vm_complete + self.artifact_deploy_standalones_dry_run(os)
173177
],
174178

175179
ruby_vm_build: self.svm_common + self.sulong + self.truffleruby + vm.custom_vm,
@@ -528,24 +532,19 @@ local devkits = graal_common.devkits;
528532
timelimit: "1:00:00"
529533
},
530534

531-
deploy_graalvm_components(java_version, standalones, record_file_sizes=false): vm.check_structure + {
532-
build_deps:: std.join(',', []
533-
+ (if (record_file_sizes) then ['GRAALVM'] else [])
534-
+ (if (standalones) then ['GRAALVM_STANDALONES'] else [])
535-
),
535+
deploy_graalvm_standalones(java_version, record_file_sizes=false): vm.check_structure + {
536+
build_deps:: '{MAVEN_TAG_DISTRIBUTIONS:standalone}',
536537

537-
tags:: std.join(',', []
538-
+ (if (standalones) then ['standalone'] else [])
539-
),
538+
tags:: 'standalone',
540539

541540
run: $.patch_env(self.os, self.arch, java_version) + [
542541
$.mx_vm_complete + ['graalvm-show'],
543542
$.mx_vm_complete + ['build', '--dependencies', self.build_deps],
544543
]
545-
+ $.deploy_sdk_components(self.os, self.tags)
544+
+ $.deploy_standalones(self.os, self.tags)
546545
+ (
547546
if (record_file_sizes) then [
548-
$.mx_vm_complete + $.record_file_sizes,
547+
$.mx_vm_complete + $.record_file_sizes + ['--', 'standalones'],
549548
$.upload_file_sizes,
550549
] else []
551550
),
@@ -554,20 +553,21 @@ local devkits = graal_common.devkits;
554553
},
555554

556555
#
557-
# Deploy GraalVM Base and Standalones
556+
# Deploy Truffle Languages Standalones
557+
# `Deploy GraalVM Base` is done in common-runspec.jsonnet.
558558
# NOTE: After adding or removing deploy jobs, please make sure you modify ce-release-artifacts.json accordingly.
559559
#
560560

561561
# Linux/AMD64
562-
deploy_vm_standalones_javaLatest_linux_amd64: vm.vm_java_Latest + self.full_vm_build + self.linux_deploy + self.vm_base('linux', 'amd64', 'daily', deploy=true) + self.deploy_graalvm_components('latest', standalones=true, record_file_sizes=true) + {name: 'daily-deploy-vm-standalones-java-latest-linux-amd64', notify_groups:: ["deploy"]},
562+
deploy_vm_standalones_javaLatest_linux_amd64: vm.vm_java_Latest + self.full_vm_build + self.linux_deploy + self.vm_base('linux', 'amd64', 'daily', deploy=true) + self.deploy_graalvm_standalones('latest', record_file_sizes=true) + {name: 'daily-deploy-vm-standalones-java-latest-linux-amd64', notify_groups:: ["deploy"]},
563563
# Linux/AARCH64
564-
deploy_vm_standalones_javaLatest_linux_aarch64: vm.vm_java_Latest + self.full_vm_build + self.linux_deploy + self.vm_base('linux', 'aarch64', 'daily', deploy=true) + self.deploy_graalvm_components('latest', standalones=true) + {name: 'daily-deploy-vm-standalones-java-latest-linux-aarch64', notify_groups:: ["deploy"], capabilities+: ["!xgene3"]},
564+
deploy_vm_standalones_javaLatest_linux_aarch64: vm.vm_java_Latest + self.full_vm_build + self.linux_deploy + self.vm_base('linux', 'aarch64', 'daily', deploy=true) + self.deploy_graalvm_standalones('latest') + {name: 'daily-deploy-vm-standalones-java-latest-linux-aarch64', notify_groups:: ["deploy"], capabilities+: ["!xgene3"]},
565565
# Darwin/AMD64
566-
deploy_vm_standalones_javaLatest_darwin_amd64: vm.vm_java_Latest + self.full_vm_build + self.darwin_deploy + self.vm_base('darwin', 'amd64', 'daily', deploy=true, jdk_hint='Latest') + self.deploy_graalvm_components('latest', standalones=true) + {name: 'daily-deploy-vm-standalones-java-latest-darwin-amd64', capabilities+: ["!macmini_late_2014"], notify_groups:: ["deploy"], timelimit: '3:00:00'},
566+
deploy_vm_standalones_javaLatest_darwin_amd64: vm.vm_java_Latest + self.full_vm_build + self.darwin_deploy + self.vm_base('darwin', 'amd64', 'daily', deploy=true, jdk_hint='Latest') + self.deploy_graalvm_standalones('latest') + {name: 'daily-deploy-vm-standalones-java-latest-darwin-amd64', capabilities+: ["!macmini_late_2014"], notify_groups:: ["deploy"], timelimit: '3:00:00'},
567567
# Darwin/AARCH64
568-
deploy_vm_standalones_javaLatest_darwin_aarch64: vm.vm_java_Latest + self.full_vm_build + self.darwin_deploy + self.vm_base('darwin', 'aarch64', 'daily', deploy=true) + self.deploy_graalvm_components('latest', standalones=true) + {name: 'daily-deploy-vm-standalones-java-latest-darwin-aarch64', notify_groups:: ["deploy"], notify_emails+: ["[email protected]"], timelimit: '3:00:00'},
568+
deploy_vm_standalones_javaLatest_darwin_aarch64: vm.vm_java_Latest + self.full_vm_build + self.darwin_deploy + self.vm_base('darwin', 'aarch64', 'daily', deploy=true) + self.deploy_graalvm_standalones('latest') + {name: 'daily-deploy-vm-standalones-java-latest-darwin-aarch64', notify_groups:: ["deploy"], notify_emails+: ["[email protected]"], timelimit: '3:00:00'},
569569
# Windows/AMD64
570-
deploy_vm_standalones_javaLatest_windows_amd64: vm.vm_java_Latest + self.svm_common_windows_amd64('Latest') + self.js_windows_common + self.sulong + self.vm_base('windows', 'amd64', 'daily', deploy=true, jdk_hint='Latest') + self.deploy_graalvm_components('latest', standalones=true) + self.deploy_build + {name: 'daily-deploy-vm-standalones-java-latest-windows-amd64', timelimit: '2:30:00', notify_groups:: ["deploy"]},
570+
deploy_vm_standalones_javaLatest_windows_amd64: vm.vm_java_Latest + self.svm_common_windows_amd64('Latest') + self.js_windows_common + self.sulong + self.vm_base('windows', 'amd64', 'daily', deploy=true, jdk_hint='Latest') + self.deploy_graalvm_standalones('latest') + self.deploy_build + {name: 'daily-deploy-vm-standalones-java-latest-windows-amd64', timelimit: '2:30:00', notify_groups:: ["deploy"]},
571571

572572
local sulong_vm_tests = self.svm_common + self.sulong + vm.custom_vm + self.vm_base('linux', 'amd64', 'gate') + {
573573
run: [

vm/mx.vm/ce-aarch64-complete

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1+
# Same as the ce-aarch64 env, except more dynamic imports and no NATIVE_IMAGES list, and no fastr
12
DYNAMIC_IMPORTS=/compiler,/graal-js,/graal-nodejs,/regex,/sdk,/substratevm,/sulong,/tools,/truffle,/wasm,graalpython,truffleruby
2-
COMPONENTS=antlr4,cmp,cov,dap,gvm,gwa,icu4j,ins,insight,insightheap,js,jsl,jss,lg,llp,llrc,llrl,llrn,lsp,nfi-libffi,ni,nic,nil,njs,njsl,pro,pyn,pynl,rby,rbyl,rgx,sdk,sdkl,svm,svmjdwp,svmt,svml,svmnfi,svmsl,tfl,tfla,tflc,tflm,truffle-json,vvm
3-
NATIVE_IMAGES=lib:pythonvm,graalvm-native-binutil,graalvm-native-clang,graalvm-native-clang-cl,graalvm-native-clang++,graalvm-native-flang,graalvm-native-ld,lib:jsvm,lib:graal-nodejs,lib:jvmcicompiler,lib:native-image-agent,lib:native-image-diagnostics-agent,lib:llvmvm,native-image,lib:rubyvm,lib:wasmvm
4-
DISABLE_INSTALLABLES=False
3+
COMPONENTS=cmp,gvm,lg,ni,nic,nil,sdkni,svm,svmjdwp,svmt,svmsl,tflc,tflsm
4+
NON_REBUILDABLE_IMAGES=lib:jvmcicompiler

vm/mx.vm/ce-complete

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1+
# Same as the ce env, except more dynamic imports and no NATIVE_IMAGES list
12
DYNAMIC_IMPORTS=/compiler,/graal-js,/graal-nodejs,/regex,/sdk,/substratevm,/sulong,/tools,/truffle,/wasm,fastr,graalpython,truffleruby
2-
COMPONENTS=antlr4,cmp,cov,dap,gvm,gwa,icu4j,xz,ins,insight,insightheap,js,jsl,jss,lg,llp,llrc,llrl,llrn,lsp,nfi-libffi,nfi,ni,nic,nil,njs,njsl,poly,pro,pyn,pynl,R,rby,rbyl,rgx,sdk,sdkl,svm,svmjdwp,svmt,svml,svmnfi,svmsl,tfl,tfla,tflc,tflm,truffle-json,vvm
3-
NATIVE_IMAGES=lib:pythonvm,graalvm-native-binutil,graalvm-native-clang,graalvm-native-clang-cl,graalvm-native-clang++,graalvm-native-flang,graalvm-native-ld,lib:jsvm,lib:graal-nodejs,lib:jvmcicompiler,lib:native-image-agent,lib:native-image-diagnostics-agent,lib:llvmvm,native-image,lib:rubyvm,lib:wasmvm
4-
DISABLE_INSTALLABLES=false
3+
COMPONENTS=cmp,gvm,lg,ni,nic,nil,sdkni,svm,svmjdwp,svmt,svmsl,tflc,tflsm
4+
NON_REBUILDABLE_IMAGES=lib:jvmcicompiler
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1+
# Same as the ce-darwin-aarch64 env, except more dynamic imports and no NATIVE_IMAGES list, and no fastr
12
DYNAMIC_IMPORTS=/compiler,/graal-js,/graal-nodejs,/regex,/sdk,/substratevm,/sulong,/tools,/truffle,/wasm,graalpython,truffleruby
2-
COMPONENTS=antlr4,cmp,cov,dap,gvm,gwa,icu4j,ins,insight,insightheap,js,jsl,jss,lg,llp,llrc,llrl,llrn,lsp,nfi-libffi,nfi,ni,nic,nil,njs,njsl,pro,pyn,pynl,rby,rbyl,rgx,sdk,sdkl,svm,svmjdwp,svmt,svmnfi,svmsl,tfl,tfla,tflc,tflm,truffle-json,vvm
3-
NATIVE_IMAGES=lib:pythonvm,graalvm-native-binutil,graalvm-native-clang,graalvm-native-clang-cl,graalvm-native-clang++,graalvm-native-flang,graalvm-native-ld,lib:jsvm,lib:graal-nodejs,lib:jvmcicompiler,lib:native-image-agent,lib:native-image-diagnostics-agent,lib:llvmvm,native-image,lib:rubyvm,lib:wasmvm
4-
DISABLE_INSTALLABLES=false
3+
COMPONENTS=cmp,gvm,lg,ni,nic,nil,sdkni,svm,svmjdwp,svmt,svmsl,tflc,tflsm
4+
NON_REBUILDABLE_IMAGES=lib:jvmcicompiler

vm/mx.vm/ce-darwin-complete

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1+
# Same as the ce-darwin env, except more dynamic imports and no NATIVE_IMAGES list, and no fastr
12
DYNAMIC_IMPORTS=/compiler,/graal-js,/graal-nodejs,/regex,/sdk,/substratevm,/sulong,/tools,/truffle,/wasm,graalpython,truffleruby
2-
COMPONENTS=antlr4,cmp,cov,dap,gvm,gwa,icu4j,xz,ins,insight,insightheap,js,jsl,jss,lg,llp,llrc,llrl,llrn,lsp,nfi-libffi,nfi,ni,nic,nil,njs,njsl,poly,pro,pyn,pynl,rby,rbyl,rgx,sdk,sdkl,svm,svmjdwp,svmt,svml,svmnfi,svmsl,tfl,tfla,tflc,tflm,truffle-json,vvm
3-
NATIVE_IMAGES=lib:pythonvm,graalvm-native-binutil,graalvm-native-clang,graalvm-native-clang-cl,graalvm-native-clang++,graalvm-native-flang,graalvm-native-ld,lib:jsvm,lib:graal-nodejs,lib:jvmcicompiler,lib:native-image-agent,lib:native-image-diagnostics-agent,lib:llvmvm,native-image,lib:rubyvm,lib:wasmvm
4-
DISABLE_INSTALLABLES=false
3+
COMPONENTS=cmp,gvm,lg,ni,nic,nil,sdkni,svm,svmjdwp,svmt,svmsl,tflc,tflsm
4+
NON_REBUILDABLE_IMAGES=lib:jvmcicompiler

vm/mx.vm/ce-win-complete

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1+
# Same as the ce-win env, except more dynamic imports and no NATIVE_IMAGES list, and no truffleruby,fastr
12
DYNAMIC_IMPORTS=/compiler,/graal-js,/graal-nodejs,/regex,/sdk,/substratevm,/sulong,/tools,/truffle,/wasm,graalpython
2-
COMPONENTS=antlr4,cmp,cov,dap,gvm,gwa,icu4j,ins,insight,insightheap,js,jsl,jss,lg,llp,llrc,llrl,llrn,lsp,nfi-libffi,nfi,ni,nic,nil,njs,njsl,pro,pyn,pynl,rgx,sdk,sdkl,svm,svmjdwp,svmt,svmnfi,svmsl,tfl,tfla,tflc,tflm,truffle-json,vvm
3-
NATIVE_IMAGES=lib:pythonvm,graalvm-native-binutil,graalvm-native-clang,graalvm-native-clang-cl,graalvm-native-clang++,graalvm-native-flang,graalvm-native-ld,lib:jsvm,lib:graal-nodejs,lib:jvmcicompiler,lib:native-image-agent,lib:native-image-diagnostics-agent,lib:llvmvm,native-image,lib:wasmvm
4-
DISABLE_INSTALLABLES=False
3+
COMPONENTS=cmp,gvm,lg,ni,nic,nil,sdkni,svm,svmjdwp,svmt,svmsl,tflc,tflsm
4+
NON_REBUILDABLE_IMAGES=lib:jvmcicompiler

vm/mx.vm/mx_vm_benchmark.py

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
import mx_sdk_benchmark
3535
import mx_sdk_vm
3636
import mx_sdk_vm_impl
37+
import mx_sdk_vm_ng
3738
from mx_benchmark import DataPoint, DataPoints
3839
from mx_sdk_benchmark import GraalVm, NativeImageVM
3940

@@ -344,7 +345,6 @@ def get_vm_registry(self):
344345

345346
def runAndReturnStdOut(self, benchmarks, bmSuiteArgs):
346347
vm = self.get_vm_registry().get_vm_from_suite_args(bmSuiteArgs)
347-
vm.extract_vm_info(self.vmArgs(bmSuiteArgs))
348348
host_vm = None
349349
if isinstance(vm, mx_benchmark.GuestVm):
350350
host_vm = vm.host_vm()
@@ -359,21 +359,34 @@ def runAndReturnStdOut(self, benchmarks, bmSuiteArgs):
359359
"guest-vm-config": self.guest_vm_config_name(host_vm, vm),
360360
}
361361

362+
def get_size_message(image_name, image_location):
363+
return FileSizeBenchmarkSuite.SZ_MSG_PATTERN.format(image_name, getsize(image_location), image_location)
364+
365+
bmSuiteArgs = bmSuiteArgs or ['base']
362366
out = ""
363-
output_root = mx_sdk_vm_impl.get_final_graalvm_distribution().get_output_root()
364367

365-
def get_size_message(image_name, image_location):
366-
return FileSizeBenchmarkSuite.SZ_MSG_PATTERN.format(image_name, getsize(os.path.join(output_root, image_location)), image_location, output_root)
367-
368-
for location in mx_sdk_vm_impl.get_all_native_image_locations(include_libraries=True, include_launchers=False, abs_path=False):
369-
lib_name = 'lib:' + mx_sdk_vm_impl.remove_lib_prefix_suffix(basename(location))
370-
out += get_size_message(lib_name, location)
371-
for location in mx_sdk_vm_impl.get_all_native_image_locations(include_libraries=False, include_launchers=True, abs_path=False):
372-
launcher_name = mx_sdk_vm_impl.remove_exe_suffix(basename(location))
373-
out += get_size_message(launcher_name, location)
368+
for arg in bmSuiteArgs:
369+
if arg == 'standalones':
370+
# Standalones
371+
for project in mx.projects():
372+
if isinstance(project, mx_sdk_vm_ng.NativeImageProject):
373+
native_image = project.output_file()
374+
if os.path.exists(native_image):
375+
out += get_size_message(project.options_file_name(), native_image)
376+
elif arg == 'base':
377+
# GraalVM base
378+
output_root = mx_sdk_vm_impl.get_final_graalvm_distribution().get_output_root()
379+
for location in mx_sdk_vm_impl.get_all_native_image_locations(include_libraries=True, include_launchers=False, abs_path=False):
380+
lib_name = 'lib:' + mx_sdk_vm_impl.remove_lib_prefix_suffix(basename(location))
381+
out += get_size_message(lib_name, os.path.join(output_root, location))
382+
for location in mx_sdk_vm_impl.get_all_native_image_locations(include_libraries=False, include_launchers=True, abs_path=False):
383+
launcher_name = mx_sdk_vm_impl.remove_exe_suffix(basename(location))
384+
out += get_size_message(launcher_name, os.path.join(output_root, location))
385+
else:
386+
mx.abort("FileSizeBenchmarkSuite expects 'base' or 'standalones' in bench suite arguments but got " + arg)
387+
374388
if out:
375389
mx.log(out, end='')
376-
dims.update(vm.dimensions(output_root, bmSuiteArgs, 0, out))
377390
return 0, out, dims
378391

379392
def rules(self, output, benchmarks, bmSuiteArgs):

0 commit comments

Comments
 (0)