From a69f489fcb78ed0d5364cbe0665275b69b894107 Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Mon, 4 Mar 2024 10:50:34 +0100 Subject: [PATCH 01/10] Use symlink to set up `$GRAALVM_HOME`. --- .github/workflows/micronaut.yml | 2 +- .github/workflows/quarkus.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/micronaut.yml b/.github/workflows/micronaut.yml index db4f53f2c38b..2c18c36ff7d8 100644 --- a/.github/workflows/micronaut.yml +++ b/.github/workflows/micronaut.yml @@ -103,7 +103,7 @@ jobs: run: | cd substratevm ${MX_PATH}/mx --native=native-image --components="Native Image" build - mv $(${MX_PATH}/mx --native=native-image --components="Native Image" graalvm-home) ${GRAALVM_HOME} + ln -s $(${MX_PATH}/mx --native=native-image --components="Native Image" graalvm-home) ${GRAALVM_HOME} ${GRAALVM_HOME}/bin/native-image --version - name: Reconfigure JAVA_HOME for Micronaut uses: actions/setup-java@v4 diff --git a/.github/workflows/quarkus.yml b/.github/workflows/quarkus.yml index 499f32757367..d97d95ca6c09 100644 --- a/.github/workflows/quarkus.yml +++ b/.github/workflows/quarkus.yml @@ -119,7 +119,7 @@ jobs: export JAVA_HOME=${LABSJDK_HOME} cd substratevm ${MX_PATH}/mx --native=native-image,lib:jvmcicompiler --components="Native Image,LibGraal" build - mv $(${MX_PATH}/mx --native=native-image,lib:jvmcicompiler --components="Native Image,LibGraal" graalvm-home) ${GRAALVM_HOME} + ln -s $(${MX_PATH}/mx --native=native-image,lib:jvmcicompiler --components="Native Image,LibGraal" graalvm-home) ${GRAALVM_HOME} ${GRAALVM_HOME}/bin/native-image --version - name: Tar GraalVM shell: bash From c4253600d9f7059792a6fbc61164ba319f8ac720 Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Mon, 4 Mar 2024 10:57:34 +0100 Subject: [PATCH 02/10] Add ability to start Quarkus gate on demand. --- .github/workflows/quarkus.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/quarkus.yml b/.github/workflows/quarkus.yml index d97d95ca6c09..e3fc7d9b56a3 100644 --- a/.github/workflows/quarkus.yml +++ b/.github/workflows/quarkus.yml @@ -49,6 +49,7 @@ on: - '.github/workflows/quarkus.yml' schedule: - cron: '0 3 * * *' + workflow_dispatch: env: COMMON_MAVEN_ARGS: "-e -B --settings .github/mvn-settings.xml --fail-at-end" From 19b3c6b27d8534743ab29a6b124ab594997cca8e Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Mon, 4 Mar 2024 11:10:56 +0100 Subject: [PATCH 03/10] Share steps to build GraalVM JDK. --- .github/actions/build-graalvm/action.yml | 62 ++++++++++++++++++++++++ .github/workflows/micronaut.yml | 48 ++---------------- .github/workflows/quarkus.yml | 46 ++---------------- 3 files changed, 69 insertions(+), 87 deletions(-) create mode 100644 .github/actions/build-graalvm/action.yml diff --git a/.github/actions/build-graalvm/action.yml b/.github/actions/build-graalvm/action.yml new file mode 100644 index 000000000000..276fbb0d2b67 --- /dev/null +++ b/.github/actions/build-graalvm/action.yml @@ -0,0 +1,62 @@ +name: Build GraalVM JDK +description: 'Build GraalVM JDK and set up environment for testing' + +inputs: + java-version: + description: 'Java version to use' + required: false + default: '' + +runs: + using: 'composite' + steps: + - name: Checkout oracle/graal + uses: actions/checkout@v4 + with: + fetch-depth: 1 + - name: Set up environment variables + run: | + echo "GRAALVM_HOME=${{ github.workspace }}/graalvm" >> ${GITHUB_ENV} + echo "LABSJDK_HOME=${{ github.workspace }}/labsjdk" >> ${GITHUB_ENV} + echo "MX_GIT_CACHE=refcache" >> ${GITHUB_ENV} + echo "MX_PATH=${{ github.workspace }}/mx" >> ${GITHUB_ENV} + echo "MX_PYTHON=python3.8" >> ${GITHUB_ENV} + echo "MX_VERSION=$(jq -r '.mx_version' common.json)" >> ${GITHUB_ENV} + # Workaround testsuite locale issue + echo "LANG=en_US.UTF-8" >> ${GITHUB_ENV} + # Enforce experimental option checking in CI (GR-47922) + echo "NATIVE_IMAGE_EXPERIMENTAL_OPTIONS_ARE_FATAL=true" >> ${GITHUB_ENV} + - name: Checkout graalvm/mx + uses: actions/checkout@v4 + with: + repository: graalvm/mx + fetch-depth: 1 + ref: ${{ env.MX_VERSION }} + path: ${{ env.MX_PATH }} + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.8' + - name: Update mx cache + uses: actions/cache@v4 + with: + path: ~/.mx + key: ${{ runner.os }}-mx-${{ hashFiles('**/suite.py') }} + restore-keys: ${{ runner.os }}-mx- + - name: Fetch LabsJDK + run: | + mkdir jdk-dl + ${MX_PATH}/mx --java-home= fetch-jdk --jdk-id labsjdk-ce-latest --to jdk-dl --alias ${LABSJDK_HOME} + - name: Build GraalVM JDK + run: | + cd substratevm + ${MX_PATH}/mx --java-home=${LABSJDK_HOME} --native=native-image --components="Native Image" build + ln -s $(${MX_PATH}/mx --java-home=${LABSJDK_HOME} --native=native-image --components="Native Image" graalvm-home) ${GRAALVM_HOME} + ${GRAALVM_HOME}/bin/native-image --version + - name: Set up JAVA_HOME + if: ${{ inputs.java-version }} != '' + uses: actions/setup-java@v4 + with: + distribution: 'oracle' + java-version: '${{ inputs.java-version }}' + \ No newline at end of file diff --git a/.github/workflows/micronaut.yml b/.github/workflows/micronaut.yml index 2c18c36ff7d8..0fc569581349 100644 --- a/.github/workflows/micronaut.yml +++ b/.github/workflows/micronaut.yml @@ -52,16 +52,8 @@ on: workflow_dispatch: env: - GRAALVM_HOME: ${{ github.workspace }}/graalvm - JAVA_HOME: ${{ github.workspace }}/labsjdk - LANG: en_US.UTF-8 MICRONAUT_CORE_PATH: ${{ github.workspace }}/micronaut-core - MICRONAUT_JDK_VERSION: 21 - MX_GIT_CACHE: refcache - MX_PATH: ${{ github.workspace }}/mx - MX_PYTHON: python3.8 - # Enforce experimental option checking in CI (GR-47922) - NATIVE_IMAGE_EXPERIMENTAL_OPTIONS_ARE_FATAL: "true" + MICRONAUT_JAVA_VERSION: 21 permissions: contents: read # to fetch code (actions/checkout) @@ -72,44 +64,10 @@ jobs: runs-on: ubuntu-20.04 if: (github.event_name == 'schedule' && github.repository == 'oracle/graal') || (github.event_name != 'schedule') steps: - - name: Checkout oracle/graal - uses: actions/checkout@v4 - with: - fetch-depth: 1 - - name: Determine mx version - run: echo "MX_VERSION=$(jq -r '.mx_version' common.json)" >> ${GITHUB_ENV} - - name: Checkout graalvm/mx - uses: actions/checkout@v4 - with: - repository: graalvm/mx - fetch-depth: 1 - ref: ${{ env.MX_VERSION }} - path: ${{ env.MX_PATH }} - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.8' - - name: Update mx cache - uses: actions/cache@v4 - with: - path: ~/.mx - key: ${{ runner.os }}-mx-${{ hashFiles('**/suite.py') }} - restore-keys: ${{ runner.os }}-mx- - - name: Fetch LabsJDK - run: | - mkdir jdk-dl - ${MX_PATH}/mx --java-home= fetch-jdk --jdk-id labsjdk-ce-latest --to jdk-dl --alias ${JAVA_HOME} - name: Build GraalVM JDK - run: | - cd substratevm - ${MX_PATH}/mx --native=native-image --components="Native Image" build - ln -s $(${MX_PATH}/mx --native=native-image --components="Native Image" graalvm-home) ${GRAALVM_HOME} - ${GRAALVM_HOME}/bin/native-image --version - - name: Reconfigure JAVA_HOME for Micronaut - uses: actions/setup-java@v4 + uses: ./.github/actions/build-graalvm with: - distribution: 'oracle' - java-version: '${{ env.MICRONAUT_JDK_VERSION }}' + java-version: ${{ env.MICRONAUT_JAVA_VERSION }} - name: Run nativeTest in Micronaut launch project run: | 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 }}' diff --git a/.github/workflows/quarkus.yml b/.github/workflows/quarkus.yml index e3fc7d9b56a3..ec642bc16397 100644 --- a/.github/workflows/quarkus.yml +++ b/.github/workflows/quarkus.yml @@ -56,13 +56,8 @@ env: DB_NAME: hibernate_orm_test DB_PASSWORD: hibernate_orm_test DB_USER: hibernate_orm_test - GRAALVM_HOME: ${{ github.workspace }}/graalvm - LABSJDK_HOME: ${{ github.workspace }}/jdk - LANG: en_US.UTF-8 # Workaround testsuite locale issue - MX_GIT_CACHE: refcache - MX_PATH: ${{ github.workspace }}/mx - MX_PYTHON: python3.8 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" + QUARKUS_JAVA_VERSION: 17 # Use Java 17 to build Quarkus as that's the lowest supported JDK version currently QUARKUS_PATH: ${{ github.workspace }}/quarkus permissions: {} @@ -77,21 +72,10 @@ jobs: outputs: matrix: ${{ steps.read.outputs.matrix }} steps: - - name: Checkout oracle/graal - uses: actions/checkout@v4 + - name: Build GraalVM JDK + uses: ./.github/actions/build-graalvm with: - fetch-depth: 1 - - name: Checkout graalvm/mx - uses: actions/checkout@v4 - with: - repository: graalvm/mx.git - fetch-depth: 1 - ref: master - path: ${{ env.MX_PATH }} - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.8' + java-version: ${{ env.QUARKUS_JAVA_VERSION }} - name: Get latest Quarkus release run: | export QUARKUS_VERSION=main #$(curl https://repo1.maven.org/maven2/io/quarkus/quarkus-bom/maven-metadata.xml | awk -F"[<>]" '/latest/ {print $3}') @@ -105,23 +89,6 @@ jobs: key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} restore-keys: | ${{ runner.os }}-maven- - - uses: actions/cache@v4 - with: - path: ~/.mx - key: ${{ runner.os }}-mx-${{ hashFiles('**/suite.py') }} - restore-keys: | - ${{ runner.os }}-mx- - - name: Fetch LabsJDK - run: | - mkdir jdk-dl - ${MX_PATH}/mx --java-home= fetch-jdk --jdk-id labsjdk-ce-latest --to jdk-dl --alias ${LABSJDK_HOME} - - name: Build graalvm native-image - run: | - export JAVA_HOME=${LABSJDK_HOME} - cd substratevm - ${MX_PATH}/mx --native=native-image,lib:jvmcicompiler --components="Native Image,LibGraal" build - ln -s $(${MX_PATH}/mx --native=native-image,lib:jvmcicompiler --components="Native Image,LibGraal" graalvm-home) ${GRAALVM_HOME} - ${GRAALVM_HOME}/bin/native-image --version - name: Tar GraalVM shell: bash run: tar -czvf graalvm.tgz -C $(dirname ${GRAALVM_HOME}) $(basename ${GRAALVM_HOME}) @@ -130,11 +97,6 @@ jobs: with: name: graalvm path: graalvm.tgz - # Use Java 17 to build Quarkus as that's the lowest supported JDK version currently - - uses: actions/setup-java@v4 - with: - distribution: 'oracle' - java-version: '17' - name: Build Quarkus run: | cd ${QUARKUS_PATH} From f758a7b6fac17b349352db60dac1c4e8830be45e Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Mon, 4 Mar 2024 11:12:08 +0100 Subject: [PATCH 04/10] Add nightly workflow for Spring. --- .github/workflows/spring.yml | 80 ++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 .github/workflows/spring.yml diff --git a/.github/workflows/spring.yml b/.github/workflows/spring.yml new file mode 100644 index 000000000000..abe2b42b3d8d --- /dev/null +++ b/.github/workflows/spring.yml @@ -0,0 +1,80 @@ +# +# Copyright (c) 2024, 2024, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# The Universal Permissive License (UPL), Version 1.0 +# +# Subject to the condition set forth below, permission is hereby granted to any +# person obtaining a copy of this software, associated documentation and/or +# data (collectively the "Software"), free of charge and under any and all +# copyright rights in the Software, and any and all patent rights owned or +# freely licensable by each licensor hereunder covering either (i) the +# unmodified Software as contributed to or provided by such licensor, or (ii) +# the Larger Works (as defined below), to deal in both +# +# (a) the Software, and +# +# (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if +# one is included with the Software each a "Larger Work" to which the Software +# is contributed by such licensors), +# +# without restriction, including without limitation the rights to copy, create +# derivative works of, display, perform, and distribute the Software and make, +# use, sell, offer for sale, import, export, have made, and have sold the +# Software and the Larger Work(s), and to sublicense the foregoing rights on +# either these or other terms. +# +# This license is subject to the following condition: +# +# The above copyright notice and either this complete permission notice or at a +# minimum a reference to the UPL must be included in all copies or substantial +# portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# +name: Nightly Spring Tests + +on: + push: + paths: + - '.github/workflows/spring.yml' + pull_request: + paths: + - '.github/workflows/spring.yml' + schedule: + - cron: '0 4 * * *' + workflow_dispatch: + +env: + SPRING_PETCLINIC_PATH: ${{ github.workspace }}/spring-petclinic + SPRING_JAVA_VERSION: 21 + +permissions: + contents: read # to fetch code (actions/checkout) + +jobs: + build-graalvm-and-spring: + name: Native Tests + runs-on: ubuntu-20.04 + if: (github.event_name == 'schedule' && github.repository == 'oracle/graal') || (github.event_name != 'schedule') + steps: + - name: Build GraalVM JDK + uses: ./.github/actions/build-graalvm + with: + java-version: ${{ env.SPRING_JAVA_VERSION }} + - name: Checkout spring-projects/spring-petclinic + uses: actions/checkout@v4 + with: + repository: spring-projects/spring-petclinic + fetch-depth: 1 + path: ${{ env.SPRING_PETCLINIC_PATH }} + - name: Run nativeTest in spring-petclinic + run: | + cd ${{ env.SPRING_PETCLINIC_PATH }} + ./gradlew nativeTest From 5b893abd93c1fa5cccd5e1f3d7b0676838312f5f Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Mon, 4 Mar 2024 11:16:39 +0100 Subject: [PATCH 05/10] "Checkout oracle/graal" cannot be shared. --- .github/actions/build-graalvm/action.yml | 4 ---- .github/workflows/micronaut.yml | 4 ++++ .github/workflows/quarkus.yml | 4 ++++ .github/workflows/spring.yml | 4 ++++ 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/actions/build-graalvm/action.yml b/.github/actions/build-graalvm/action.yml index 276fbb0d2b67..4894558071bc 100644 --- a/.github/actions/build-graalvm/action.yml +++ b/.github/actions/build-graalvm/action.yml @@ -10,10 +10,6 @@ inputs: runs: using: 'composite' steps: - - name: Checkout oracle/graal - uses: actions/checkout@v4 - with: - fetch-depth: 1 - name: Set up environment variables run: | echo "GRAALVM_HOME=${{ github.workspace }}/graalvm" >> ${GITHUB_ENV} diff --git a/.github/workflows/micronaut.yml b/.github/workflows/micronaut.yml index 0fc569581349..0534850c845c 100644 --- a/.github/workflows/micronaut.yml +++ b/.github/workflows/micronaut.yml @@ -64,6 +64,10 @@ jobs: runs-on: ubuntu-20.04 if: (github.event_name == 'schedule' && github.repository == 'oracle/graal') || (github.event_name != 'schedule') steps: + - name: Checkout oracle/graal + uses: actions/checkout@v4 + with: + fetch-depth: 1 - name: Build GraalVM JDK uses: ./.github/actions/build-graalvm with: diff --git a/.github/workflows/quarkus.yml b/.github/workflows/quarkus.yml index ec642bc16397..ed4c78c4e180 100644 --- a/.github/workflows/quarkus.yml +++ b/.github/workflows/quarkus.yml @@ -72,6 +72,10 @@ jobs: outputs: matrix: ${{ steps.read.outputs.matrix }} steps: + - name: Checkout oracle/graal + uses: actions/checkout@v4 + with: + fetch-depth: 1 - name: Build GraalVM JDK uses: ./.github/actions/build-graalvm with: diff --git a/.github/workflows/spring.yml b/.github/workflows/spring.yml index abe2b42b3d8d..7c6040922801 100644 --- a/.github/workflows/spring.yml +++ b/.github/workflows/spring.yml @@ -64,6 +64,10 @@ jobs: runs-on: ubuntu-20.04 if: (github.event_name == 'schedule' && github.repository == 'oracle/graal') || (github.event_name != 'schedule') steps: + - name: Checkout oracle/graal + uses: actions/checkout@v4 + with: + fetch-depth: 1 - name: Build GraalVM JDK uses: ./.github/actions/build-graalvm with: From 879fa33dcacf1bd174e7c1862d0be8305b9c37f7 Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Mon, 4 Mar 2024 11:21:17 +0100 Subject: [PATCH 06/10] Add required shell property. --- .github/actions/build-graalvm/action.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/actions/build-graalvm/action.yml b/.github/actions/build-graalvm/action.yml index 4894558071bc..c16e8f997185 100644 --- a/.github/actions/build-graalvm/action.yml +++ b/.github/actions/build-graalvm/action.yml @@ -11,6 +11,7 @@ runs: using: 'composite' steps: - name: Set up environment variables + shell: bash run: | echo "GRAALVM_HOME=${{ github.workspace }}/graalvm" >> ${GITHUB_ENV} echo "LABSJDK_HOME=${{ github.workspace }}/labsjdk" >> ${GITHUB_ENV} @@ -40,10 +41,12 @@ runs: key: ${{ runner.os }}-mx-${{ hashFiles('**/suite.py') }} restore-keys: ${{ runner.os }}-mx- - name: Fetch LabsJDK + shell: bash run: | mkdir jdk-dl ${MX_PATH}/mx --java-home= fetch-jdk --jdk-id labsjdk-ce-latest --to jdk-dl --alias ${LABSJDK_HOME} - name: Build GraalVM JDK + shell: bash run: | cd substratevm ${MX_PATH}/mx --java-home=${LABSJDK_HOME} --native=native-image --components="Native Image" build From ec4b2c26f1fe9e9e1f08ec7302ab1697a6743bfc Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Mon, 4 Mar 2024 11:51:00 +0100 Subject: [PATCH 07/10] Only Micronaut can use `NATIVE_IMAGE_EXPERIMENTAL_OPTIONS_ARE_FATAL` atm. --- .github/actions/build-graalvm/action.yml | 2 -- .github/workflows/micronaut.yml | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/build-graalvm/action.yml b/.github/actions/build-graalvm/action.yml index c16e8f997185..20513d4db79e 100644 --- a/.github/actions/build-graalvm/action.yml +++ b/.github/actions/build-graalvm/action.yml @@ -21,8 +21,6 @@ runs: echo "MX_VERSION=$(jq -r '.mx_version' common.json)" >> ${GITHUB_ENV} # Workaround testsuite locale issue echo "LANG=en_US.UTF-8" >> ${GITHUB_ENV} - # Enforce experimental option checking in CI (GR-47922) - echo "NATIVE_IMAGE_EXPERIMENTAL_OPTIONS_ARE_FATAL=true" >> ${GITHUB_ENV} - name: Checkout graalvm/mx uses: actions/checkout@v4 with: diff --git a/.github/workflows/micronaut.yml b/.github/workflows/micronaut.yml index 0534850c845c..2f6ace0cb927 100644 --- a/.github/workflows/micronaut.yml +++ b/.github/workflows/micronaut.yml @@ -54,6 +54,8 @@ on: env: MICRONAUT_CORE_PATH: ${{ github.workspace }}/micronaut-core MICRONAUT_JAVA_VERSION: 21 + # Enforce experimental option checking in CI (GR-47922) + NATIVE_IMAGE_EXPERIMENTAL_OPTIONS_ARE_FATAL: 'true' permissions: contents: read # to fetch code (actions/checkout) From ef304b8c68257b1859b1eaf909c10599506a21e3 Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Mon, 4 Mar 2024 12:12:34 +0100 Subject: [PATCH 08/10] Fix java version in micronaut gate. --- .github/workflows/micronaut.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/micronaut.yml b/.github/workflows/micronaut.yml index 2f6ace0cb927..88caa196134b 100644 --- a/.github/workflows/micronaut.yml +++ b/.github/workflows/micronaut.yml @@ -76,7 +76,7 @@ jobs: java-version: ${{ env.MICRONAUT_JAVA_VERSION }} - name: Run nativeTest in Micronaut launch project run: | - 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 }}' + 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 }}' unzip demo.zip cd demo ./gradlew nativeTest From a2f8f228cb31115ca3c810c9594274ef1fac96f2 Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Mon, 4 Mar 2024 13:08:03 +0100 Subject: [PATCH 09/10] Ensure `$GRAALVM_HOME` is set correctly in Quarkus gate. --- .github/workflows/quarkus.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/quarkus.yml b/.github/workflows/quarkus.yml index ed4c78c4e180..092cb32b8b65 100644 --- a/.github/workflows/quarkus.yml +++ b/.github/workflows/quarkus.yml @@ -124,6 +124,8 @@ jobs: name: Native Tests - ${{matrix.category}} needs: build-quarkus-and-graalvm runs-on: ubuntu-latest + env: + GRAALVM_HOME: ${{ github.workspace }}/graalvm # identical to the one in ./.github/actions/build-graalvm # Ignore the following YAML Schema error timeout-minutes: ${{matrix.timeout}} strategy: @@ -171,7 +173,6 @@ jobs: env: TEST_MODULES: ${{matrix.test-modules}} run: | - export GRAALVM_HOME=${{ github.workspace }}/graalvm cd ${QUARKUS_PATH} ${GRAALVM_HOME}/bin/native-image --version ./mvnw $COMMON_MAVEN_ARGS -f integration-tests -pl "$TEST_MODULES" $NATIVE_TEST_MAVEN_ARGS From 0c8384d0ad34aef0793151c482a3f9c4809fcb08 Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Mon, 4 Mar 2024 15:06:26 +0100 Subject: [PATCH 10/10] Dereference symbolic links when persisting GraalVM. --- .github/workflows/quarkus.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/quarkus.yml b/.github/workflows/quarkus.yml index 092cb32b8b65..caac30d4ba92 100644 --- a/.github/workflows/quarkus.yml +++ b/.github/workflows/quarkus.yml @@ -95,7 +95,7 @@ jobs: ${{ runner.os }}-maven- - name: Tar GraalVM shell: bash - run: tar -czvf graalvm.tgz -C $(dirname ${GRAALVM_HOME}) $(basename ${GRAALVM_HOME}) + run: tar -czvhf graalvm.tgz -C $(dirname ${GRAALVM_HOME}) $(basename ${GRAALVM_HOME}) - name: Persist GraalVM build uses: actions/upload-artifact@v4 with: