From 0c08eaeeea7a45edcf5eefdfebe53985ba240c94 Mon Sep 17 00:00:00 2001 From: Vojin Jovanovic Date: Wed, 3 Sep 2025 14:38:30 +0200 Subject: [PATCH 1/5] Test quarkus with --future-defaults --- .github/workflows/quarkus-future-defaults.yml | 56 ++++++ .github/workflows/quarkus-template.yml | 182 ++++++++++++++++++ .github/workflows/quarkus.yml | 135 +------------ 3 files changed, 241 insertions(+), 132 deletions(-) create mode 100644 .github/workflows/quarkus-future-defaults.yml create mode 100644 .github/workflows/quarkus-template.yml diff --git a/.github/workflows/quarkus-future-defaults.yml b/.github/workflows/quarkus-future-defaults.yml new file mode 100644 index 000000000000..86b3a114b9cd --- /dev/null +++ b/.github/workflows/quarkus-future-defaults.yml @@ -0,0 +1,56 @@ +# +# Copyright (c) 2020, 2025, 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: Weekly Quarkus Tests (--future-defaults=all) + +on: + pull_request: + paths: + - '.github/workflows/quarkus-future-defaults.yml' + - '.github/workflows/quarkus-template.yml' + schedule: + - cron: '0 3 * * 1' + workflow_dispatch: + +jobs: + call-template: + uses: './.github/workflows/quarkus-template.yml' + with: + NATIVE_IMAGE_OPTIONS: '--future-defaults=all' diff --git a/.github/workflows/quarkus-template.yml b/.github/workflows/quarkus-template.yml new file mode 100644 index 000000000000..2467f4fc7110 --- /dev/null +++ b/.github/workflows/quarkus-template.yml @@ -0,0 +1,182 @@ +# +# Copyright (c) 2020, 2025, 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. +# +on: + workflow_call: + inputs: + NATIVE_IMAGE_OPTIONS: + required: false + type: string + +env: + COMMON_MAVEN_ARGS: "-e -B --settings .github/mvn-settings.xml --fail-at-end" + DB_NAME: hibernate_orm_test + DB_PASSWORD: hibernate_orm_test + DB_USER: hibernate_orm_test + NATIVE_TEST_MAVEN_ARGS: "-Dtest-containers -Dstart-containers -Dquarkus.native.native-image-xmx=6g -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 + +name: Weekly Quarkus Tests + +permissions: {} +jobs: + build-quarkus-and-graalvm: + permissions: + contents: read # to fetch code (actions/checkout) + + name: Nightly Quarkus and GraalVM build${{ inputs.NATIVE_IMAGE_OPTIONS && format(' ({0})', inputs.NATIVE_IMAGE_OPTIONS) || '' }} + runs-on: ubuntu-22.04 + if: (github.event_name == 'schedule' && github.repository == 'oracle/graal') || (github.event_name != 'schedule') + 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: + 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}') + echo Getting Quarkus $QUARKUS_VERSION + curl --output quarkus.tgz -sL https://api.github.com/repos/quarkusio/quarkus/tarball/$QUARKUS_VERSION + mkdir ${QUARKUS_PATH} + tar xf quarkus.tgz -C ${QUARKUS_PATH} --strip-components=1 + - uses: actions/cache@v4 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + - name: Tar GraalVM JDK + shell: bash + run: tar -czvhf graalvm.tgz -C $(dirname ${GRAALVM_HOME}) $(basename ${GRAALVM_HOME}) + - name: Persist GraalVM JDK build + uses: actions/upload-artifact@v4 + with: + name: graalvm + path: graalvm.tgz + - name: Build Quarkus + run: | + cd ${QUARKUS_PATH} + eval ./mvnw -e -B -Dquickly + - name: Read json file with native-tests matrix + id: read + run: | + json=$(tr -d '\n' < ${QUARKUS_PATH}/.github/native-tests.json ) + echo $json + echo "matrix=${json}" >> $GITHUB_OUTPUT + - name: Tar Maven Repo + shell: bash + run: tar -czvf maven-repo.tgz -C ~ .m2/repository + - name: Persist Maven Repo + uses: actions/upload-artifact@v4 + with: + name: maven-repo + path: maven-repo.tgz + + native-tests: + name: Native Tests - ${{matrix.category}}${{ inputs.NATIVE_IMAGE_OPTIONS && format(' with options ({0})', inputs.NATIVE_IMAGE_OPTIONS) || '' }} + 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: + max-parallel: 8 + fail-fast: false + matrix: ${{ fromJson(needs.build-quarkus-and-graalvm.outputs.matrix) }} + steps: + - name: Download GraalVM JDK build + if: startsWith(matrix.os-name, 'ubuntu') + uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1 + with: + name: graalvm + path: . + - name: Extract GraalVM JDK build + if: startsWith(matrix.os-name, 'ubuntu') + shell: bash + run: tar -xzvf graalvm.tgz -C $(dirname ${GRAALVM_HOME}) + - name: Get latest Quarkus release + if: startsWith(matrix.os-name, 'ubuntu') + run: | + export QUARKUS_VERSION=main #$(curl https://repo1.maven.org/maven2/io/quarkus/quarkus-bom/maven-metadata.xml | awk -F"[<>]" '/latest/ {print $3}') + echo Getting Quarkus $QUARKUS_VERSION + curl --output quarkus.tgz -sL https://api.github.com/repos/quarkusio/quarkus/tarball/$QUARKUS_VERSION + mkdir ${QUARKUS_PATH} + tar xf quarkus.tgz -C ${QUARKUS_PATH} --strip-components=1 + - name: Reclaim Disk Space + if: startsWith(matrix.os-name, 'ubuntu') + run: ${QUARKUS_PATH}/.github/ci-prerequisites.sh + - name: Download Maven Repo + if: startsWith(matrix.os-name, 'ubuntu') + uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1 + with: + name: maven-repo + path: . + - name: Extract Maven Repo + if: startsWith(matrix.os-name, 'ubuntu') + shell: bash + run: tar -xzf maven-repo.tgz -C ~ + - uses: actions/setup-java@v4 + with: + distribution: 'oracle' + java-version: '17' + - name: Build with Maven + if: startsWith(matrix.os-name, 'ubuntu') + env: + TEST_MODULES: ${{matrix.test-modules}} + run: | + cd ${QUARKUS_PATH} + ${GRAALVM_HOME}/bin/native-image --version + ./mvnw $COMMON_MAVEN_ARGS -f integration-tests -pl "$TEST_MODULES" $NATIVE_TEST_MAVEN_ARGS + - name: Prepare failure archive (if maven failed) + if: failure() + shell: bash + run: find . -type d -name '*-reports' -o -wholename '*/build/reports/tests/functionalTest' | tar -czf test-reports.tgz -T - + - name: Upload failure Archive (if maven failed) + uses: actions/upload-artifact@v4 + if: failure() + with: + name: test-reports-native-${{matrix.category}} + path: 'test-reports.tgz' diff --git a/.github/workflows/quarkus.yml b/.github/workflows/quarkus.yml index 6658b45c26c1..83ec81d56e40 100644 --- a/.github/workflows/quarkus.yml +++ b/.github/workflows/quarkus.yml @@ -44,140 +44,11 @@ on: pull_request: paths: - '.github/workflows/quarkus.yml' + - '.github/workflows/quarkus-template.yml' schedule: - cron: '0 3 * * 1' workflow_dispatch: -env: - COMMON_MAVEN_ARGS: "-e -B --settings .github/mvn-settings.xml --fail-at-end" - DB_NAME: hibernate_orm_test - DB_PASSWORD: hibernate_orm_test - DB_USER: hibernate_orm_test - NATIVE_TEST_MAVEN_ARGS: "-Dtest-containers -Dstart-containers -Dquarkus.native.native-image-xmx=6g -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: {} jobs: - build-quarkus-and-graalvm: - permissions: - contents: read # to fetch code (actions/checkout) - - name: Nightly Quarkus and GraalVM build - runs-on: ubuntu-22.04 - if: (github.event_name == 'schedule' && github.repository == 'oracle/graal') || (github.event_name != 'schedule') - 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: - 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}') - echo Getting Quarkus $QUARKUS_VERSION - curl --output quarkus.tgz -sL https://api.github.com/repos/quarkusio/quarkus/tarball/$QUARKUS_VERSION - mkdir ${QUARKUS_PATH} - tar xf quarkus.tgz -C ${QUARKUS_PATH} --strip-components=1 - - uses: actions/cache@v4 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- - - name: Tar GraalVM JDK - shell: bash - run: tar -czvhf graalvm.tgz -C $(dirname ${GRAALVM_HOME}) $(basename ${GRAALVM_HOME}) - - name: Persist GraalVM JDK build - uses: actions/upload-artifact@v4 - with: - name: graalvm - path: graalvm.tgz - - name: Build Quarkus - run: | - cd ${QUARKUS_PATH} - eval ./mvnw -e -B -Dquickly - - name: Read json file with native-tests matrix - id: read - run: | - json=$(tr -d '\n' < ${QUARKUS_PATH}/.github/native-tests.json ) - echo $json - echo "matrix=${json}" >> $GITHUB_OUTPUT - - name: Tar Maven Repo - shell: bash - run: tar -czvf maven-repo.tgz -C ~ .m2/repository - - name: Persist Maven Repo - uses: actions/upload-artifact@v4 - with: - name: maven-repo - path: maven-repo.tgz - - native-tests: - 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: - max-parallel: 8 - fail-fast: false - matrix: ${{ fromJson(needs.build-quarkus-and-graalvm.outputs.matrix) }} - steps: - - name: Download GraalVM JDK build - if: startsWith(matrix.os-name, 'ubuntu') - uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1 - with: - name: graalvm - path: . - - name: Extract GraalVM JDK build - if: startsWith(matrix.os-name, 'ubuntu') - shell: bash - run: tar -xzvf graalvm.tgz -C $(dirname ${GRAALVM_HOME}) - - name: Get latest Quarkus release - if: startsWith(matrix.os-name, 'ubuntu') - run: | - export QUARKUS_VERSION=main #$(curl https://repo1.maven.org/maven2/io/quarkus/quarkus-bom/maven-metadata.xml | awk -F"[<>]" '/latest/ {print $3}') - echo Getting Quarkus $QUARKUS_VERSION - curl --output quarkus.tgz -sL https://api.github.com/repos/quarkusio/quarkus/tarball/$QUARKUS_VERSION - mkdir ${QUARKUS_PATH} - tar xf quarkus.tgz -C ${QUARKUS_PATH} --strip-components=1 - - name: Reclaim Disk Space - if: startsWith(matrix.os-name, 'ubuntu') - run: ${QUARKUS_PATH}/.github/ci-prerequisites.sh - - name: Download Maven Repo - if: startsWith(matrix.os-name, 'ubuntu') - uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1 - with: - name: maven-repo - path: . - - name: Extract Maven Repo - if: startsWith(matrix.os-name, 'ubuntu') - shell: bash - run: tar -xzf maven-repo.tgz -C ~ - - uses: actions/setup-java@v4 - with: - distribution: 'oracle' - java-version: '17' - - name: Build with Maven - if: startsWith(matrix.os-name, 'ubuntu') - env: - TEST_MODULES: ${{matrix.test-modules}} - run: | - cd ${QUARKUS_PATH} - ${GRAALVM_HOME}/bin/native-image --version - ./mvnw $COMMON_MAVEN_ARGS -f integration-tests -pl "$TEST_MODULES" $NATIVE_TEST_MAVEN_ARGS - - name: Prepare failure archive (if maven failed) - if: failure() - shell: bash - run: find . -type d -name '*-reports' -o -wholename '*/build/reports/tests/functionalTest' | tar -czf test-reports.tgz -T - - - name: Upload failure Archive (if maven failed) - uses: actions/upload-artifact@v4 - if: failure() - with: - name: test-reports-native-${{matrix.category}} - path: 'test-reports.tgz' + call-template: + uses: './.github/workflows/quarkus-template.yml' From 84efd6b0037672a57fc4d577087418f5b216b516 Mon Sep 17 00:00:00 2001 From: Vojin Jovanovic Date: Wed, 3 Sep 2025 19:36:48 +0200 Subject: [PATCH 2/5] Test Spring with --future-defaults --- .github/workflows/spring-future-defaults.yml | 56 ++++++++++++++ .github/workflows/spring-template.yml | 77 ++++++++++++++++++++ .github/workflows/spring.yml | 30 +------- 3 files changed, 136 insertions(+), 27 deletions(-) create mode 100644 .github/workflows/spring-future-defaults.yml create mode 100644 .github/workflows/spring-template.yml diff --git a/.github/workflows/spring-future-defaults.yml b/.github/workflows/spring-future-defaults.yml new file mode 100644 index 000000000000..91a588463f7c --- /dev/null +++ b/.github/workflows/spring-future-defaults.yml @@ -0,0 +1,56 @@ +# +# Copyright (c) 2024, 2025, 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: Weekly Spring Tests (--future-defaults=all) + +on: + pull_request: + paths: + - '.github/workflows/spring-template.yml' + - '.github/workflows/spring.yml' + schedule: + - cron: '0 4 * * 1' + workflow_dispatch: + +jobs: + call-template: + uses: './.github/workflows/spring-template.yml' + with: + NATIVE_IMAGE_OPTIONS: '--future-defaults=all' diff --git a/.github/workflows/spring-template.yml b/.github/workflows/spring-template.yml new file mode 100644 index 000000000000..7fa687758971 --- /dev/null +++ b/.github/workflows/spring-template.yml @@ -0,0 +1,77 @@ +# +# Copyright (c) 2024, 2025, 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: Weekly Spring Tests + +on: + workflow_call: + inputs: + NATIVE_IMAGE_OPTIONS: + required: false + type: string + +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-22.04 + if: (github.event_name == 'schedule' && github.repository == 'oracle/graal') || (github.event_name != 'schedule') + steps: + - name: Checkout oracle/graal + uses: actions/checkout@v4 + - 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 + path: ${{ env.SPRING_PETCLINIC_PATH }} + - name: Run nativeTest in spring-petclinic${{ inputs.NATIVE_IMAGE_OPTIONS && format(' with options ({0})', inputs.NATIVE_IMAGE_OPTIONS) || '' }} + run: | + cd ${{ env.SPRING_PETCLINIC_PATH }} + ./gradlew nativeTest diff --git a/.github/workflows/spring.yml b/.github/workflows/spring.yml index 80782556080b..e5033b435467 100644 --- a/.github/workflows/spring.yml +++ b/.github/workflows/spring.yml @@ -43,36 +43,12 @@ name: Weekly Spring Tests on: pull_request: paths: + - '.github/workflows/spring-template.yml' - '.github/workflows/spring.yml' schedule: - cron: '0 4 * * 1' 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-22.04 - if: (github.event_name == 'schedule' && github.repository == 'oracle/graal') || (github.event_name != 'schedule') - steps: - - name: Checkout oracle/graal - uses: actions/checkout@v4 - - 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 - path: ${{ env.SPRING_PETCLINIC_PATH }} - - name: Run nativeTest in spring-petclinic - run: | - cd ${{ env.SPRING_PETCLINIC_PATH }} - ./gradlew nativeTest + call-template: + uses: './.github/workflows/spring-template.yml' From 5bc02ffdcb52f4c55dbac5ce0dadfb90ae04bfe5 Mon Sep 17 00:00:00 2001 From: Vojin Jovanovic Date: Thu, 4 Sep 2025 10:53:48 +0200 Subject: [PATCH 3/5] Test reachabilty metadata with --future-defaults --- .../reachability-metadata-future-defaults.yml | 56 ++++++++ .../reachability-metadata-template.yml | 136 ++++++++++++++++++ .github/workflows/reachability-metadata.yml | 90 +----------- 3 files changed, 196 insertions(+), 86 deletions(-) create mode 100644 .github/workflows/reachability-metadata-future-defaults.yml create mode 100644 .github/workflows/reachability-metadata-template.yml diff --git a/.github/workflows/reachability-metadata-future-defaults.yml b/.github/workflows/reachability-metadata-future-defaults.yml new file mode 100644 index 000000000000..43310f40d1c3 --- /dev/null +++ b/.github/workflows/reachability-metadata-future-defaults.yml @@ -0,0 +1,56 @@ +# +# Copyright (c) 2024, 2025, 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: Weekly Reachability Metadata Tests (--future-defaults=all) + +on: + pull_request: + paths: + - '.github/workflows/reachability-metadata-template.yml' + - '.github/workflows/reachability-metadata-future-defaults.yml' + schedule: + - cron: '0 1 * * 1' + workflow_dispatch: + +jobs: + call-template: + uses: './.github/workflows/reachability-metadata-template.yml' + with: + NATIVE_IMAGE_OPTIONS: '--future-defaults=all' diff --git a/.github/workflows/reachability-metadata-template.yml b/.github/workflows/reachability-metadata-template.yml new file mode 100644 index 000000000000..13a5d84f70f5 --- /dev/null +++ b/.github/workflows/reachability-metadata-template.yml @@ -0,0 +1,136 @@ +# +# Copyright (c) 2024, 2025, 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: Weekly Reachability Metadata Tests + +on: + workflow_call: + inputs: + NATIVE_IMAGE_OPTIONS: + required: false + type: string + +env: + REACHABILITY_METADATA_PATH: ${{ github.workspace }}/graalvm-reachability-metadata + MINIMUM_METADATA_JAVA_VERSION: 17 + +permissions: + contents: read # to fetch code (actions/checkout) + +jobs: + build-graalvm-and-populate-matrix: + name: Build GraalVM and populate matrix + runs-on: ubuntu-22.04 + if: (github.event_name == 'schedule' && github.repository == 'oracle/graal') || (github.event_name != 'schedule') + outputs: + matrix: ${{ steps.set-matrix.outputs.matrix }} + steps: + - name: Checkout oracle/graal + uses: actions/checkout@v4 + - name: Build GraalVM JDK + uses: ./.github/actions/build-graalvm + with: + native-images: 'native-image,native-image-configure,lib:native-image-agent' + components: 'Native Image,Native Image Configure Tool' + java-version: ${{ env.MINIMUM_METADATA_JAVA_VERSION }} + - name: Tar GraalVM JDK + shell: bash + run: tar -czvhf graalvm.tgz -C $(dirname ${GRAALVM_HOME}) $(basename ${GRAALVM_HOME}) + - name: Persist GraalVM JDK build + uses: actions/upload-artifact@v4 + with: + name: graalvm + path: graalvm.tgz + - name: Checkout oracle/graalvm-reachability-metadata + uses: actions/checkout@v4 + with: + # change the repository and ref test potential fixes + repository: oracle/graalvm-reachability-metadata + ref: master + path: ${{ env.REACHABILITY_METADATA_PATH }} + - name: "Populate matrix" + id: set-matrix + run: | + cd ${{ env.REACHABILITY_METADATA_PATH }} + ./gradlew generateMatrixMatchingCoordinates -Pcoordinates=all + + test-all-metadata: + name: ${{ matrix.coordinates }} + runs-on: ubuntu-latest + env: + GRAALVM_HOME: ${{ github.workspace }}/graalvm # identical to the one in ./.github/actions/build-graalvm + timeout-minutes: 20 + needs: build-graalvm-and-populate-matrix + strategy: + fail-fast: false + matrix: + coordinates: ${{fromJson(needs.build-graalvm-and-populate-matrix.outputs.matrix).coordinates}} + steps: + - name: "Checkout oracle/graalvm-reachability-metadata" + uses: actions/checkout@v4 + with: + repository: oracle/graalvm-reachability-metadata + - name: Download GraalVM JDK build + uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1 + with: + name: graalvm + path: . + - name: Extract GraalVM JDK build + run: tar -xzvf graalvm.tgz -C $(dirname ${GRAALVM_HOME}) + - name: "Setup JAVA_HOME" + uses: actions/setup-java@v4 + with: + distribution: 'oracle' + java-version: ${{ env.MINIMUM_METADATA_JAVA_VERSION }} + - name: "Pull allowed docker images" + run: | + ./gradlew pullAllowedDockerImages --coordinates=${{ matrix.coordinates }} + - name: "Disable docker" + run: | + sudo apt-get install openbsd-inetd + sudo bash -c "cat ./.github/workflows/discard-port.conf >> /etc/inetd.conf" + sudo systemctl start inetd + sudo mkdir /etc/systemd/system/docker.service.d + sudo bash -c "cat ./.github/workflows/dockerd.service > /etc/systemd/system/docker.service.d/http-proxy.conf" + sudo systemctl daemon-reload + sudo systemctl restart docker + - name: "Run '${{ matrix.coordinates }}' tests" + run: | + ./gradlew test -Pcoordinates=${{ matrix.coordinates }} diff --git a/.github/workflows/reachability-metadata.yml b/.github/workflows/reachability-metadata.yml index 0a9908f10076..2c5906ddccd0 100644 --- a/.github/workflows/reachability-metadata.yml +++ b/.github/workflows/reachability-metadata.yml @@ -1,5 +1,5 @@ # -# Copyright (c) 2024, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2024, 2025, 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 @@ -43,94 +43,12 @@ name: Weekly Reachability Metadata Tests on: pull_request: paths: + - '.github/workflows/reachability-metadata-template.yml' - '.github/workflows/reachability-metadata.yml' schedule: - cron: '0 1 * * 1' workflow_dispatch: -env: - REACHABILITY_METADATA_PATH: ${{ github.workspace }}/graalvm-reachability-metadata - MINIMUM_METADATA_JAVA_VERSION: 17 - -permissions: - contents: read # to fetch code (actions/checkout) - jobs: - build-graalvm-and-populate-matrix: - name: Build GraalVM and populate matrix - runs-on: ubuntu-22.04 - if: (github.event_name == 'schedule' && github.repository == 'oracle/graal') || (github.event_name != 'schedule') - outputs: - matrix: ${{ steps.set-matrix.outputs.matrix }} - steps: - - name: Checkout oracle/graal - uses: actions/checkout@v4 - - name: Build GraalVM JDK - uses: ./.github/actions/build-graalvm - with: - native-images: 'native-image,native-image-configure,lib:native-image-agent' - components: 'Native Image,Native Image Configure Tool' - java-version: ${{ env.MINIMUM_METADATA_JAVA_VERSION }} - - name: Tar GraalVM JDK - shell: bash - run: tar -czvhf graalvm.tgz -C $(dirname ${GRAALVM_HOME}) $(basename ${GRAALVM_HOME}) - - name: Persist GraalVM JDK build - uses: actions/upload-artifact@v4 - with: - name: graalvm - path: graalvm.tgz - - name: Checkout oracle/graalvm-reachability-metadata - uses: actions/checkout@v4 - with: - repository: oracle/graalvm-reachability-metadata - path: ${{ env.REACHABILITY_METADATA_PATH }} - - name: "Populate matrix" - id: set-matrix - run: | - cd ${{ env.REACHABILITY_METADATA_PATH }} - ./gradlew generateMatrixMatchingCoordinates -Pcoordinates=all - - test-all-metadata: - name: ${{ matrix.coordinates }} - runs-on: ubuntu-latest - env: - GRAALVM_HOME: ${{ github.workspace }}/graalvm # identical to the one in ./.github/actions/build-graalvm - timeout-minutes: 20 - needs: build-graalvm-and-populate-matrix - strategy: - fail-fast: false - matrix: - coordinates: ${{fromJson(needs.build-graalvm-and-populate-matrix.outputs.matrix).coordinates}} - steps: - - name: "Checkout oracle/graalvm-reachability-metadata" - uses: actions/checkout@v4 - with: - repository: oracle/graalvm-reachability-metadata - - name: Download GraalVM JDK build - uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1 - with: - name: graalvm - path: . - - name: Extract GraalVM JDK build - run: tar -xzvf graalvm.tgz -C $(dirname ${GRAALVM_HOME}) - - name: "Setup JAVA_HOME" - uses: actions/setup-java@v4 - with: - distribution: 'oracle' - java-version: ${{ env.MINIMUM_METADATA_JAVA_VERSION }} - - name: "Pull allowed docker images" - run: | - ./gradlew pullAllowedDockerImages --coordinates=${{ matrix.coordinates }} - - name: "Disable docker" - run: | - sudo apt-get install openbsd-inetd - sudo bash -c "cat ./.github/workflows/discard-port.conf >> /etc/inetd.conf" - sudo systemctl start inetd - sudo mkdir /etc/systemd/system/docker.service.d - sudo bash -c "cat ./.github/workflows/dockerd.service > /etc/systemd/system/docker.service.d/http-proxy.conf" - sudo systemctl daemon-reload - sudo systemctl restart docker - - name: "Run '${{ matrix.coordinates }}' tests" - run: | - ./gradlew test -Pcoordinates=${{ matrix.coordinates }} - \ No newline at end of file + call-template: + uses: './.github/workflows/reachability-metadata-template.yml' From 980bf8db7ea3f5bed34b524fc0d41f722aec91f6 Mon Sep 17 00:00:00 2001 From: Vojin Jovanovic Date: Thu, 4 Sep 2025 14:51:58 +0200 Subject: [PATCH 4/5] Test micronaut with --future-defaults --- .../workflows/micronaut-future-defaults.yml | 54 ++++++++++++ .github/workflows/micronaut-template.yml | 85 +++++++++++++++++++ .github/workflows/micronaut.yml | 38 +-------- 3 files changed, 142 insertions(+), 35 deletions(-) create mode 100644 .github/workflows/micronaut-future-defaults.yml create mode 100644 .github/workflows/micronaut-template.yml diff --git a/.github/workflows/micronaut-future-defaults.yml b/.github/workflows/micronaut-future-defaults.yml new file mode 100644 index 000000000000..3561cc79dead --- /dev/null +++ b/.github/workflows/micronaut-future-defaults.yml @@ -0,0 +1,54 @@ +# +# Copyright (c) 2024, 2025, 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: Weekly Micronaut Tests (--future-defaults=all) + +on: + pull_request: + paths: + - '.github/workflows/micronaut-template.yml' + - '.github/workflows/micronaut-future-defaults.yml' + schedule: + - cron: '0 2 * * 1' + workflow_dispatch: + +jobs: + call-template: + uses: './.github/workflows/micronaut-template.yml' diff --git a/.github/workflows/micronaut-template.yml b/.github/workflows/micronaut-template.yml new file mode 100644 index 000000000000..ddcb2f0b67a0 --- /dev/null +++ b/.github/workflows/micronaut-template.yml @@ -0,0 +1,85 @@ +# +# Copyright (c) 2024, 2025, 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: Weekly Micronaut Tests + +on: + workflow_call: + inputs: + NATIVE_IMAGE_OPTIONS: + required: false + type: string + +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) + +jobs: + build-graalvm-and-micronaut: + name: Native Tests + runs-on: ubuntu-22.04 + if: (github.event_name == 'schedule' && github.repository == 'oracle/graal') || (github.event_name != 'schedule') + steps: + - name: Checkout oracle/graal + uses: actions/checkout@v4 + - name: Build GraalVM JDK + uses: ./.github/actions/build-graalvm + with: + 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_JAVA_VERSION }}' + unzip demo.zip + cd demo + ./gradlew nativeTest + - name: Checkout micronaut-projects/micronaut-core + uses: actions/checkout@v4 + with: + repository: micronaut-projects/micronaut-core + path: ${{ env.MICRONAUT_CORE_PATH }} + - name: Run nativeTest in micronaut-core + run: | + cd ${{ env.MICRONAUT_CORE_PATH }} + ./gradlew nativeTest diff --git a/.github/workflows/micronaut.yml b/.github/workflows/micronaut.yml index da850d5daa79..b9dd822d21a1 100644 --- a/.github/workflows/micronaut.yml +++ b/.github/workflows/micronaut.yml @@ -43,44 +43,12 @@ name: Weekly Micronaut Tests on: pull_request: paths: + - '.github/workflows/micronaut-template.yml' - '.github/workflows/micronaut.yml' schedule: - cron: '0 2 * * 1' workflow_dispatch: -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) - jobs: - build-graalvm-and-micronaut: - name: Native Tests - runs-on: ubuntu-22.04 - if: (github.event_name == 'schedule' && github.repository == 'oracle/graal') || (github.event_name != 'schedule') - steps: - - name: Checkout oracle/graal - uses: actions/checkout@v4 - - name: Build GraalVM JDK - uses: ./.github/actions/build-graalvm - with: - 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_JAVA_VERSION }}' - unzip demo.zip - cd demo - ./gradlew nativeTest - - name: Checkout micronaut-projects/micronaut-core - uses: actions/checkout@v4 - with: - repository: micronaut-projects/micronaut-core - path: ${{ env.MICRONAUT_CORE_PATH }} - - name: Run nativeTest in micronaut-core - run: | - cd ${{ env.MICRONAUT_CORE_PATH }} - ./gradlew nativeTest + call-template: + uses: './.github/workflows/micronaut-template.yml' From 07b823b8166f9e1e0dd17b5b8b99f8b64cfc4a6d Mon Sep 17 00:00:00 2001 From: Vojin Jovanovic Date: Thu, 4 Sep 2025 19:29:44 +0200 Subject: [PATCH 5/5] Print job names with options --- .github/workflows/micronaut-template.yml | 2 +- .github/workflows/quarkus-template.yml | 4 ++-- .github/workflows/reachability-metadata-template.yml | 2 +- .github/workflows/spring-template.yml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/micronaut-template.yml b/.github/workflows/micronaut-template.yml index ddcb2f0b67a0..f20156ef2467 100644 --- a/.github/workflows/micronaut-template.yml +++ b/.github/workflows/micronaut-template.yml @@ -79,7 +79,7 @@ jobs: with: repository: micronaut-projects/micronaut-core path: ${{ env.MICRONAUT_CORE_PATH }} - - name: Run nativeTest in micronaut-core + - name: Run nativeTest in micronaut-core${{ inputs.NATIVE_IMAGE_OPTIONS && format(' with ''{0}''', inputs.NATIVE_IMAGE_OPTIONS) || '' }} run: | cd ${{ env.MICRONAUT_CORE_PATH }} ./gradlew nativeTest diff --git a/.github/workflows/quarkus-template.yml b/.github/workflows/quarkus-template.yml index 2467f4fc7110..f338244e5770 100644 --- a/.github/workflows/quarkus-template.yml +++ b/.github/workflows/quarkus-template.yml @@ -62,7 +62,7 @@ jobs: permissions: contents: read # to fetch code (actions/checkout) - name: Nightly Quarkus and GraalVM build${{ inputs.NATIVE_IMAGE_OPTIONS && format(' ({0})', inputs.NATIVE_IMAGE_OPTIONS) || '' }} + name: Nightly Quarkus and GraalVM build runs-on: ubuntu-22.04 if: (github.event_name == 'schedule' && github.repository == 'oracle/graal') || (github.event_name != 'schedule') outputs: @@ -115,7 +115,7 @@ jobs: path: maven-repo.tgz native-tests: - name: Native Tests - ${{matrix.category}}${{ inputs.NATIVE_IMAGE_OPTIONS && format(' with options ({0})', inputs.NATIVE_IMAGE_OPTIONS) || '' }} + name: Native Tests - ${{matrix.category}}${{ inputs.NATIVE_IMAGE_OPTIONS && format(' with ''{0}''', inputs.NATIVE_IMAGE_OPTIONS) || '' }} needs: build-quarkus-and-graalvm runs-on: ubuntu-latest env: diff --git a/.github/workflows/reachability-metadata-template.yml b/.github/workflows/reachability-metadata-template.yml index 13a5d84f70f5..b4be1b04f263 100644 --- a/.github/workflows/reachability-metadata-template.yml +++ b/.github/workflows/reachability-metadata-template.yml @@ -131,6 +131,6 @@ jobs: sudo bash -c "cat ./.github/workflows/dockerd.service > /etc/systemd/system/docker.service.d/http-proxy.conf" sudo systemctl daemon-reload sudo systemctl restart docker - - name: "Run '${{ matrix.coordinates }}' tests" + - name: "Run '${{ matrix.coordinates }}' tests${{ inputs.NATIVE_IMAGE_OPTIONS && format(' with ''{0}''', inputs.NATIVE_IMAGE_OPTIONS) || '' }}" run: | ./gradlew test -Pcoordinates=${{ matrix.coordinates }} diff --git a/.github/workflows/spring-template.yml b/.github/workflows/spring-template.yml index 7fa687758971..6308d2e2fd5a 100644 --- a/.github/workflows/spring-template.yml +++ b/.github/workflows/spring-template.yml @@ -71,7 +71,7 @@ jobs: with: repository: spring-projects/spring-petclinic path: ${{ env.SPRING_PETCLINIC_PATH }} - - name: Run nativeTest in spring-petclinic${{ inputs.NATIVE_IMAGE_OPTIONS && format(' with options ({0})', inputs.NATIVE_IMAGE_OPTIONS) || '' }} + - name: Run nativeTest in spring-petclinic${{ inputs.NATIVE_IMAGE_OPTIONS && format(' with ''{0}''', inputs.NATIVE_IMAGE_OPTIONS) || '' }} run: | cd ${{ env.SPRING_PETCLINIC_PATH }} ./gradlew nativeTest