forked from oracle/graal
-
Notifications
You must be signed in to change notification settings - Fork 1
/
ci.jsonnet
186 lines (168 loc) · 6.58 KB
/
ci.jsonnet
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
{
local common = import '../common.jsonnet',
local bench_hw = (import '../bench-common.libsonnet').bench_hw,
local devkits = (import "../common.json").devkits,
local darwin_amd64 = common["darwin-amd64"],
local linux_amd64 = common["linux-amd64"],
local windows_amd64 = common["windows-amd64"],
local amd64_jdks = [common.oraclejdk8, common.oraclejdk11, common.oraclejdk17],
local truffle_common = {
setup+: [
["cd", "./truffle"],
],
targets: ["gate"],
timelimit: "30:00",
},
local bench_common = {
environment: {
BENCH_RESULTS_FILE_PATH: "bench-results.json",
MX_PYTHON: "python3",
},
setup: [
["cd", "./compiler"],
["mx", "build" ],
["mx", "hsdis", "||", "true"],
]
},
local truffle_unittest = {
environment+: {
"MX_TEST_RESULTS_PATTERN": "es-XXX.json",
"MX_TEST_RESULT_TAGS": "truffle"
}
},
local gate_lite = truffle_common + {
name: 'gate-truffle-mac-lite-oraclejdk-' + self.jdk_version,
run: [
["mx", "build"],
["mx", "unittest", "--verbose"],
],
},
local sigtest = truffle_common + {
name: 'gate-truffle-sigtest-' + self.jdk_version,
run: [
["mx", "build"],
["mx", "sigtest", "--check", (if self.jdk_version == 8 then "all" else "bin")],
],
},
local simple_tool_maven_project_gate = truffle_common + {
name: 'gate-external-mvn-simpletool-' + self.jdk_version,
packages+: {
maven: "==3.3.9"
},
mx_cmd: ["mx", "-p", "../vm", "--dynamicimports", "/graal-js"],
run+: [
["set-export", "ROOT_DIR", ["pwd"]],
self.mx_cmd + ["build"],
["mkdir", "tmp_mvn_repo"],
["mx", "maven-install", "--repo", "tmp_mvn_repo", "--version-string", self.mx_cmd + ["graalvm-version"]],
["set-export", "JAVA_HOME", self.mx_cmd + ["--quiet", "--no-warning", "graalvm-home"]],
["cd", "external_repos/"],
["python", "populate.py"],
["cd", "simpletool"],
["mvn", "-Dmaven.repo.local=$ROOT_DIR/tmp_mvn_repo", "package"],
["./simpletool", "js", "example.js"],
],
},
local simple_language_maven_project_gate = truffle_common + {
name: 'gate-external-mvn-simplelanguage-' + self.jdk_version,
packages+: {
maven: "==3.3.9",
devtoolset: "==7", # GCC 7.3.1, make 4.2.1, binutils 2.28, valgrind 3.13.0
binutils: ">=2.34",
ruby: ">=2.1.0",
},
mx_cmd: ["mx", "-p", "../vm", "--dynamicimports", "/substratevm", "--native-images=none"],
run+: [
["set-export", "ROOT_DIR", ["pwd"]],
self.mx_cmd + ["build"],
["mkdir", "tmp_mvn_repo"],
["mx", "maven-install", "--all-suites", "--repo", "tmp_mvn_repo", "--version-string", self.mx_cmd + ["graalvm-version"]],
["set-export", "JAVA_HOME", self.mx_cmd + ["--quiet", "--no-warning", "graalvm-home"]],
["cd", "external_repos"],
["python", "populate.py"],
["cd", "simplelanguage"],
["mvn", "-Dmaven.repo.local=$ROOT_DIR/tmp_mvn_repo", "package"],
["./sl", "language/tests/Add.sl"],
["./sl", "-dump", "language/tests/Add.sl"],
["./sl", "-disassemble", "language/tests/Add.sl"],
["./sl", "language/tests/Add.sl"],
["./native/slnative", "language/tests/Add.sl"],
["$JAVA_HOME/bin/gu", "install", "-L", "component/sl-component.jar"],
["$JAVA_HOME/bin/sl", "language/tests/Add.sl"],
["$JAVA_HOME/bin/slnative", "language/tests/Add.sl"],
["$JAVA_HOME/bin/polyglot", "--jvm", "--language", "sl", "--file", "language/tests/Add.sl"],
["$JAVA_HOME/bin/gu", "remove", "sl"],
],
},
local truffle_gate = truffle_common + common.eclipse + common.jdt + truffle_unittest {
name: 'gate-truffle-oraclejdk-' + self.jdk_version,
run: [["mx", "--strict-compliance", "gate", "--strict-mode"]],
},
local truffle_weekly = common.weekly + {notify_groups:: ["truffle"]},
builds: std.flattenArrays([
[
linux_amd64 + jdk + sigtest,
linux_amd64 + jdk + simple_tool_maven_project_gate,
linux_amd64 + jdk + simple_language_maven_project_gate,
darwin_amd64 + jdk + truffle_weekly + gate_lite,
] for jdk in amd64_jdks
]) + [
linux_amd64 + common.oraclejdk8 + truffle_gate + {timelimit: "45:00"},
linux_amd64 + common.oraclejdk11 + truffle_gate + {environment+: {DISABLE_DSL_STATE_BITS_TESTS: "true"}},
linux_amd64 + common.oraclejdk17 + truffle_gate + {environment+: {DISABLE_DSL_STATE_BITS_TESTS: "true"}},
linux_amd64 + common.oraclejdk11 + truffle_common + {
name: "gate-truffle-javadoc",
run: [
["mx", "build"],
["mx", "javadoc"],
],
},
linux_amd64 + common.oraclejdk11 + truffle_common + truffle_unittest {
name: "gate-truffle-slow-path-unittests",
run: [
["mx", "build", "-n", "-c", "-A-Atruffle.dsl.GenerateSlowPathOnly=true"],
# only those tests exercise meaningfully implemented nodes
# e.g. com.oracle.truffle.api.dsl.test uses nodes that intentionally produce
# different results from fast/slow path specializations to test their activation
["mx", "unittest", "com.oracle.truffle.api.test.polyglot", "com.oracle.truffle.nfi.test"],
],
},
windows_amd64 + common.oraclejdk11 + devkits["windows-jdk11"] + truffle_common + truffle_unittest {
name: "gate-truffle-nfi-windows-11",
# TODO make that a full gate run
# currently, some truffle unittests fail on windows
run: [
["mx", "build" ],
["mx", "unittest", "--verbose" ],
],
},
linux_amd64 + common.oraclejdk11 + truffle_common + common.eclipse + common.jdt + {
name: "weekly-truffle-coverage-11-linux-amd64",
run: [
["mx", "--strict-compliance", "gate", "--strict-mode", "--jacocout", "html"],
["mx", "coverage-upload"],
],
targets: ["weekly"],
},
# BENCHMARKS
bench_hw.x52 + linux_amd64 + common.oraclejdk11 + bench_common + {
name: "bench-truffle-jmh",
notify_groups:: ["truffle_bench"],
run: [
["mx", "--kill-with-sigquit", "benchmark", "--results-file", "${BENCH_RESULTS_FILE_PATH}", "truffle:*", "--", "--", "com.oracle.truffle"],
],
targets+: ["weekly"],
timelimit: "3:00:00",
teardown: [
["bench-uploader.py", "${BENCH_RESULTS_FILE_PATH}"],
],
},
linux_amd64 + common.oraclejdk11 + bench_common + {
name: "gate-truffle-test-benchmarks-11",
run: [
["mx", "benchmark", "truffle:*", "--", "--jvm", "server", "--jvm-config", "graal-core", "--", "com.oracle.truffle", "-f", "1", "-wi", "1", "-w", "1", "-i", "1", "-r", "1"],
],
targets: ["gate"],
},
]
}