Skip to content

Commit ade1417

Browse files
committed
[GR-18553] Use JDK versions from the common.json file from the graal repository
* Check in CI that common.json is up to date with the import.
1 parent 8fbc25d commit ade1417

File tree

4 files changed

+26
-19
lines changed

4 files changed

+26
-19
lines changed

ci.jsonnet

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ local restrict_builds_to = [];
2020
# and it would still work.
2121
local utils = import "utils.libsonnet";
2222

23+
local jdks = (import "common.json").jdks;
24+
2325
# All builds are composed **directly** from **independent disjunct composable**
2426
# jsonnet objects defined in here. Use `+:` to make the objects or arrays
2527
# stored in fields composable, see http://jsonnet.org/docs/tutorial.html#oo.
@@ -211,33 +213,20 @@ local part_definitions = {
211213

212214
v8: with_path {
213215
downloads+: {
214-
JAVA_HOME: {
215-
name: "oraclejdk",
216-
# Update the openjdk8 version too below when updating this one
217-
version: "8u231-jvmci-19.3-b05",
218-
platformspecific: true,
219-
},
216+
JAVA_HOME: jdks.oraclejdk8,
220217
},
221218
},
222219

223220
# For `jt install jvmci`, verify that `jt install jvmci` still works when changing the version
224221
openjdk8: with_path {
225222
downloads+: {
226-
JAVA_HOME: {
227-
name: "openjdk",
228-
version: "8u232-jvmci-19.3-b05",
229-
platformspecific: true,
230-
},
223+
JAVA_HOME: jdks.openjdk8,
231224
},
232225
},
233226

234227
v11: with_path {
235228
downloads+: {
236-
JAVA_HOME: {
237-
name: "labsjdk",
238-
version: "ce-11.0.5+10-jvmci-19.3-b05",
239-
platformspecific: true,
240-
},
229+
JAVA_HOME: jdks["labsjdk-ce-11"],
241230
},
242231
},
243232
},

common.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"jdks": {
3+
"oraclejdk8": {"name": "oraclejdk", "version": "8u231-jvmci-19.3-b06", "platformspecific": true },
4+
"openjdk8": {"name": "openjdk", "version": "8u232-jvmci-19.3-b06", "platformspecific": true },
5+
"oraclejdk8Debug": {"name": "oraclejdk", "version": "8u231-jvmci-19.3-b06-fastdebug", "platformspecific": true },
6+
"oraclejdk11": {"name": "oraclejdk", "version": "11.0.3+12", "platformspecific": true },
7+
"openjdk11": {"name": "openjdk", "version": "11.0.3+7", "platformspecific": true },
8+
"labsjdk-ce-11": {"name": "labsjdk", "version": "ce-11.0.5+10-jvmci-19.3-b06", "platformspecific": true },
9+
"labsjdk-ee-11": {"name": "labsjdk", "version": "ee-11.0.5+10-jvmci-19.3-b06", "platformspecific": true }
10+
}
11+
}

mx.truffleruby/mx_truffleruby.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,10 @@ def ruby_testdownstream_sulong(args):
108108
jt('test', 'cexts')
109109
jt('test', 'bundle')
110110

111+
def verify_ci(args):
112+
"""Verify CI configuration"""
113+
mx.verify_ci(args, mx.suite('truffle'), _suite, 'common.json')
114+
111115
mx_sdk.register_graalvm_component(mx_sdk.GraalVmLanguage(
112116
suite=_suite,
113117
name='TruffleRuby license files',
@@ -185,4 +189,5 @@ def ruby_testdownstream_sulong(args):
185189
'ruby_testdownstream_aot': [ruby_testdownstream_aot, 'aot_bin'],
186190
'ruby_testdownstream_hello': [ruby_testdownstream_hello, ''],
187191
'ruby_testdownstream_sulong': [ruby_testdownstream_sulong, ''],
192+
'verify-ci' : [verify_ci, '[options]'],
188193
})

tool/jt.rb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,9 @@ def jvmci_update_and_version
144144
raise 'Could not parse JDK update and JVMCI version from $JVMCI_VERSION'
145145
end
146146
else
147-
ci = File.read("#{TRUFFLERUBY_DIR}/ci.jsonnet")
148-
unless /JAVA_HOME: \{\n\s*name: "openjdk",\n\s*version: "8u(\d+)-(jvmci-.+)",/ =~ ci
149-
raise 'JVMCI version not found in ci.jsonnet'
147+
ci = File.read("#{TRUFFLERUBY_DIR}/common.json")
148+
unless /{\s*"name"\s*:\s*"openjdk"\s*,\s*"version"\s*:\s*"8u(\d+)-(jvmci-[^"]+)"\s*,/ =~ ci
149+
raise 'JVMCI version not found in jdks.json'
150150
end
151151
end
152152
update, jvmci = $1, $2
@@ -2147,6 +2147,8 @@ def lint
21472147
# - building with jdt in the ci definition could be dropped since fullbuild builds with JDT
21482148
mx 'spotbugs'
21492149

2150+
mx 'verify-ci'
2151+
21502152
check_parser
21512153
check_documentation_urls
21522154
check_license

0 commit comments

Comments
 (0)