Skip to content

Commit c8904a4

Browse files
committed
Run master Github workflows
1 parent 2f8a5a8 commit c8904a4

File tree

7 files changed

+630
-67
lines changed

7 files changed

+630
-67
lines changed
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Build GraalVM JDK
2+
description: 'Build GraalVM JDK and set up environment for testing'
3+
4+
inputs:
5+
native-images:
6+
description: 'Internal GraalVM native images to build'
7+
required: false
8+
default: 'native-image'
9+
components:
10+
description: 'Internal GraalVM components to build'
11+
required: false
12+
default: 'Native Image'
13+
java-version:
14+
description: 'Java version to use'
15+
required: false
16+
default: ''
17+
18+
runs:
19+
using: 'composite'
20+
steps:
21+
- name: Set up environment variables
22+
shell: bash
23+
run: |
24+
echo "GRAALVM_HOME=${{ github.workspace }}/graalvm" >> ${GITHUB_ENV}
25+
echo "LABSJDK_HOME=${{ github.workspace }}/labsjdk" >> ${GITHUB_ENV}
26+
echo "MX_GIT_CACHE=refcache" >> ${GITHUB_ENV}
27+
echo "MX_PATH=${{ github.workspace }}/mx" >> ${GITHUB_ENV}
28+
echo "MX_PYTHON=python3.8" >> ${GITHUB_ENV}
29+
echo "MX_VERSION=$(jq -r '.mx_version' common.json)" >> ${GITHUB_ENV}
30+
# Workaround testsuite locale issue
31+
echo "LANG=en_US.UTF-8" >> ${GITHUB_ENV}
32+
- name: Checkout graalvm/mx
33+
uses: actions/checkout@v4
34+
with:
35+
repository: graalvm/mx
36+
ref: ${{ env.MX_VERSION }}
37+
path: ${{ env.MX_PATH }}
38+
- name: Set up Python
39+
uses: actions/setup-python@v5
40+
with:
41+
python-version: '3.8'
42+
- name: Update mx cache
43+
uses: actions/cache@v4
44+
with:
45+
path: ~/.mx
46+
key: ${{ runner.os }}-mx-${{ hashFiles('**/suite.py') }}
47+
restore-keys: ${{ runner.os }}-mx-
48+
- name: Fetch LabsJDK
49+
shell: bash
50+
run: |
51+
mkdir jdk-dl
52+
${MX_PATH}/mx --java-home= fetch-jdk --jdk-id labsjdk-ce-latest --to jdk-dl --alias ${LABSJDK_HOME}
53+
- name: Build GraalVM JDK
54+
shell: bash
55+
run: |
56+
cd substratevm
57+
${MX_PATH}/mx --java-home=${LABSJDK_HOME} --native-images="${{ inputs.native-images }}" --components="${{ inputs.components }}" build
58+
ln -s $(${MX_PATH}/mx --java-home=${LABSJDK_HOME} --native-images="${{ inputs.native-images }}" --components="${{ inputs.components }}" graalvm-home) ${GRAALVM_HOME}
59+
${GRAALVM_HOME}/bin/native-image --version
60+
- name: Set up JAVA_HOME
61+
if: ${{ inputs.java-version }} != ''
62+
uses: actions/setup-java@v4
63+
with:
64+
distribution: 'oracle'
65+
java-version: '${{ inputs.java-version }}'
66+

.github/workflows/cdt-inspect.yml

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
#
2+
# Copyright (c) 2023, 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+
41+
# Intergation test of CDT with Inspector backend.
42+
name: Weekly CDT Inspector
43+
44+
on:
45+
schedule:
46+
- cron: "30 2 * * 2,5" # Tuesday and Friday at 2:30
47+
48+
env:
49+
JAVA_HOME: ${{ github.workspace }}/jdk
50+
JDK_VERSION: "latest"
51+
MX_PATH: ${{ github.workspace }}/mx
52+
SE_SKIP_DRIVER_IN_PATH: "true"
53+
54+
jobs:
55+
build:
56+
57+
runs-on: ubuntu-latest
58+
59+
if: github.repository == 'oracle/graal'
60+
61+
steps:
62+
- name: Checkout oracle/graal
63+
uses: actions/checkout@v4
64+
with:
65+
path: ${{ github.workspace }}/graal
66+
- name: Checkout oracle/graaljs
67+
uses: actions/checkout@v4
68+
with:
69+
repository: oracle/graaljs
70+
sparse-checkout: |
71+
graal-js
72+
path: ${{ github.workspace }}/js
73+
- name: Checkout graalvm/mx
74+
uses: actions/checkout@v4
75+
with:
76+
repository: graalvm/mx.git
77+
ref: master
78+
path: ${{ env.MX_PATH }}
79+
- name: Set up Python
80+
uses: actions/setup-python@v5
81+
with:
82+
python-version: '3.8'
83+
- name: Fetch LabsJDK
84+
run: |
85+
mkdir jdk-dl
86+
${MX_PATH}/mx --java-home= fetch-jdk --jdk-id labsjdk-ce-${JDK_VERSION} --to jdk-dl --alias ${JAVA_HOME}
87+
- run: |
88+
cd ${{ github.workspace }}/graal/vm
89+
${MX_PATH}/mx --dy /tools,graal-js build
90+
cd tests/gh_workflows/CDTInspectorTest
91+
mvn -q compile
92+
mvn -q exec:exec -Dtestargs="${{ github.workspace }}/graal/sdk/latest_graalvm_home/bin/js scripts/StepTest.js"

.github/workflows/main.yml

Lines changed: 101 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,43 @@
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+
#
141
name: GraalVM Gate
242

343
on:
@@ -37,19 +77,21 @@ concurrency:
3777

3878
env:
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

4687
permissions:
4788
contents: read # to fetch code (actions/checkout)
4889

4990
jobs:
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:
@@ -60,7 +102,7 @@ jobs:
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
@@ -98,7 +140,7 @@ jobs:
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

Comments
 (0)