Skip to content

Commit 2b07418

Browse files
committed
Pipeline polybench jobs
1 parent a1ce776 commit 2b07418

File tree

3 files changed

+58
-11
lines changed

3 files changed

+58
-11
lines changed

vm/ci/ci_common/common-bench.jsonnet

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,9 @@ local repo_config = import '../../../ci/repo-configuration.libsonnet';
6262
},
6363

6464

65-
polybench_vm_common(env='${VM_ENV}', fail_fast=false, skip_machine=false): (if skip_machine then self.vm_bench_base(machine_name=null) else self.vm_bench_common) + common.deps.svm + vm.custom_vm {
66-
local is_enterprise = (vm.edition == 'ee'),
67-
setup+: [
68-
['mx', '--env', env, 'sforceimports'],
69-
['mx', '--env', env, 'build'],
70-
['set-export', 'POLYBENCH_JVM', ['mx', '--env', env, 'graalvm-home']],
71-
] + if is_enterprise then [['mx', '--dy', '/truffle-enterprise', 'build']] else [],
65+
polybench_vm_common(os, arch, fail_fast=false, skip_machine=false): (if skip_machine then self.vm_bench_base(machine_name=null) else self.vm_bench_common) + vm_common.pipelined_graalvm(repo_config.graalvm_edition, os, arch, environment_variable='POLYBENCH_JVM') + {
66+
local is_enterprise = (repo_config.graalvm_edition == 'ee'),
67+
setup+: if is_enterprise then [['mx', '--dy', '/truffle-enterprise', 'build']] else [],
7268

7369
# Extends the provided polybench command with common arguments used in CI. We want the command at the call site
7470
# to be simple (i.e., a flat array of string literals) so it can be easily copied and run locally; using this
@@ -82,7 +78,7 @@ local repo_config = import '../../../ci/repo-configuration.libsonnet';
8278
notify_groups:: ['polybench'],
8379
},
8480

85-
polybench_vm_hpc_common: self.polybench_vm_common(skip_machine=true) + self.polybench_hpc_linux_common(shape='e4_8_64') + {
81+
polybench_vm_hpc_common: self.polybench_vm_common('linux', 'amd64', skip_machine=true) + self.polybench_hpc_linux_common(shape='e4_8_64') + {
8682
polybench_wrap(command)::
8783
super.polybench_wrap(command) + [
8884
'--mx-benchmark-args',
@@ -91,12 +87,12 @@ local repo_config = import '../../../ci/repo-configuration.libsonnet';
9187
teardown: [self.upload_and_wait_for_indexing + ['||', 'echo', 'Result upload failed!']],
9288
},
9389

94-
polybench_vm_gate(os, arch, language, name = null): vm_common.vm_base(os, arch, 'tier3') + self.polybench_vm_common(fail_fast=true, skip_machine=true) + vm.vm_java_Latest + {
90+
polybench_vm_gate(os, arch, language, name = null): vm_common.vm_base(os, arch, 'tier3') + self.polybench_vm_common(os, arch, fail_fast=true, skip_machine=true) + vm.vm_java_Latest + {
9591
name: utils.hyphenize(['gate-vm', vm.vm_setup.short_name, 'polybench', language, name, utils.jdk_and_hardware(self)]),
9692
timelimit: '1:00:00',
9793
},
9894

99-
polybench_vm_daily(os, arch, language, name = null): vm_common.vm_base(os, arch, 'daily', bench=true) + self.polybench_vm_common() + vm.vm_java_Latest + {
95+
polybench_vm_daily(os, arch, language, name = null): vm_common.vm_base(os, arch, 'daily', bench=true) + self.polybench_vm_common(os, arch) + vm.vm_java_Latest + {
10096
name: utils.hyphenize(['daily-bench-vm', vm.vm_setup.short_name, 'polybench', language, name, utils.jdk_and_hardware(self)]),
10197
teardown: [self.upload],
10298
timelimit: '4:00:00',

vm/ci/ci_common/common.jsonnet

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ local vm = import '../ci_includes/vm.jsonnet';
22
local graal_common = import '../../../ci/ci_common/common.jsonnet';
33
local galahad = import '../../../ci/ci_common/galahad-common.libsonnet';
44
local utils = import '../../../ci/ci_common/common-utils.libsonnet';
5-
local repo_config = import '../../../repo-configuration.libsonnet';
5+
local repo_config = import '../../../ci/repo-configuration.libsonnet';
66
local devkits = graal_common.devkits;
77

88
{
@@ -572,6 +572,54 @@ local devkits = graal_common.devkits;
572572
name: 'gate-vm-native-sulong-' + self.jdk_name + '-linux-amd64',
573573
},
574574

575+
# loading large artifacts is not fast on those machines, so avoid them
576+
big_artifacts: {
577+
capabilities+: ["!x82", "!x82_16_367"]
578+
},
579+
580+
# Builds a GraalVM and publishes a pipeline artifact. Use pipelined_graalvm to declare a dependency on this build.
581+
# Be careful to only declare one job per set of arguments, otherwise there will be duplicate build jobs and enumeration may fail.
582+
build_graalvm(vm, os, arch)::
583+
graal_common[os + "_" + arch] + graal_common["labsjdk-" + vm + "-latest"] + self.big_artifacts + graal_common.deps.proguard + graal_common.deps.windows_devkit
584+
{
585+
local name = "graalvm-jdklatest-" + vm + "-" + os + "-" + arch,
586+
local env = vm,
587+
local mx = ["mx", "--strip-jars", "--env", env],
588+
name: "build-" + name,
589+
run+: [
590+
["cd", repo_config.vm.suite_dir],
591+
mx + ["build", "--dependencies=GRAALVM"],
592+
["mkdir", "$BUILD_DIR/artifacts"],
593+
["mv", mx + ["--quiet", "--no-warning", "graalvm-home"], "$BUILD_DIR/artifacts/graalvm"],
594+
],
595+
python_version: "3",
596+
publishArtifacts+: [
597+
{
598+
name: name,
599+
dir: "../artifacts",
600+
patterns: ["*"],
601+
},
602+
],
603+
logs+: [
604+
"*/mxbuild/dists/stripped/*.map",
605+
],
606+
targets: ["ondemand"],
607+
timelimit: "0:30:00",
608+
},
609+
610+
# Use this helper to request a pipelined GraalVM in the current job. The job definition will export the pipelined VM
611+
# to the given environment variable. There should be a corresponding build_graalvm job somewhere in the CI config.
612+
pipelined_graalvm(vm, os, arch, environment_variable = "GRAALVM_HOME"): {
613+
requireArtifacts+: [{
614+
name: "graalvm-jdklatest-%s-%s-%s" % [vm, os, arch],
615+
dir: "../artifacts",
616+
autoExtract: true,
617+
}],
618+
setup+: [
619+
["set-export", environment_variable, "$BUILD_DIR/artifacts/graalvm"],
620+
],
621+
},
622+
575623
local builds = [
576624
#
577625
# Gates

vm/ci/ci_includes/vm.jsonnet

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,9 @@ local graal_common = import '../../../ci/ci_common/common.jsonnet';
164164
vm_common.deploy_vm_standalones_javaLatest_windows_amd64,
165165
# Trigger the releaser service and notify the indexer
166166
self.vm_notifier_daily,
167+
168+
# Pipelined builds
169+
vm_common.build_graalvm("ce", "linux", "amd64"),
167170
],
168171

169172
builds: [vm_common.verify_name(b) for b in vm_common.builds + vm_common_runspec.builds + vm_common_bench.builds + vm_bench.builds + vm_native.builds + utils.add_defined_in(builds, std.thisFile)],

0 commit comments

Comments
 (0)