Skip to content

Commit 06d51ac

Browse files
Merge with master.
2 parents 7b91121 + 5c41e26 commit 06d51ac

File tree

813 files changed

+22808
-15518
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

813 files changed

+22808
-15518
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: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,21 +62,18 @@ jobs:
6262
- name: Checkout oracle/graal
6363
uses: actions/checkout@v4
6464
with:
65-
fetch-depth: 1
6665
path: ${{ github.workspace }}/graal
6766
- name: Checkout oracle/graaljs
6867
uses: actions/checkout@v4
6968
with:
7069
repository: oracle/graaljs
71-
fetch-depth: 1
7270
sparse-checkout: |
7371
graal-js
7472
path: ${{ github.workspace }}/js
7573
- name: Checkout graalvm/mx
7674
uses: actions/checkout@v4
7775
with:
7876
repository: graalvm/mx.git
79-
fetch-depth: 1
8077
ref: master
8178
path: ${{ env.MX_PATH }}
8279
- name: Set up Python

.github/workflows/main.yml

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ permissions:
8989
contents: read # to fetch code (actions/checkout)
9090

9191
jobs:
92-
build-graalvm:
92+
build-graalvm-linux:
9393
name: /${{ matrix.env.PRIMARY }} ${{ matrix.env.GATE_TAGS }} JDK${{ matrix.env.JDK_VERSION }}
9494
runs-on: ubuntu-20.04
9595
strategy:
@@ -172,7 +172,6 @@ jobs:
172172
with:
173173
repository: graalvm/mx.git
174174
ref: ${{ env.MX_VERSION }}
175-
fetch-depth: 1
176175
path: ${{ env.MX_PATH }}
177176
- name: Set up Python
178177
uses: actions/setup-python@v5
@@ -223,3 +222,47 @@ jobs:
223222
env: ${{ matrix.env }}
224223
run: ${MX_PATH}/mx --primary-suite-path ${PRIMARY} --java-home=${JAVA_HOME} gate --strict-mode ${{ matrix.env.GATE_OPTS }}
225224
if: ${{ matrix.env.GATE_TAGS == '' }}
225+
build-graalvm-windows:
226+
name: /substratevm on Windows
227+
runs-on: windows-2022
228+
env:
229+
MX_PYTHON: 'python'
230+
steps:
231+
- name: Checkout oracle/graal
232+
uses: actions/checkout@v4
233+
with:
234+
ref: ${{ github.ref }} # Lock ref to current branch to avoid fetching others
235+
- name: Determine mx version
236+
shell: bash
237+
run: echo "MX_VERSION=$(jq -r '.mx_version' common.json)" >> ${GITHUB_ENV}
238+
- name: Checkout graalvm/mx
239+
uses: actions/checkout@v4
240+
with:
241+
repository: graalvm/mx.git
242+
ref: ${{ env.MX_VERSION }}
243+
path: ${{ env.MX_PATH }}
244+
- name: Set up Python
245+
uses: actions/setup-python@v5
246+
with:
247+
python-version: '3.8'
248+
- name: Fetch LabsJDK
249+
shell: bash
250+
run: |
251+
mkdir jdk-dl
252+
${MX_PATH}/mx --java-home= fetch-jdk --jdk-id labsjdk-ce-latest --to jdk-dl --alias ${JAVA_HOME}
253+
- name: Build GraalVM via cmd.exe
254+
shell: cmd
255+
run: |
256+
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
257+
call ${{ env.MX_PATH }}\mx.cmd -p substratevm --native-images=native-image --components="Native Image" build
258+
call ${{ env.MX_PATH }}\mx.cmd -p substratevm --native-images=native-image --components="Native Image" graalvm-home > graalvm-home-with-forward-slashes.txt
259+
set /p GRAALVM_HOME=<graalvm-home-with-forward-slashes.txt
260+
setlocal enabledelayedexpansion
261+
set "GRAALVM_HOME=%GRAALVM_HOME:/=\%"
262+
echo %GRAALVM_HOME%\bin>>%GITHUB_PATH%
263+
echo GRAALVM_HOME=%GRAALVM_HOME%>>%GITHUB_ENV%
264+
- name: Test GraalVM
265+
run: |
266+
native-image --version
267+
native-image -m jdk.httpserver
268+

.github/workflows/micronaut.yml

Lines changed: 5 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,10 @@ on:
5252
workflow_dispatch:
5353

5454
env:
55-
GRAALVM_HOME: ${{ github.workspace }}/graalvm
56-
JAVA_HOME: ${{ github.workspace }}/labsjdk
57-
LANG: en_US.UTF-8
5855
MICRONAUT_CORE_PATH: ${{ github.workspace }}/micronaut-core
59-
MICRONAUT_JDK_VERSION: 21
60-
MX_GIT_CACHE: refcache
61-
MX_PATH: ${{ github.workspace }}/mx
62-
MX_PYTHON: python3.8
56+
MICRONAUT_JAVA_VERSION: 21
6357
# Enforce experimental option checking in CI (GR-47922)
64-
NATIVE_IMAGE_EXPERIMENTAL_OPTIONS_ARE_FATAL: "true"
58+
NATIVE_IMAGE_EXPERIMENTAL_OPTIONS_ARE_FATAL: 'true'
6559

6660
permissions:
6761
contents: read # to fetch code (actions/checkout)
@@ -74,53 +68,20 @@ jobs:
7468
steps:
7569
- name: Checkout oracle/graal
7670
uses: actions/checkout@v4
77-
with:
78-
fetch-depth: 1
79-
- name: Determine mx version
80-
run: echo "MX_VERSION=$(jq -r '.mx_version' common.json)" >> ${GITHUB_ENV}
81-
- name: Checkout graalvm/mx
82-
uses: actions/checkout@v4
83-
with:
84-
repository: graalvm/mx
85-
fetch-depth: 1
86-
ref: ${{ env.MX_VERSION }}
87-
path: ${{ env.MX_PATH }}
88-
- name: Set up Python
89-
uses: actions/setup-python@v5
90-
with:
91-
python-version: '3.8'
92-
- name: Update mx cache
93-
uses: actions/cache@v4
94-
with:
95-
path: ~/.mx
96-
key: ${{ runner.os }}-mx-${{ hashFiles('**/suite.py') }}
97-
restore-keys: ${{ runner.os }}-mx-
98-
- name: Fetch LabsJDK
99-
run: |
100-
mkdir jdk-dl
101-
${MX_PATH}/mx --java-home= fetch-jdk --jdk-id labsjdk-ce-latest --to jdk-dl --alias ${JAVA_HOME}
10271
- name: Build GraalVM JDK
103-
run: |
104-
cd substratevm
105-
${MX_PATH}/mx --native=native-image --components="Native Image" build
106-
mv $(${MX_PATH}/mx --native=native-image --components="Native Image" graalvm-home) ${GRAALVM_HOME}
107-
${GRAALVM_HOME}/bin/native-image --version
108-
- name: Reconfigure JAVA_HOME for Micronaut
109-
uses: actions/setup-java@v4
72+
uses: ./.github/actions/build-graalvm
11073
with:
111-
distribution: 'oracle'
112-
java-version: '${{ env.MICRONAUT_JDK_VERSION }}'
74+
java-version: ${{ env.MICRONAUT_JAVA_VERSION }}
11375
- name: Run nativeTest in Micronaut launch project
11476
run: |
115-
curl --fail --silent --location --retry 3 --max-time 10 --output demo.zip --request GET 'https://launch.micronaut.io/create/default/com.example.demo?lang=JAVA&build=GRADLE&test=JUNIT&javaVersion=JDK_${{ env.MICRONAUT_JDK_VERSION }}'
77+
curl --fail --silent --location --retry 3 --max-time 10 --output demo.zip --request GET 'https://launch.micronaut.io/create/default/com.example.demo?lang=JAVA&build=GRADLE&test=JUNIT&javaVersion=JDK_${{ env.MICRONAUT_JAVA_VERSION }}'
11678
unzip demo.zip
11779
cd demo
11880
./gradlew nativeTest
11981
- name: Checkout micronaut-projects/micronaut-core
12082
uses: actions/checkout@v4
12183
with:
12284
repository: micronaut-projects/micronaut-core
123-
fetch-depth: 1
12485
path: ${{ env.MICRONAUT_CORE_PATH }}
12586
- name: Run nativeTest in micronaut-core
12687
run: |

.github/workflows/quarkus.yml

Lines changed: 12 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,15 @@ on:
4949
- '.github/workflows/quarkus.yml'
5050
schedule:
5151
- cron: '0 3 * * *'
52+
workflow_dispatch:
5253

5354
env:
5455
COMMON_MAVEN_ARGS: "-e -B --settings .github/mvn-settings.xml --fail-at-end"
5556
DB_NAME: hibernate_orm_test
5657
DB_PASSWORD: hibernate_orm_test
5758
DB_USER: hibernate_orm_test
58-
GRAALVM_HOME: ${{ github.workspace }}/graalvm
59-
LABSJDK_HOME: ${{ github.workspace }}/jdk
60-
LANG: en_US.UTF-8 # Workaround testsuite locale issue
61-
MX_GIT_CACHE: refcache
62-
MX_PATH: ${{ github.workspace }}/mx
63-
MX_PYTHON: python3.8
6459
NATIVE_TEST_MAVEN_ARGS: "-Dtest-containers -Dstart-containers -Dquarkus.native.native-image-xmx=5g -Dnative -Dnative.surefire.skip -Dformat.skip -Dno-descriptor-tests install -DskipDocs -Dquarkus.native.container-build=false"
60+
QUARKUS_JAVA_VERSION: 17 # Use Java 17 to build Quarkus as that's the lowest supported JDK version currently
6561
QUARKUS_PATH: ${{ github.workspace }}/quarkus
6662

6763
permissions: {}
@@ -78,19 +74,10 @@ jobs:
7874
steps:
7975
- name: Checkout oracle/graal
8076
uses: actions/checkout@v4
77+
- name: Build GraalVM JDK
78+
uses: ./.github/actions/build-graalvm
8179
with:
82-
fetch-depth: 1
83-
- name: Checkout graalvm/mx
84-
uses: actions/checkout@v4
85-
with:
86-
repository: graalvm/mx.git
87-
fetch-depth: 1
88-
ref: master
89-
path: ${{ env.MX_PATH }}
90-
- name: Set up Python
91-
uses: actions/setup-python@v5
92-
with:
93-
python-version: '3.8'
80+
java-version: ${{ env.QUARKUS_JAVA_VERSION }}
9481
- name: Get latest Quarkus release
9582
run: |
9683
export QUARKUS_VERSION=main #$(curl https://repo1.maven.org/maven2/io/quarkus/quarkus-bom/maven-metadata.xml | awk -F"[<>]" '/latest/ {print $3}')
@@ -104,36 +91,14 @@ jobs:
10491
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
10592
restore-keys: |
10693
${{ runner.os }}-maven-
107-
- uses: actions/cache@v4
108-
with:
109-
path: ~/.mx
110-
key: ${{ runner.os }}-mx-${{ hashFiles('**/suite.py') }}
111-
restore-keys: |
112-
${{ runner.os }}-mx-
113-
- name: Fetch LabsJDK
114-
run: |
115-
mkdir jdk-dl
116-
${MX_PATH}/mx --java-home= fetch-jdk --jdk-id labsjdk-ce-latest --to jdk-dl --alias ${LABSJDK_HOME}
117-
- name: Build graalvm native-image
118-
run: |
119-
export JAVA_HOME=${LABSJDK_HOME}
120-
cd substratevm
121-
${MX_PATH}/mx --native=native-image,lib:jvmcicompiler --components="Native Image,LibGraal" build
122-
mv $(${MX_PATH}/mx --native=native-image,lib:jvmcicompiler --components="Native Image,LibGraal" graalvm-home) ${GRAALVM_HOME}
123-
${GRAALVM_HOME}/bin/native-image --version
124-
- name: Tar GraalVM
94+
- name: Tar GraalVM JDK
12595
shell: bash
126-
run: tar -czvf graalvm.tgz -C $(dirname ${GRAALVM_HOME}) $(basename ${GRAALVM_HOME})
127-
- name: Persist GraalVM build
96+
run: tar -czvhf graalvm.tgz -C $(dirname ${GRAALVM_HOME}) $(basename ${GRAALVM_HOME})
97+
- name: Persist GraalVM JDK build
12898
uses: actions/upload-artifact@v4
12999
with:
130100
name: graalvm
131101
path: graalvm.tgz
132-
# Use Java 17 to build Quarkus as that's the lowest supported JDK version currently
133-
- uses: actions/setup-java@v4
134-
with:
135-
distribution: 'oracle'
136-
java-version: '17'
137102
- name: Build Quarkus
138103
run: |
139104
cd ${QUARKUS_PATH}
@@ -157,20 +122,22 @@ jobs:
157122
name: Native Tests - ${{matrix.category}}
158123
needs: build-quarkus-and-graalvm
159124
runs-on: ubuntu-latest
125+
env:
126+
GRAALVM_HOME: ${{ github.workspace }}/graalvm # identical to the one in ./.github/actions/build-graalvm
160127
# Ignore the following YAML Schema error
161128
timeout-minutes: ${{matrix.timeout}}
162129
strategy:
163130
max-parallel: 8
164131
fail-fast: false
165132
matrix: ${{ fromJson(needs.build-quarkus-and-graalvm.outputs.matrix) }}
166133
steps:
167-
- name: Download GraalVM build
134+
- name: Download GraalVM JDK build
168135
if: startsWith(matrix.os-name, 'ubuntu')
169136
uses: actions/download-artifact@v4
170137
with:
171138
name: graalvm
172139
path: .
173-
- name: Extract GraalVM build
140+
- name: Extract GraalVM JDK build
174141
if: startsWith(matrix.os-name, 'ubuntu')
175142
shell: bash
176143
run: tar -xzvf graalvm.tgz -C $(dirname ${GRAALVM_HOME})
@@ -204,7 +171,6 @@ jobs:
204171
env:
205172
TEST_MODULES: ${{matrix.test-modules}}
206173
run: |
207-
export GRAALVM_HOME=${{ github.workspace }}/graalvm
208174
cd ${QUARKUS_PATH}
209175
${GRAALVM_HOME}/bin/native-image --version
210176
./mvnw $COMMON_MAVEN_ARGS -f integration-tests -pl "$TEST_MODULES" $NATIVE_TEST_MAVEN_ARGS

0 commit comments

Comments
 (0)