Skip to content

Commit 1166652

Browse files
committed
Use checkout-downstream and sforceimports in the correct order for graalpy
1 parent 7e69e05 commit 1166652

File tree

2 files changed

+20
-9
lines changed

2 files changed

+20
-9
lines changed

ci/python-bench.libsonnet

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -192,16 +192,17 @@
192192
else
193193
super.vm_config_name,
194194
setup+: [
195+
// NOTE: logic shared with ci/python-gate.libsonnet, keep in sync
195196
// ensure we get graal-enterprise as a hostvm
196197
["git", "clone", $.overlay_imports.GRAAL_ENTERPRISE_GIT, "${BUILD_DIR}/graal-enterprise"],
197-
// force imports the main repository, so we get the relevant suites cloned
198-
["mx"] + self.vm_info.dy + ["sforceimports"],
199-
// force imports with the env, which may use another suite as the primary and potentially clone other things
198+
// force imports the main repository to get the right graal commit
199+
["mx", "sforceimports"],
200+
// checkout the matching revision of graal-enterprise repository based on the graal/compiler checkout
201+
["mx", "--quiet", "--dy", "/graal-enterprise", "checkout-downstream", "compiler", "graal-enterprise", "--no-fetch"],
202+
// force imports with the env, which may clone other things (e.g. substratevm-enterprise-gcs)
200203
["mx"] + self.vm_info.env + self.vm_info.dy + ["sforceimports"],
201-
// force imports the main repository, so we get their versions where it is relevant
202-
["mx"] + self.vm_info.dy + ["sforceimports"],
203-
// checkout the desired revision of graal-enterprise repository based on the main repositories compiler checkout
204-
["mx", "--quiet", "-p", "${BUILD_DIR}/graal-enterprise/vm-enterprise", "checkout-downstream", "vm", "vm-enterprise", "--no-fetch"],
204+
// force imports the main repository to get the right graal commit
205+
["mx", "sforceimports"],
205206
// logging
206207
["mx"] + self.vm_info.env + self.vm_info.dy + ["sversions"],
207208
// build main repository

ci/python-gate.libsonnet

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -461,16 +461,25 @@
461461
excludes+: ["**.md", "docs/**", "3rd_party_licenses.txt", "scripts/**"],
462462
},
463463
setup+: [
464+
// force imports the main repository to get the right graal commit
464465
["mx"] + self.mx_parameters + ["sforceimports"],
466+
// logging
465467
["mx"] + self.mx_parameters + self.dy + ["sversions"],
466468
],
467469
}),
468470

469471
graalpy_ee_gate:: $.graalpy_gate + task_spec({
470472
setup+: [
473+
// NOTE: logic shared with ci/python-bench.libsonnet, keep in sync
471474
["git", "clone", $.overlay_imports.GRAAL_ENTERPRISE_GIT, "../graal-enterprise"],
472-
['mx', '-p', '../graal-enterprise/vm-enterprise', 'checkout-downstream', 'vm', 'vm-enterprise'],
473-
['mx', '--dynamicimports', '/graal-enterprise', 'sversions'],
475+
// checkout the matching revision of graal-enterprise repository based on the graal/compiler checkout
476+
["mx", "--quiet", "--dy", "/graal-enterprise", "checkout-downstream", "compiler", "graal-enterprise", "--no-fetch"],
477+
// force imports with the env, which may clone other things (e.g. substratevm-enterprise-gcs)
478+
["mx", "--env", "native-ee", "sforceimports"],
479+
// force imports the main repository to get the right graal commit
480+
["mx", "sforceimports"],
481+
// logging
482+
["mx", "--env", "native-ee", "sversions"],
474483
],
475484
}),
476485

@@ -511,6 +520,7 @@
511520
["git", "clone", $.overlay_imports.GRAAL_ENTERPRISE_GIT, "../graal-enterprise"],
512521
['git', '-C', '../graal', 'checkout', '${GRAAL_COMMIT}'],
513522
['mx', '-p', '../graal/vm', '--dynamicimports', 'graalpython', 'sforceimports'],
523+
// NOTE: jvm-only, so not need to handle substratevm-enterprise-gcs
514524
['mx', '-p', '../graal-enterprise/vm-enterprise', 'checkout-downstream', 'vm', 'vm-enterprise'],
515525
['git', 'checkout', '${MAIN_REVISION}'],
516526
],

0 commit comments

Comments
 (0)