1
+ #
2
+ # Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
3
+ # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
+ #
5
+ # The Universal Permissive License (UPL), Version 1.0
6
+ #
7
+ # Subject to the condition set forth below, permission is hereby granted to any
8
+ # person obtaining a copy of this software, associated documentation and/or
9
+ # data (collectively the "Software"), free of charge and under any and all
10
+ # copyright rights in the Software, and any and all patent rights owned or
11
+ # freely licensable by each licensor hereunder covering either (i) the
12
+ # unmodified Software as contributed to or provided by such licensor, or (ii)
13
+ # the Larger Works (as defined below), to deal in both
14
+ #
15
+ # (a) the Software, and
16
+ #
17
+ # (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if
18
+ # one is included with the Software each a "Larger Work" to which the Software
19
+ # is contributed by such licensors),
20
+ #
21
+ # without restriction, including without limitation the rights to copy, create
22
+ # derivative works of, display, perform, and distribute the Software and make,
23
+ # use, sell, offer for sale, import, export, have made, and have sold the
24
+ # Software and the Larger Work(s), and to sublicense the foregoing rights on
25
+ # either these or other terms.
26
+ #
27
+ # This license is subject to the following condition:
28
+ #
29
+ # The above copyright notice and either this complete permission notice or at a
30
+ # minimum a reference to the UPL must be included in all copies or substantial
31
+ # portions of the Software.
32
+ #
33
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
34
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
35
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
36
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
37
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
38
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
39
+ # SOFTWARE.
40
+ #
1
41
name : GraalVM Gate
2
42
3
43
on :
@@ -37,19 +77,21 @@ concurrency:
37
77
38
78
env :
39
79
JAVA_HOME : ${{ github.workspace }}/jdk
40
- JDT : builtin
41
80
LANG : en_US.UTF-8
42
81
MX_GIT_CACHE : refcache
43
82
MX_PATH : ${{ github.workspace }}/mx
44
83
MX_PYTHON : python3.8
84
+ # Enforce experimental option checking in CI (GR-47922)
85
+ NATIVE_IMAGE_EXPERIMENTAL_OPTIONS_ARE_FATAL : " true"
45
86
46
87
permissions :
47
88
contents : read # to fetch code (actions/checkout)
48
89
49
90
jobs :
50
- build-graalvm :
91
+ build-graalvm-linux :
51
92
name : /${{ matrix.env.PRIMARY }} ${{ matrix.env.GATE_TAGS }} JDK${{ matrix.env.JDK_VERSION }}
52
93
runs-on : ubuntu-20.04
94
+ timeout-minutes : 60
53
95
strategy :
54
96
fail-fast : false
55
97
matrix :
60
102
GATE_TAGS : " style,fullbuild,test"
61
103
PRIMARY : " compiler"
62
104
- env :
63
- JDK_VERSION : " 21 "
105
+ JDK_VERSION : " latest "
64
106
GATE_TAGS : " build,bootstraplite"
65
107
PRIMARY : " compiler"
66
108
# /espresso
@@ -74,16 +116,16 @@ jobs:
74
116
GATE_TAGS : " style,fullbuild"
75
117
PRIMARY : " substratevm"
76
118
- env :
77
- JDK_VERSION : " 21 "
119
+ JDK_VERSION : " latest "
78
120
GATE_TAGS : " build,helloworld,native_unittests"
79
121
PRIMARY : " substratevm"
80
122
PIP_PACKAGES : " jsonschema==4.6.1"
81
123
- env :
82
- JDK_VERSION : " 21 "
124
+ JDK_VERSION : " latest "
83
125
GATE_TAGS : " build,debuginfotest"
84
126
PRIMARY : " substratevm"
85
127
- env :
86
- JDK_VERSION : " 21 "
128
+ JDK_VERSION : " latest "
87
129
GATE_TAGS : " hellomodule"
88
130
PRIMARY : " substratevm"
89
131
# /sulong
98
140
PRIMARY : " truffle"
99
141
# /vm
100
142
- env :
101
- JDK_VERSION : " 21 "
143
+ JDK_VERSION : " latest "
102
144
GATE_TAGS : " build,sulong"
103
145
GATE_OPTS : " --no-warning-as-error"
104
146
PRIMARY : " vm"
@@ -107,37 +149,37 @@ jobs:
107
149
DISABLE_POLYGLOT : true
108
150
DISABLE_LIBPOLYGLOT : true
109
151
- env :
110
- JDK_VERSION : " 21 "
152
+ JDK_VERSION : " latest "
111
153
GATE_TAGS : " build"
112
154
GATE_OPTS : " --no-warning-as-error"
113
155
PRIMARY : " vm"
114
156
DYNAMIC_IMPORTS : " /tools,/substratevm,/sulong"
115
157
NATIVE_IMAGES : " lib:jvmcicompiler,native-image,lib:native-image-agent,lib:native-image-diagnostics-agent,polyglot"
116
158
WITHOUT_VCS : true
117
159
env :
160
+ JDT : builtin # Compile with ECJ (and javac) as part of gate runs tagged with 'fullbuild'
118
161
MX_RUNS_DEBUG : ${{ contains(matrix.env.GATE_TAGS, 'debug') || matrix.env.GATE_TAGS == '' }}
119
162
MX_RUNS_STYLE : ${{ contains(matrix.env.GATE_TAGS, 'style') || matrix.env.GATE_TAGS == '' }}
120
163
steps :
121
164
- name : Checkout oracle/graal
122
- uses : actions/checkout@v3
165
+ uses : actions/checkout@v4
123
166
with :
124
167
ref : ${{ github.ref }} # Lock ref to current branch to avoid fetching others
125
168
fetch-depth : " ${{ env.MX_RUNS_STYLE && '0' || '1' }}" # The style gate needs the full commit history for checking copyright years
126
169
- name : Determine mx version
127
170
run : echo "MX_VERSION=$(jq -r '.mx_version' common.json)" >> ${GITHUB_ENV}
128
171
- name : Checkout graalvm/mx
129
- uses : actions/checkout@v3
172
+ uses : actions/checkout@v4
130
173
with :
131
174
repository : graalvm/mx.git
132
175
ref : ${{ env.MX_VERSION }}
133
- fetch-depth : 1
134
176
path : ${{ env.MX_PATH }}
135
177
- name : Set up Python
136
- uses : actions/setup-python@v4
178
+ uses : actions/setup-python@v5
137
179
with :
138
180
python-version : ' 3.8'
139
181
- name : Update mx cache
140
- uses : actions/cache@v3
182
+ uses : actions/cache@v4
141
183
with :
142
184
path : ~/.mx
143
185
key : ${{ runner.os }}-mx-${{ hashFiles('**/suite.py') }}
@@ -157,9 +199,7 @@ jobs:
157
199
if : ${{ env.MX_RUNS_STYLE == 'true' }}
158
200
run : |
159
201
sudo apt install python3-pip python-setuptools
160
- sudo pip install ninja_syntax$(jq -r '.pip.ninja_syntax' common.json)
161
- sudo pip install lazy-object-proxy$(jq -r '.pip["lazy-object-proxy"]' common.json)
162
- sudo pip install pylint$(jq -r '.pip.pylint' common.json)
202
+ sudo pip install $(jq -r '[.pip | to_entries[] | join("")] | join(" ")' common.json)
163
203
- name : Install additional pip packages
164
204
if : ${{ matrix.env.PIP_PACKAGES != '' }}
165
205
run : ${MX_PYTHON} -m pip install ${{ matrix.env.PIP_PACKAGES }}
@@ -183,3 +223,48 @@ jobs:
183
223
env : ${{ matrix.env }}
184
224
run : ${MX_PATH}/mx --primary-suite-path ${PRIMARY} --java-home=${JAVA_HOME} gate --strict-mode ${{ matrix.env.GATE_OPTS }}
185
225
if : ${{ matrix.env.GATE_TAGS == '' }}
226
+ build-graalvm-windows :
227
+ name : /substratevm on Windows
228
+ runs-on : windows-2022
229
+ timeout-minutes : 60
230
+ env :
231
+ MX_PYTHON : ' python'
232
+ steps :
233
+ - name : Checkout oracle/graal
234
+ uses : actions/checkout@v4
235
+ with :
236
+ ref : ${{ github.ref }} # Lock ref to current branch to avoid fetching others
237
+ - name : Determine mx version
238
+ shell : bash
239
+ run : echo "MX_VERSION=$(jq -r '.mx_version' common.json)" >> ${GITHUB_ENV}
240
+ - name : Checkout graalvm/mx
241
+ uses : actions/checkout@v4
242
+ with :
243
+ repository : graalvm/mx.git
244
+ ref : ${{ env.MX_VERSION }}
245
+ path : ${{ env.MX_PATH }}
246
+ - name : Set up Python
247
+ uses : actions/setup-python@v5
248
+ with :
249
+ python-version : ' 3.8'
250
+ - name : Fetch LabsJDK
251
+ shell : bash
252
+ run : |
253
+ mkdir jdk-dl
254
+ ${MX_PATH}/mx --java-home= fetch-jdk --jdk-id labsjdk-ce-latest --to jdk-dl --alias ${JAVA_HOME}
255
+ - name : Build GraalVM via cmd.exe
256
+ shell : cmd
257
+ run : |
258
+ call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
259
+ call ${{ env.MX_PATH }}\mx.cmd -p substratevm --native-images=native-image --components="Native Image" build
260
+ call ${{ env.MX_PATH }}\mx.cmd -p substratevm --native-images=native-image --components="Native Image" graalvm-home > graalvm-home-with-forward-slashes.txt
261
+ set /p GRAALVM_HOME=<graalvm-home-with-forward-slashes.txt
262
+ setlocal enabledelayedexpansion
263
+ set "GRAALVM_HOME=%GRAALVM_HOME:/=\%"
264
+ echo %GRAALVM_HOME%\bin>>%GITHUB_PATH%
265
+ echo GRAALVM_HOME=%GRAALVM_HOME%>>%GITHUB_ENV%
266
+ - name : Test GraalVM
267
+ run : |
268
+ native-image --version
269
+ native-image -m jdk.httpserver
270
+
0 commit comments