Skip to content

Commit 8f6edf5

Browse files
committed
[GR-23849] Run gates on the imported revision of graal.
PullRequest: js/1511
2 parents 3359598 + ddc7878 commit 8f6edf5

File tree

6 files changed

+146
-162
lines changed

6 files changed

+146
-162
lines changed

ci.jsonnet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ local common = import 'common.jsonnet';
66
// Used to run fewer jobs
77
local debug = false,
88

9-
local overlay = '9255f3dca769551fd2224cb4e7e80704e1fdb60d',
9+
local overlay = 'c48d42b13ed07d9bc45ea8cd4d6d6f85c9ff2370',
1010

1111
local no_overlay = 'cb733e564850cd37b685fcef6f3c16b59802b22c',
1212

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: 43 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +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,
9-
JDT: {name: 'ecj', version: '4.14.0', platformspecific: false},
6+
JAVA_HOME: jdks.oraclejdk8,
107
},
118
},
129

1310
jdk11: {
1411
downloads+: {
15-
JAVA_HOME: labsjdk_ce_11,
12+
JAVA_HOME: jdks["labsjdk-ce-11"],
1613
},
1714
},
1815

@@ -107,4 +104,43 @@
107104
msvc : '==10.0',
108105
},
109106
},
107+
108+
local gateCmd = ['mx', '--strict-compliance', 'gate', '-B=--force-deprecation-as-warning', '--strict-mode', '--tags', '${TAGS}'],
109+
110+
eclipse : {
111+
downloads+: {
112+
ECLIPSE: {name: 'eclipse', version: '4.14.0', platformspecific: true},
113+
JDT: {name: 'ecj', version: '4.14.0', platformspecific: false},
114+
},
115+
environment+: {
116+
ECLIPSE_EXE: '$ECLIPSE/eclipse',
117+
},
118+
},
119+
120+
build : {
121+
run+: [
122+
['mx', 'build', '--force-javac'],
123+
],
124+
},
125+
126+
buildCompiler : {
127+
run+: [
128+
['mx', '--dynamicimports', '/compiler', 'build', '--force-javac'],
129+
],
130+
},
131+
132+
gateTags : self.build + {
133+
run+: [
134+
gateCmd,
135+
],
136+
timelimit: '30:00',
137+
},
138+
139+
gateStyleFullBuild : self.eclipse + {
140+
run+: [
141+
['set-export', 'TAGS', 'style,fullbuild'],
142+
gateCmd,
143+
],
144+
timelimit: '30:00',
145+
},
110146
}

graal-js/ci.jsonnet

Lines changed: 25 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -4,63 +4,21 @@ local common = import '../common.jsonnet';
44
local graalJs = {
55
setup: [
66
['cd', 'graal-js'],
7-
],
8-
},
9-
10-
local gateCmd = ['mx', '--strict-compliance', 'gate', '-B=--force-deprecation-as-warning', '--strict-mode', '--tags', '${GATE_TAGS}'],
11-
12-
local gateGraalImport = {
13-
downloads+: {
14-
ECLIPSE: {name: 'eclipse', version: '4.14.0', platformspecific: true},
15-
},
16-
environment+: {
17-
ECLIPSE_EXE: '$ECLIPSE/eclipse',
18-
},
19-
setup+: [
207
['mx', 'sversions'],
218
],
22-
run+: [
23-
gateCmd,
24-
],
25-
timelimit: '15:00',
269
},
2710

28-
local gateCoverage = {
29-
downloads+: {
30-
ECLIPSE: {name: 'eclipse', version: '4.14.0', platformspecific: true},
31-
},
32-
environment+: {
33-
ECLIPSE_EXE: '$ECLIPSE/eclipse',
34-
},
35-
setup+: [
36-
['mx', 'sversions'],
37-
],
11+
local gateCoverage = common.eclipse + {
3812
run+: [
3913
['set-export', 'GRAALJS_HOME', ['pwd']],
40-
['mx', '--jacoco-whitelist-package', 'com.oracle.js.parser', '--jacoco-whitelist-package', 'com.oracle.truffle.js', '--jacoco-exclude-annotation', '@GeneratedBy', '--jacoco-dest-file', '${GRAALJS_HOME}/jacoco.exec', '--strict-compliance', 'gate', '-B=--force-deprecation-as-warning', '--strict-mode', '--tags', '${GATE_TAGS}', '--jacocout', 'html'],
41-
['mx', '--jacoco-whitelist-package', 'com.oracle.js.parser', '--jacoco-whitelist-package', 'com.oracle.truffle.js', '--jacoco-exclude-annotation', '@GeneratedBy', '--jacoco-dest-file', '${GRAALJS_HOME}/jacoco.exec', 'sonarqube-upload', "-Dsonar.host.url=$SONAR_HOST_URL", "-Dsonar.projectKey=com.oracle.graalvm.js", "-Dsonar.projectName=GraalVM - JS", '--exclude-generated'],
14+
['mx', '--jacoco-whitelist-package', 'com.oracle.js.parser', '--jacoco-whitelist-package', 'com.oracle.truffle.js', '--jacoco-exclude-annotation', '@GeneratedBy', '--jacoco-dest-file', '${GRAALJS_HOME}/jacoco.exec', '--strict-compliance', 'gate', '-B=--force-deprecation-as-warning', '--strict-mode', '--tags', '${TAGS}', '--jacocout', 'html'],
15+
['mx', '--jacoco-whitelist-package', 'com.oracle.js.parser', '--jacoco-whitelist-package', 'com.oracle.truffle.js', '--jacoco-exclude-annotation', '@GeneratedBy', '--jacoco-dest-file', '${GRAALJS_HOME}/jacoco.exec', 'sonarqube-upload', '-Dsonar.host.url=$SONAR_HOST_URL', '-Dsonar.projectKey=com.oracle.graalvm.js', '-Dsonar.projectName=GraalVM - JS', '--exclude-generated'],
4216
['mx', '--jacoco-whitelist-package', 'com.oracle.js.parser', '--jacoco-whitelist-package', 'com.oracle.truffle.js', '--jacoco-exclude-annotation', '@GeneratedBy', '--jacoco-dest-file', '${GRAALJS_HOME}/jacoco.exec', 'coverage-upload']
4317
],
4418
timelimit: '30:00',
4519
},
4620

47-
local graalTip = {
48-
setup+: [
49-
['git', 'clone', '--depth', '1', ['mx', 'urlrewrite', 'https://github.com/graalvm/graal.git'], '../../graal'],
50-
['mx', 'sversions'],
51-
],
52-
timelimit: '30:00',
53-
},
54-
55-
local gateGraalTip = graalTip + {
56-
run+: [
57-
['mx', 'build', '--force-javac'],
58-
gateCmd,
59-
],
60-
timelimit: '30:00',
61-
},
62-
63-
local nativeImageGraalTip = graalTip + {
21+
local nativeImageSmokeTest = {
6422
local baseNativeImageCmd = ['mx', '--dynamicimports', '/substratevm', '--native-images=js'],
6523
run+: [
6624
['git', 'clone', '--depth', '1', ['mx', 'urlrewrite', 'https://github.com/graalvm/js-benchmarks.git'], '../../js-benchmarks'],
@@ -71,13 +29,6 @@ local common = import '../common.jsonnet';
7129
],
7230
},
7331

74-
local benchmarkGraalTip = graalTip + {
75-
run+: [
76-
['mx', '--dynamicimports', '/compiler', 'build', '--force-javac'],
77-
],
78-
timelimit: '30:00',
79-
},
80-
8132
local mavenDeployDryRun = {
8233
run+: [
8334
['mx', 'build'],
@@ -92,48 +43,48 @@ local common = import '../common.jsonnet';
9243
timelimit: '10:00',
9344
},
9445

95-
local interopJmhBenchmarks = {
46+
local interopJmhBenchmarks = common.buildCompiler + {
9647
run+: [
97-
["mx", "--dynamicimports", "/compiler", "--kill-with-sigquit", "benchmark", "--results-file", "bench-results.json", "js-interop-jmh:JS_INTEROP_MICRO_BENCHMARKS", "--", "-Dgraal.TraceTruffleCompilation=true"],
48+
['mx', '--dynamicimports', '/compiler', '--kill-with-sigquit', 'benchmark', '--results-file', 'bench-results.json', 'js-interop-jmh:JS_INTEROP_MICRO_BENCHMARKS', '--', '-Dgraal.TraceTruffleCompilation=true'],
9849
['bench-uploader.py', 'bench-results.json'],
9950
],
10051
timelimit: '30:00',
10152
},
10253

10354
builds: [
10455
// jdk 8 - linux
105-
graalJs + common.jdk8 + common.gate + common.linux + gateGraalImport + {environment+: {GATE_TAGS: 'style,fullbuild'}} + {name: 'js-gate-style-fullbuild-graal-import-jdk8-linux-amd64'},
106-
graalJs + common.jdk8 + common.gate + common.linux + gateGraalTip + {environment+: {GATE_TAGS: 'default'}} + {name: 'js-gate-default-graal-tip-jdk8-linux-amd64'},
107-
graalJs + common.jdk8 + common.gate + common.linux + gateGraalTip + {environment+: {GATE_TAGS: 'noic'}} + {name: 'js-gate-noic-graal-tip-jdk8-linux-amd64'},
108-
graalJs + common.jdk8 + common.gate + common.linux + gateGraalTip + {environment+: {GATE_TAGS: 'directbytebuffer'}} + {name: 'js-gate-directbytebuffer-graal-tip-jdk8-linux-amd64'},
109-
graalJs + common.jdk8 + common.gate + common.linux + gateGraalTip + {environment+: {GATE_TAGS: 'cloneuninitialized'}} + {name: 'js-gate-cloneuninitialized-graal-tip-jdk8-linux-amd64'},
110-
graalJs + common.jdk8 + common.gate + common.linux + gateGraalTip + {environment+: {GATE_TAGS: 'lazytranslation'}} + {name: 'js-gate-lazytranslation-graal-tip-jdk8-linux-amd64'},
111-
graalJs + common.jdk8 + common.gate + common.linux + gateGraalTip + {environment+: {GATE_TAGS: 'shareengine'}} + {name: 'js-gate-shareengine-graal-tip-jdk8-linux-amd64'},
112-
graalJs + common.jdk8 + common.gate + common.linux + gateGraalTip + {environment+: {GATE_TAGS: 'latestesversion'}} + {name: 'js-gate-latestesversion-graal-tip-jdk8-linux-amd64'},
113-
graalJs + common.jdk8 + common.gate + common.linux + gateGraalImport + {environment+: {GATE_TAGS: 'tck,build'}} + {name: 'js-gate-tck-build-graal-import-jdk8-linux-amd64'},
114-
graalJs + common.jdk8 + common.gate + common.linux + nativeImageGraalTip + {name: 'js-gate-native-image-graal-tip-jdk8-linux-amd64'},
56+
graalJs + common.jdk8 + common.gate + common.linux + common.gateStyleFullBuild + {name: 'js-gate-style-fullbuild-jdk8-linux-amd64'},
57+
graalJs + common.jdk8 + common.gate + common.linux + common.gateTags + {environment+: {TAGS: 'default'}} + {name: 'js-gate-default-jdk8-linux-amd64'},
58+
graalJs + common.jdk8 + common.gate + common.linux + common.gateTags + {environment+: {TAGS: 'noic'}} + {name: 'js-gate-noic-jdk8-linux-amd64'},
59+
graalJs + common.jdk8 + common.gate + common.linux + common.gateTags + {environment+: {TAGS: 'directbytebuffer'}} + {name: 'js-gate-directbytebuffer-jdk8-linux-amd64'},
60+
graalJs + common.jdk8 + common.gate + common.linux + common.gateTags + {environment+: {TAGS: 'cloneuninitialized'}} + {name: 'js-gate-cloneuninitialized-jdk8-linux-amd64'},
61+
graalJs + common.jdk8 + common.gate + common.linux + common.gateTags + {environment+: {TAGS: 'lazytranslation'}} + {name: 'js-gate-lazytranslation-jdk8-linux-amd64'},
62+
graalJs + common.jdk8 + common.gate + common.linux + common.gateTags + {environment+: {TAGS: 'shareengine'}} + {name: 'js-gate-shareengine-jdk8-linux-amd64'},
63+
graalJs + common.jdk8 + common.gate + common.linux + common.gateTags + {environment+: {TAGS: 'latestversion'}} + {name: 'js-gate-latestversion-jdk8-linux-amd64'},
64+
graalJs + common.jdk8 + common.gate + common.linux + common.gateTags + {environment+: {TAGS: 'tck'}} + {name: 'js-gate-tck-jdk8-linux-amd64'},
65+
graalJs + common.jdk8 + common.gate + common.linux + nativeImageSmokeTest + {name: 'js-gate-native-image-smoke-test-jdk8-linux-amd64'},
11566

11667
// jdk 8 - coverage
117-
graalJs + common.jdk8 + common.weekly + common.linux + gateCoverage + {environment+: {GATE_TAGS: 'build,default,tck'}} + {name: 'js-coverage-jdk8-linux-amd64'},
68+
graalJs + common.jdk8 + common.weekly + common.linux + gateCoverage + {environment+: {TAGS: 'build,default,tck'}} + {name: 'js-coverage-jdk8-linux-amd64'},
11869

11970
// jdk 8 - windows
120-
graalJs + common.jdk8 + common.gate + common.windows_vs2010 + gateGraalTip + {environment+: {GATE_TAGS: 'Test262-default'}} + {name: 'js-gate-test262-default-graal-tip-jdk8-windows-amd64'},
71+
graalJs + common.jdk8 + common.gate + common.windows_vs2010 + common.gateTags + {environment+: {TAGS: 'Test262-default'}} + {name: 'js-gate-test262-default-jdk8-windows-amd64'},
12172

12273
// jdk 8 - sparc
123-
graalJs + common.jdk8 + common.gate + common.sparc + gateGraalTip + {environment+: {GATE_TAGS: 'default'}} + {name: 'js-gate-default-graal-tip-jdk8-solaris-sparcv9'},
74+
graalJs + common.jdk8 + common.gate + common.sparc + common.gateTags + {environment+: {TAGS: 'default'}} + {name: 'js-gate-default-jdk8-solaris-sparcv9'},
12475

12576
// jdk 11 - linux
126-
graalJs + common.jdk11 + common.gate + common.linux + gateGraalImport + {environment+: {GATE_TAGS: 'style,fullbuild'}} + {name: 'js-gate-style-fullbuild-graal-import-jdk11-linux-amd64'},
127-
graalJs + common.jdk11 + common.gate + common.linux + gateGraalTip + {environment+: {GATE_TAGS: 'default'}} + {name: 'js-gate-default-graal-tip-jdk11-linux-amd64'},
128-
graalJs + common.jdk11 + common.gate + common.linux + mavenDeployDryRun + {name: 'js-gate-maven-dry-run-jdk11-linux-amd64'},
77+
graalJs + common.jdk11 + common.gate + common.linux + common.gateStyleFullBuild + {name: 'js-gate-style-fullbuild-jdk11-linux-amd64'},
78+
graalJs + common.jdk11 + common.gate + common.linux + common.gateTags + {environment+: {TAGS: 'default'}} + {name: 'js-gate-default-jdk11-linux-amd64'},
79+
graalJs + common.jdk11 + common.gate + common.linux + mavenDeployDryRun + {name: 'js-gate-maven-dry-run-jdk11-linux-amd64'},
12980

13081
// jdk 11 - linux aarch64
131-
graalJs + common.jdk11 + common.gate + common.linux_aarch64 + gateGraalTip + {environment+: {GATE_TAGS: 'default'}} + {name: 'js-gate-default-graal-tip-jdk11-linux-aarch64'},
82+
graalJs + common.jdk11 + common.gate + common.linux_aarch64 + common.gateTags + {environment+: {TAGS: 'default'}} + {name: 'js-gate-default-jdk11-linux-aarch64'},
13283

13384
// jdk 11 - windows
134-
graalJs + common.jdk11 + common.gate + common.windows + gateGraalTip + {environment+: {GATE_TAGS: 'Test262-default'}} + {name: 'js-gate-test262-default-graal-tip-jdk11-windows-amd64'},
85+
graalJs + common.jdk11 + common.gate + common.windows + common.gateTags + {environment+: {TAGS: 'Test262-default'}} + {name: 'js-gate-test262-default-jdk11-windows-amd64'},
13586

13687
// interop benchmarks
137-
graalJs + common.jdk8 + common.bench + common.x52 + benchmarkGraalTip + interopJmhBenchmarks + {name: 'js-interop-jmh-bechmarks-jdk8-x52'},
88+
graalJs + common.jdk8 + common.bench + common.x52 + interopJmhBenchmarks + {name: 'js-bench-interop-jmh-jdk8-linux-amd64'},
13889
],
13990
}

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)