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+ #
141name : GraalVM Gate
242
343on :
@@ -37,19 +77,21 @@ concurrency:
3777
3878env :
3979 JAVA_HOME : ${{ github.workspace }}/jdk
40- JDT : builtin
4180 LANG : en_US.UTF-8
4281 MX_GIT_CACHE : refcache
4382 MX_PATH : ${{ github.workspace }}/mx
4483 MX_PYTHON : python3.8
84+ # Enforce experimental option checking in CI (GR-47922)
85+ NATIVE_IMAGE_EXPERIMENTAL_OPTIONS_ARE_FATAL : " true"
4586
4687permissions :
4788 contents : read # to fetch code (actions/checkout)
4889
4990jobs :
50- build-graalvm :
91+ build-graalvm-linux :
5192 name : /${{ matrix.env.PRIMARY }} ${{ matrix.env.GATE_TAGS }} JDK${{ matrix.env.JDK_VERSION }}
5293 runs-on : ubuntu-20.04
94+ timeout-minutes : 60
5395 strategy :
5496 fail-fast : false
5597 matrix :
60102 GATE_TAGS : " style,fullbuild,test"
61103 PRIMARY : " compiler"
62104 - env :
63- JDK_VERSION : " 21 "
105+ JDK_VERSION : " latest "
64106 GATE_TAGS : " build,bootstraplite"
65107 PRIMARY : " compiler"
66108 # /espresso
@@ -74,16 +116,16 @@ jobs:
74116 GATE_TAGS : " style,fullbuild"
75117 PRIMARY : " substratevm"
76118 - env :
77- JDK_VERSION : " 21 "
119+ JDK_VERSION : " latest "
78120 GATE_TAGS : " build,helloworld,native_unittests"
79121 PRIMARY : " substratevm"
80122 PIP_PACKAGES : " jsonschema==4.6.1"
81123 - env :
82- JDK_VERSION : " 21 "
124+ JDK_VERSION : " latest "
83125 GATE_TAGS : " build,debuginfotest"
84126 PRIMARY : " substratevm"
85127 - env :
86- JDK_VERSION : " 21 "
128+ JDK_VERSION : " latest "
87129 GATE_TAGS : " hellomodule"
88130 PRIMARY : " substratevm"
89131 # /sulong
98140 PRIMARY : " truffle"
99141 # /vm
100142 - env :
101- JDK_VERSION : " 21 "
143+ JDK_VERSION : " latest "
102144 GATE_TAGS : " build,sulong"
103145 GATE_OPTS : " --no-warning-as-error"
104146 PRIMARY : " vm"
@@ -107,37 +149,37 @@ jobs:
107149 DISABLE_POLYGLOT : true
108150 DISABLE_LIBPOLYGLOT : true
109151 - env :
110- JDK_VERSION : " 21 "
152+ JDK_VERSION : " latest "
111153 GATE_TAGS : " build"
112154 GATE_OPTS : " --no-warning-as-error"
113155 PRIMARY : " vm"
114156 DYNAMIC_IMPORTS : " /tools,/substratevm,/sulong"
115157 NATIVE_IMAGES : " lib:jvmcicompiler,native-image,lib:native-image-agent,lib:native-image-diagnostics-agent,polyglot"
116158 WITHOUT_VCS : true
117159 env :
160+ JDT : builtin # Compile with ECJ (and javac) as part of gate runs tagged with 'fullbuild'
118161 MX_RUNS_DEBUG : ${{ contains(matrix.env.GATE_TAGS, 'debug') || matrix.env.GATE_TAGS == '' }}
119162 MX_RUNS_STYLE : ${{ contains(matrix.env.GATE_TAGS, 'style') || matrix.env.GATE_TAGS == '' }}
120163 steps :
121164 - name : Checkout oracle/graal
122- uses : actions/checkout@v3
165+ uses : actions/checkout@v4
123166 with :
124167 ref : ${{ github.ref }} # Lock ref to current branch to avoid fetching others
125168 fetch-depth : " ${{ env.MX_RUNS_STYLE && '0' || '1' }}" # The style gate needs the full commit history for checking copyright years
126169 - name : Determine mx version
127170 run : echo "MX_VERSION=$(jq -r '.mx_version' common.json)" >> ${GITHUB_ENV}
128171 - name : Checkout graalvm/mx
129- uses : actions/checkout@v3
172+ uses : actions/checkout@v4
130173 with :
131174 repository : graalvm/mx.git
132175 ref : ${{ env.MX_VERSION }}
133- fetch-depth : 1
134176 path : ${{ env.MX_PATH }}
135177 - name : Set up Python
136- uses : actions/setup-python@v4
178+ uses : actions/setup-python@v5
137179 with :
138180 python-version : ' 3.8'
139181 - name : Update mx cache
140- uses : actions/cache@v3
182+ uses : actions/cache@v4
141183 with :
142184 path : ~/.mx
143185 key : ${{ runner.os }}-mx-${{ hashFiles('**/suite.py') }}
@@ -157,9 +199,7 @@ jobs:
157199 if : ${{ env.MX_RUNS_STYLE == 'true' }}
158200 run : |
159201 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)
163203 - name : Install additional pip packages
164204 if : ${{ matrix.env.PIP_PACKAGES != '' }}
165205 run : ${MX_PYTHON} -m pip install ${{ matrix.env.PIP_PACKAGES }}
@@ -183,3 +223,48 @@ jobs:
183223 env : ${{ matrix.env }}
184224 run : ${MX_PATH}/mx --primary-suite-path ${PRIMARY} --java-home=${JAVA_HOME} gate --strict-mode ${{ matrix.env.GATE_OPTS }}
185225 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