Skip to content

Commit e7523fc

Browse files
[GR-65874] Add G1 variant of espresso standalone.
PullRequest: graal/21092
2 parents 860c062 + d077c41 commit e7523fc

File tree

2 files changed

+23
-10
lines changed

2 files changed

+23
-10
lines changed

espresso/mx.espresso/mx_espresso.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -567,12 +567,19 @@ def mx_register_dynamic_suite_constituents(register_project, register_distributi
567567
}, None, True, None, platforms='local', ignore=ignore_msg))
568568

569569
register_espresso_runtime_resources(register_project, register_distribution, _suite)
570+
deliverable_variant = mx.get_env('ESPRESSO_DELIVERABLE_VARIANT')
571+
if deliverable_variant:
572+
suffix = '-' + deliverable_variant.lower()
573+
dist_suffix = '_' + deliverable_variant.upper()
574+
else:
575+
suffix = ''
576+
dist_suffix = ''
570577
register_distribution(DeliverableStandaloneArchive(_suite,
571578
standalone_dist='ESPRESSO_NATIVE_STANDALONE',
572-
community_archive_name=f"espresso-community-java{java_home_dep.major_version}",
573-
enterprise_archive_name=f"espresso-java{java_home_dep.major_version}",
574-
community_dist_name=f'GRAALVM_ESPRESSO_COMMUNITY_JAVA{java_home_dep.major_version}',
575-
enterprise_dist_name=f'GRAALVM_ESPRESSO_JAVA{java_home_dep.major_version}'))
579+
community_archive_name=f"espresso-community-java{java_home_dep.major_version}{suffix}",
580+
enterprise_archive_name=f"espresso-java{java_home_dep.major_version}{suffix}",
581+
community_dist_name=f'GRAALVM_ESPRESSO_COMMUNITY_JAVA{java_home_dep.major_version}{dist_suffix}',
582+
enterprise_dist_name=f'GRAALVM_ESPRESSO_JAVA{java_home_dep.major_version}{dist_suffix}'))
576583

577584

578585
def espresso_resources_suite():

vm/ci/ci_common/common-runspec.jsonnet

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -195,17 +195,18 @@ local evaluate_late(key, object) = task_spec(run_spec.evaluate_late({key:object}
195195
},
196196
} else {})),
197197

198-
local deploy_graalvm_espresso = svm_common + common_os_deploy + espresso_name + task_spec({
198+
local deploy_graalvm_espresso(with_g1=false) = svm_common + common_os_deploy + espresso_name + task_spec({
199199
notify_groups:: ['deploy'],
200200
}) + build_base_graalvm_image(with_profiles=false) + task_spec({
201-
espresso_standalone_dist:: if vm.edition == 'ce' then 'GRAALVM_ESPRESSO_COMMUNITY_JAVA21' else 'GRAALVM_ESPRESSO_JAVA21',
201+
espresso_standalone_dist:: (if vm.edition == 'ce' then 'GRAALVM_ESPRESSO_COMMUNITY_JAVA21' else 'GRAALVM_ESPRESSO_JAVA21') +
202+
(if with_g1 then '_G1' else ''),
202203
mx_vm_espresso:: vm.mx_cmd_base_no_env + ['--env', self.mx_env_espresso] + self.mx_vm_cmd_suffix,
203-
run +:[
204+
run +: (if with_g1 then [['set-export', 'ESPRESSO_DELIVERABLE_VARIANT', 'G1']] else []) + [
204205
# $GRAALVM_HOME was built and set by build_base_graalvm_image
205206
# Build the espresso standalone with this GraalVM
206207
['set-export', 'BOOTSTRAP_GRAALVM', '$GRAALVM_HOME'],
207208
['set-export', 'VM_ENV', self.mx_env_espresso],
208-
self.mx_vm_espresso + ['build', '--targets=' + self.espresso_standalone_dist],
209+
self.mx_vm_espresso + (if with_g1 then ['--extra-image-builder-argument=--gc=G1'] else []) + ['build', '--targets=' + self.espresso_standalone_dist],
209210
# Smoke test the built stabndalone
210211
['set-export', 'ESPRESSO_STANDALONE', self.mx_vm_espresso + ['--quiet', '--no-warning', 'path', '--output', 'ESPRESSO_NATIVE_STANDALONE']],
211212
['set-export', 'DACAPO_JAR', self.mx_vm_espresso + ['--quiet', '--no-warning', 'paths', '--download', 'DACAPO_MR1_2baec49']],
@@ -235,14 +236,19 @@ local evaluate_late(key, object) = task_spec(run_spec.evaluate_late({key:object}
235236
#
236237
# Deploy the GraalVM Espresso artifact (GraalVM Base + espresso - native image)
237238
#
238-
"vm-espresso": mx_env + deploy_graalvm_espresso + espresso_java_home(21) + default_os_arch_jdk_mixin + platform_spec(no_jobs) + (
239+
"vm-espresso": mx_env + deploy_graalvm_espresso() + espresso_java_home(21) + default_os_arch_jdk_mixin + platform_spec(no_jobs) + (
239240
if vm.deploy_espress_standalone then platform_spec({
240-
"linux:amd64:jdk-latest": weekly,
241+
"linux:amd64:jdk-latest": daily,
241242
"linux:aarch64:jdk-latest": weekly,
242243
"darwin:amd64:jdk-latest": weekly,
243244
"darwin:aarch64:jdk-latest": weekly,
244245
"windows:amd64:jdk-latest": weekly,
245246
}) else {}),
247+
"vm-espresso-g1": mx_env + deploy_graalvm_espresso(with_g1=true) + espresso_java_home(21) + default_os_arch_jdk_mixin + platform_spec(no_jobs) + (
248+
if vm.deploy_espress_standalone && vm.edition == 'ee' then platform_spec({
249+
"linux:amd64:jdk-latest": daily,
250+
"linux:aarch64:jdk-latest": weekly,
251+
}) else {}),
246252
},
247253

248254
builds: utils.add_defined_in(std.flattenArrays([run_spec.process(task_dict).list for task_dict in [

0 commit comments

Comments
 (0)