@@ -20,7 +20,7 @@ local restrict_builds_to = [];
20
20
# and it would still work.
21
21
local utils = import "utils.libsonnet" ;
22
22
23
- local common = import "common.json " ;
23
+ local common = import "ci/ common.jsonnet " ;
24
24
25
25
# All builds are composed **directly** from **independent disjunct composable**
26
26
# jsonnet objects defined in here. Use `+:` to make the objects or arrays
@@ -33,22 +33,13 @@ local part_definitions = {
33
33
34
34
use: {
35
35
common: {
36
- python_version: "3" , # To use the correct virtualenv
37
-
38
36
environment+: {
39
37
path+:: [],
40
38
TRUFFLERUBY_CI: "true" ,
41
39
RUBY_BENCHMARKS: "true" ,
42
- MX_PYTHON: "python3.8" ,
43
40
PATH: std.join (":" , self .path + ["$PATH" ]),
44
41
},
45
42
46
- packages+: {
47
- mx: common.mx_version,
48
- python3: "==3.8.10" , # For mx
49
- "pip:ninja_syntax" : "==1.7.2" , # Required by NFI and mx
50
- },
51
-
52
43
setup+: [
53
44
# We don't want to proxy any internet access
54
45
[
@@ -74,18 +65,9 @@ local part_definitions = {
74
65
"*.log" ,
75
66
],
76
67
77
- catch_files+: [
78
- "Graal diagnostic output saved in (?P<filename>.+\\ .zip)" ,
79
- ],
80
-
81
68
mx_build_options:: [],
82
69
},
83
70
84
- maven: {
85
- downloads+: { MAVEN_HOME: { name: "maven" , version: "3.3.9" } },
86
- environment+: { path+:: ["$MAVEN_HOME/bin" ] },
87
- },
88
-
89
71
build: {
90
72
setup+: [["mx" , "sversions" ]] +
91
73
# aot-build.log is used for the build-stats metrics, in other cases it does no harm
@@ -227,90 +209,75 @@ local part_definitions = {
227
209
jdk: {
228
210
local with_path = { environment+: { path+:: ["$JAVA_HOME/bin" ] } },
229
211
230
- v17: with_path {
231
- downloads+: {
232
- JAVA_HOME: common.jdks["labsjdk-ce-17" ],
233
- },
212
+ v17: with_path + common.jdks.labsjdk17ce + {
234
213
environment+: {
235
214
JT_JDK: "17" ,
236
215
},
237
216
},
238
217
239
- v20: with_path {
240
- downloads+: {
241
- JAVA_HOME: common.jdks["labsjdk-ce-20" ],
242
- },
218
+ v20: with_path + common.jdks.labsjdk20ce + {
243
219
environment+: {
244
220
JT_JDK: "20" ,
245
221
},
246
222
},
247
223
},
248
224
249
225
platform: {
250
- local linux_amd64_deps = common.sulong. deps.common + {
226
+ local linux_amd64_deps = common.deps.sulong + {
251
227
packages+: {
252
- git: ">=1.8.3" ,
253
228
binutils: ">=2.30" ,
254
229
ruby: "==" + mri_version,
255
230
},
256
231
},
257
232
258
- local linux_aarch64_deps = common.sulong. deps.common + {
233
+ local linux_aarch64_deps = common.deps.sulong + {
259
234
packages+: {
260
235
ruby: "==3.0.2" ,
261
236
},
262
237
},
263
238
264
- local darwin_amd64_deps = common.sulong. deps.common + {
239
+ local darwin_amd64_deps = common.deps.sulong + {
265
240
packages+: {
266
241
ruby: "==3.0.2" ,
267
242
},
268
243
},
269
244
270
- local darwin_aarch64_deps = common.sulong. deps.common + {
245
+ local darwin_aarch64_deps = common.deps.sulong + {
271
246
packages+: {
272
247
ruby: "==3.0.2" ,
273
248
},
274
249
},
275
250
276
- linux: linux_amd64_deps + {
251
+ linux: common.linux_amd64 + linux_amd64_deps + {
277
252
platform_name:: "LinuxAMD64" ,
278
- platform: "linux" ,
279
- arch:: "amd64" ,
280
253
"$.cap" :: {
281
- normal_machine: ["linux" , "amd64" ],
254
+ normal_machine: [],
282
255
bench_machine: ["x52" ] + self .normal_machine + ["no_frequency_scaling" ],
283
256
},
284
257
docker: {
285
258
image: "buildslave_ol7" ,
286
259
mount_modules: true ,
287
260
},
288
261
},
289
- linux_aarch64: linux_aarch64_deps + {
262
+ linux_aarch64: common.linux_aarch64 + linux_aarch64_deps + {
290
263
platform_name:: "LinuxAArch64" ,
291
- platform: "linux" ,
292
- arch:: "aarch64" ,
293
264
"$.cap" :: {
294
- normal_machine: ["linux" , "aarch64" ],
265
+ normal_machine: [],
295
266
},
296
267
},
297
- darwin_amd64: darwin_amd64_deps + {
268
+ darwin_amd64: common.darwin_amd64 + darwin_amd64_deps + {
298
269
platform_name:: "DarwinAMD64" ,
299
- platform: "darwin" ,
300
- arch:: "amd64" ,
301
270
"$.cap" :: {
302
- normal_machine: ["darwin_mojave" , "amd64" ],
271
+ normal_machine: ["darwin_mojave" ],
303
272
},
304
273
environment+: {
305
274
LANG: "en_US.UTF-8" ,
306
275
},
307
276
},
308
- darwin_aarch64: darwin_aarch64_deps + {
277
+ darwin_aarch64: common.darwin_aarch64 + darwin_aarch64_deps + {
309
278
platform_name:: "DarwinAArch64" ,
310
- platform: "darwin" ,
311
- arch:: "aarch64" ,
312
279
"$.cap" :: {
313
- normal_machine: ["darwin" , "aarch64" ],
280
+ normal_machine: [],
314
281
},
315
282
environment+: {
316
283
LANG: "en_US.UTF-8" ,
@@ -420,14 +387,14 @@ local part_definitions = {
420
387
],
421
388
run+: [
422
389
["env" ,
423
- "LD_LIBRARY_PATH=$BUILD_DIR/graal/sulong/mxbuild/" + self .platform + "-" + self .arch + "/SULONG_HOME/native/lib:$LD_LIBRARY_PATH" , # for finding libc++
390
+ "LD_LIBRARY_PATH=$BUILD_DIR/graal/sulong/mxbuild/" + self .os + "-" + self .arch + "/SULONG_HOME/native/lib:$LD_LIBRARY_PATH" , # for finding libc++
424
391
"PATH=$TOOLCHAIN_PATH:$PATH" ,
425
392
"ruby" , "tool/generate-native-config.rb" ],
426
393
["cat" , "src/main/java/org/truffleruby/platform/" + self .platform_name + "NativeConfiguration.java" ],
427
394
428
395
# Uses the system compiler as using the toolchain for this does not work on macOS
429
396
["tool/generate-config-header.sh" ],
430
- ["cat" , "lib/cext/include/truffleruby/config_" + self .platform + "_" + self .arch + ".h" ],
397
+ ["cat" , "lib/cext/include/truffleruby/config_" + self .os + "_" + self .arch + ".h" ],
431
398
],
432
399
},
433
400
@@ -535,7 +502,7 @@ local part_definitions = {
535
502
};
536
503
537
504
# composition_environment inherits from part_definitions all building blocks
538
- # (parts) can be addressed using jsonnet root syntax e.g. $.use.maven
505
+ # (parts) can be addressed using jsonnet root syntax e.g. $.use.build
539
506
local composition_environment = utils.add_inclusion_tracking(part_definitions, "$" , false ) {
540
507
541
508
test_builds:
@@ -779,7 +746,7 @@ local composition_environment = utils.add_inclusion_tracking(part_definitions, "
779
746
$.<group_name>.<part_name>
780
747
- Each part is included in a build at most once. A helper function is
781
748
checking it and will raise an error otherwise with a message
782
- `Parts ["$.use.maven ", "$.use.maven "] are used more than once in build: ruby-metrics-svm-graal-core. ...`
749
+ `Parts ["$.use.build ", "$.use.build "] are used more than once in build: ruby-metrics-svm-graal-core. ...`
783
750
- All parts have to be disjoint and distinct.
784
751
- All parts have to be compose-able with each other. Therefore all fields
785
752
like setup or run should end with '+' to avoid overriding.
0 commit comments