Skip to content

Commit ddc7878

Browse files
committed
Import JDK definitions from the common ci file of graal.
1 parent 5e57fb1 commit ddc7878

File tree

3 files changed

+45
-7
lines changed

3 files changed

+45
-7
lines changed

common.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"README": "This file contains definitions that are useful for the hocon and jsonnet CI files of multiple repositories.",
3+
4+
"jdks": {
5+
"oraclejdk8": {"name": "oraclejdk", "version": "8u251+08-jvmci-20.2-b02", "platformspecific": true },
6+
"openjdk8": {"name": "openjdk", "version": "8u252+09-jvmci-20.2-b02", "platformspecific": true },
7+
"oraclejdk8Debug": {"name": "oraclejdk", "version": "8u251+08-jvmci-20.2-b02-fastdebug", "platformspecific": true },
8+
"oraclejdk11": {"name": "oraclejdk", "version": "11.0.6+8", "platformspecific": true },
9+
"oraclejdk15": {"name": "oraclejdk", "version": "15+27", "platformspecific": true },
10+
"openjdk11": {"name": "openjdk", "version": "11.0.3+7", "platformspecific": true },
11+
"labsjdk-ce-11": {"name": "labsjdk", "version": "ce-11.0.7+10-jvmci-20.2-b02", "platformspecific": true },
12+
"labsjdk-ee-11": {"name": "labsjdk", "version": "ee-11.0.7+8-jvmci-20.2-b02", "platformspecific": true }
13+
},
14+
15+
"sulong": {
16+
"deps": {
17+
"linux": {
18+
"packages": {
19+
"cmake": "==3.15.2"
20+
}
21+
},
22+
"darwin": {
23+
"packages": {
24+
"cmake": "==3.15.2"
25+
}
26+
}
27+
}
28+
}
29+
}

common.jsonnet

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
1-
{
2-
local labsjdk8 = {name: 'oraclejdk', version: '8u251+08-jvmci-20.2-b02', platformspecific: true},
3-
4-
local labsjdk_ce_11 = {name : 'labsjdk', version : 'ce-11.0.7+10-jvmci-20.2-b02', platformspecific: true},
1+
local jdks = (import "common.json").jdks;
52

3+
{
64
jdk8: {
75
downloads+: {
8-
JAVA_HOME: labsjdk8,
6+
JAVA_HOME: jdks.oraclejdk8,
97
},
108
},
119

1210
jdk11: {
1311
downloads+: {
14-
JAVA_HOME: labsjdk_ce_11,
12+
JAVA_HOME: jdks["labsjdk-ce-11"],
1513
},
1614
},
1715

graal-js/mx.graal-js/mx_graal_js.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
import mx_graal_js_benchmark
3333
import mx, mx_sdk
34-
from mx_gate import Task, add_gate_runner
34+
from mx_gate import Tags, Task, add_gate_runner, prepend_gate_runner
3535
from mx_unittest import unittest
3636

3737
_suite = mx.suite('graal-js')
@@ -41,6 +41,11 @@ class GraalJsDefaultTags:
4141
tck = 'tck'
4242
all = 'all'
4343

44+
def _graal_js_pre_gate_runner(args, tasks):
45+
with Task('CI Setup Check', tasks, tags=[Tags.style]) as t:
46+
if t:
47+
mx.command_function('verify-ci')([])
48+
4449
def _graal_js_gate_runner(args, tasks):
4550
with Task('CheckCopyrights', tasks, tags=['style']) as t:
4651
if t:
@@ -86,6 +91,7 @@ def _graal_js_gate_runner(args, tasks):
8691
import mx_truffle
8792
mx_truffle._tck([])
8893

94+
prepend_gate_runner(_suite, _graal_js_pre_gate_runner)
8995
add_gate_runner(_suite, _graal_js_gate_runner)
9096

9197
class ArchiveProject(mx.ArchivableProject):
@@ -313,11 +319,16 @@ def is_included(path):
313319
boot_jars=['graal-js:GRAALJS_SCRIPTENGINE'],
314320
))
315321

322+
def verify_ci(args):
323+
"""Verify CI configuration"""
324+
mx.verify_ci(args, mx.suite('regex'), _suite, 'common.json')
325+
316326
mx.update_commands(_suite, {
317327
'deploy-binary-if-master' : [deploy_binary_if_master, ''],
318328
'js' : [js, '[JS args|VM options]'],
319329
'nashorn' : [nashorn, '[JS args|VM options]'],
320330
'test262': [test262, ''],
321331
'testnashorn': [testnashorn, ''],
322332
'testv8': [testv8, ''],
333+
'verify-ci': [verify_ci, ''],
323334
})

0 commit comments

Comments
 (0)