Skip to content

Commit 5eeb74f

Browse files
committed
add verify_ci gate helper
- add bench mixin to common
1 parent eceb8f2 commit 5eeb74f

File tree

4 files changed

+39
-8
lines changed

4 files changed

+39
-8
lines changed

ci.jsonnet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ local const = import 'ci_common/constants.libsonnet';
33
local builder = import 'ci_common/builder.libsonnet';
44

55
{
6-
overlay: "a02d502769517eff6324561f77f7cc73ded73284",
6+
overlay: "7d164a8ab30e6ec2d3176469d7d549dcee66380e",
77

88
// ======================================================================================================
99
//

ci_common/builder.libsonnet

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ local mixins = import 'mixins.libsonnet';
88
// the build templates
99
//
1010
// ------------------------------------------------------------------------------------------------------
11-
local baseBuilder = {
11+
local base = {
1212
downloads: {},
1313
environment: {},
1414
setup: [],
@@ -20,24 +20,24 @@ local mixins = import 'mixins.libsonnet';
2020
targets: [],
2121
run: [],
2222
},
23-
baseBuilder:: baseBuilder,
23+
base:: base,
2424

25-
local commonBuilder = baseBuilder + mixins.labsjdk8 + {
25+
local common = base + mixins.labsjdk8 + {
2626
dynamicImports:: "/sulong,/compiler",
2727

2828
setup +: [
2929
["mx", "sforceimports"],
3030
["mx", "--dynamicimports", self.dynamicImports, "build"],
3131
]
3232
},
33-
commonBuilder:: commonBuilder,
33+
common:: common,
3434

3535
// ------------------------------------------------------------------------------------------------------
3636
//
3737
// the gate templates
3838
//
3939
// ------------------------------------------------------------------------------------------------------
40-
local baseGate = commonBuilder + {
40+
local baseGate = common + {
4141
tags: "tags must be defined",
4242

4343
// local truffleDebugFlags = utils.graalOption("TraceTruffleCompilation", "true"),
@@ -84,7 +84,7 @@ local mixins = import 'mixins.libsonnet';
8484
//
8585
// ------------------------------------------------------------------------------------------------------
8686
deployGate(platform)::
87-
baseBuilder + mixins.graalCore + mixins.sulong + mixins.getPlatform(platform) + {
87+
base + mixins.graalCore + mixins.sulong + mixins.getPlatform(platform) + {
8888
targets: const.TARGET.postMerge,
8989
setup +: [
9090
["mx", "sversions"],
@@ -97,7 +97,7 @@ local mixins = import 'mixins.libsonnet';
9797
},
9898

9999
coverageGate::
100-
commonBuilder + mixins.getPlatform(platform="linux") + {
100+
common + mixins.getPlatform(platform="linux") + {
101101
targets: const.TARGET.weekly,
102102
timelimit: const.TIME_LIMIT["4h"],
103103
run +: [

ci_common/mixins.libsonnet

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,4 +108,18 @@ local const = import 'constants.libsonnet';
108108
}
109109
},
110110
sulong:: sulong,
111+
112+
local bench = {
113+
packages +: {
114+
"make": ">=3.83",
115+
"binutils": "==2.23.2",
116+
},
117+
environment +: {
118+
BENCH_RESULTS_FILE_PATH: "bench-results.json",
119+
},
120+
logs +: [
121+
"results.json",
122+
],
123+
},
124+
bench:: bench,
111125
}

mx.graalpython/mx_graalpython.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -902,6 +902,23 @@ def import_python_sources(args):
902902
SUITE.vc.git_command(SUITE.dir, ["merge", "python-import"])
903903

904904

905+
# ----------------------------------------------------------------------------------------------------------------------
906+
#
907+
# add ci verification util
908+
#
909+
# ----------------------------------------------------------------------------------------------------------------------
910+
def verify_ci(dest_suite, args=None):
911+
"""Verify CI configuration"""
912+
base_suite = SUITE
913+
if not isinstance(dest_suite, mx.SourceSuite) or not isinstance(base_suite, mx.SourceSuite):
914+
raise mx.abort("Can not use verify-ci on binary suites: {} and {} need to be source suites".format(
915+
SUITE.name, dest_suite.name))
916+
assert isinstance(base_suite, mx.SourceSuite)
917+
for ext in [".libsonnet", ".jsonnet"]:
918+
mx.log("CI setup verifying *{} files ... ".format(ext))
919+
mx.verify_ci(args, base_suite, dest_suite, common_dirs=['ci_common'], extension=ext)
920+
921+
905922
# ----------------------------------------------------------------------------------------------------------------------
906923
#
907924
# register as a GraalVM language

0 commit comments

Comments
 (0)