Skip to content

Commit 0c08eae

Browse files
committed
Test quarkus with --future-defaults
1 parent 91e3748 commit 0c08eae

File tree

3 files changed

+241
-132
lines changed

3 files changed

+241
-132
lines changed
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
#
2+
# Copyright (c) 2020, 2025, 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+
name: Weekly Quarkus Tests (--future-defaults=all)
42+
43+
on:
44+
pull_request:
45+
paths:
46+
- '.github/workflows/quarkus-future-defaults.yml'
47+
- '.github/workflows/quarkus-template.yml'
48+
schedule:
49+
- cron: '0 3 * * 1'
50+
workflow_dispatch:
51+
52+
jobs:
53+
call-template:
54+
uses: './.github/workflows/quarkus-template.yml'
55+
with:
56+
NATIVE_IMAGE_OPTIONS: '--future-defaults=all'
Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
#
2+
# Copyright (c) 2020, 2025, 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+
on:
42+
workflow_call:
43+
inputs:
44+
NATIVE_IMAGE_OPTIONS:
45+
required: false
46+
type: string
47+
48+
env:
49+
COMMON_MAVEN_ARGS: "-e -B --settings .github/mvn-settings.xml --fail-at-end"
50+
DB_NAME: hibernate_orm_test
51+
DB_PASSWORD: hibernate_orm_test
52+
DB_USER: hibernate_orm_test
53+
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"
54+
QUARKUS_JAVA_VERSION: 17 # Use Java 17 to build Quarkus as that's the lowest supported JDK version currently
55+
QUARKUS_PATH: ${{ github.workspace }}/quarkus
56+
57+
name: Weekly Quarkus Tests
58+
59+
permissions: {}
60+
jobs:
61+
build-quarkus-and-graalvm:
62+
permissions:
63+
contents: read # to fetch code (actions/checkout)
64+
65+
name: Nightly Quarkus and GraalVM build${{ inputs.NATIVE_IMAGE_OPTIONS && format(' ({0})', inputs.NATIVE_IMAGE_OPTIONS) || '' }}
66+
runs-on: ubuntu-22.04
67+
if: (github.event_name == 'schedule' && github.repository == 'oracle/graal') || (github.event_name != 'schedule')
68+
outputs:
69+
matrix: ${{ steps.read.outputs.matrix }}
70+
steps:
71+
- name: Checkout oracle/graal
72+
uses: actions/checkout@v4
73+
- name: Build GraalVM JDK
74+
uses: ./.github/actions/build-graalvm
75+
with:
76+
java-version: ${{ env.QUARKUS_JAVA_VERSION }}
77+
- name: Get latest Quarkus release
78+
run: |
79+
export QUARKUS_VERSION=main #$(curl https://repo1.maven.org/maven2/io/quarkus/quarkus-bom/maven-metadata.xml | awk -F"[<>]" '/latest/ {print $3}')
80+
echo Getting Quarkus $QUARKUS_VERSION
81+
curl --output quarkus.tgz -sL https://api.github.com/repos/quarkusio/quarkus/tarball/$QUARKUS_VERSION
82+
mkdir ${QUARKUS_PATH}
83+
tar xf quarkus.tgz -C ${QUARKUS_PATH} --strip-components=1
84+
- uses: actions/cache@v4
85+
with:
86+
path: ~/.m2/repository
87+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
88+
restore-keys: |
89+
${{ runner.os }}-maven-
90+
- name: Tar GraalVM JDK
91+
shell: bash
92+
run: tar -czvhf graalvm.tgz -C $(dirname ${GRAALVM_HOME}) $(basename ${GRAALVM_HOME})
93+
- name: Persist GraalVM JDK build
94+
uses: actions/upload-artifact@v4
95+
with:
96+
name: graalvm
97+
path: graalvm.tgz
98+
- name: Build Quarkus
99+
run: |
100+
cd ${QUARKUS_PATH}
101+
eval ./mvnw -e -B -Dquickly
102+
- name: Read json file with native-tests matrix
103+
id: read
104+
run: |
105+
json=$(tr -d '\n' < ${QUARKUS_PATH}/.github/native-tests.json )
106+
echo $json
107+
echo "matrix=${json}" >> $GITHUB_OUTPUT
108+
- name: Tar Maven Repo
109+
shell: bash
110+
run: tar -czvf maven-repo.tgz -C ~ .m2/repository
111+
- name: Persist Maven Repo
112+
uses: actions/upload-artifact@v4
113+
with:
114+
name: maven-repo
115+
path: maven-repo.tgz
116+
117+
native-tests:
118+
name: Native Tests - ${{matrix.category}}${{ inputs.NATIVE_IMAGE_OPTIONS && format(' with options ({0})', inputs.NATIVE_IMAGE_OPTIONS) || '' }}
119+
needs: build-quarkus-and-graalvm
120+
runs-on: ubuntu-latest
121+
env:
122+
GRAALVM_HOME: ${{ github.workspace }}/graalvm # identical to the one in ./.github/actions/build-graalvm
123+
# Ignore the following YAML Schema error
124+
timeout-minutes: ${{matrix.timeout}}
125+
strategy:
126+
max-parallel: 8
127+
fail-fast: false
128+
matrix: ${{ fromJson(needs.build-quarkus-and-graalvm.outputs.matrix) }}
129+
steps:
130+
- name: Download GraalVM JDK build
131+
if: startsWith(matrix.os-name, 'ubuntu')
132+
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
133+
with:
134+
name: graalvm
135+
path: .
136+
- name: Extract GraalVM JDK build
137+
if: startsWith(matrix.os-name, 'ubuntu')
138+
shell: bash
139+
run: tar -xzvf graalvm.tgz -C $(dirname ${GRAALVM_HOME})
140+
- name: Get latest Quarkus release
141+
if: startsWith(matrix.os-name, 'ubuntu')
142+
run: |
143+
export QUARKUS_VERSION=main #$(curl https://repo1.maven.org/maven2/io/quarkus/quarkus-bom/maven-metadata.xml | awk -F"[<>]" '/latest/ {print $3}')
144+
echo Getting Quarkus $QUARKUS_VERSION
145+
curl --output quarkus.tgz -sL https://api.github.com/repos/quarkusio/quarkus/tarball/$QUARKUS_VERSION
146+
mkdir ${QUARKUS_PATH}
147+
tar xf quarkus.tgz -C ${QUARKUS_PATH} --strip-components=1
148+
- name: Reclaim Disk Space
149+
if: startsWith(matrix.os-name, 'ubuntu')
150+
run: ${QUARKUS_PATH}/.github/ci-prerequisites.sh
151+
- name: Download Maven Repo
152+
if: startsWith(matrix.os-name, 'ubuntu')
153+
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
154+
with:
155+
name: maven-repo
156+
path: .
157+
- name: Extract Maven Repo
158+
if: startsWith(matrix.os-name, 'ubuntu')
159+
shell: bash
160+
run: tar -xzf maven-repo.tgz -C ~
161+
- uses: actions/setup-java@v4
162+
with:
163+
distribution: 'oracle'
164+
java-version: '17'
165+
- name: Build with Maven
166+
if: startsWith(matrix.os-name, 'ubuntu')
167+
env:
168+
TEST_MODULES: ${{matrix.test-modules}}
169+
run: |
170+
cd ${QUARKUS_PATH}
171+
${GRAALVM_HOME}/bin/native-image --version
172+
./mvnw $COMMON_MAVEN_ARGS -f integration-tests -pl "$TEST_MODULES" $NATIVE_TEST_MAVEN_ARGS
173+
- name: Prepare failure archive (if maven failed)
174+
if: failure()
175+
shell: bash
176+
run: find . -type d -name '*-reports' -o -wholename '*/build/reports/tests/functionalTest' | tar -czf test-reports.tgz -T -
177+
- name: Upload failure Archive (if maven failed)
178+
uses: actions/upload-artifact@v4
179+
if: failure()
180+
with:
181+
name: test-reports-native-${{matrix.category}}
182+
path: 'test-reports.tgz'

.github/workflows/quarkus.yml

Lines changed: 3 additions & 132 deletions
Original file line numberDiff line numberDiff line change
@@ -44,140 +44,11 @@ on:
4444
pull_request:
4545
paths:
4646
- '.github/workflows/quarkus.yml'
47+
- '.github/workflows/quarkus-template.yml'
4748
schedule:
4849
- cron: '0 3 * * 1'
4950
workflow_dispatch:
5051

51-
env:
52-
COMMON_MAVEN_ARGS: "-e -B --settings .github/mvn-settings.xml --fail-at-end"
53-
DB_NAME: hibernate_orm_test
54-
DB_PASSWORD: hibernate_orm_test
55-
DB_USER: hibernate_orm_test
56-
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"
57-
QUARKUS_JAVA_VERSION: 17 # Use Java 17 to build Quarkus as that's the lowest supported JDK version currently
58-
QUARKUS_PATH: ${{ github.workspace }}/quarkus
59-
60-
permissions: {}
6152
jobs:
62-
build-quarkus-and-graalvm:
63-
permissions:
64-
contents: read # to fetch code (actions/checkout)
65-
66-
name: Nightly Quarkus and GraalVM build
67-
runs-on: ubuntu-22.04
68-
if: (github.event_name == 'schedule' && github.repository == 'oracle/graal') || (github.event_name != 'schedule')
69-
outputs:
70-
matrix: ${{ steps.read.outputs.matrix }}
71-
steps:
72-
- name: Checkout oracle/graal
73-
uses: actions/checkout@v4
74-
- name: Build GraalVM JDK
75-
uses: ./.github/actions/build-graalvm
76-
with:
77-
java-version: ${{ env.QUARKUS_JAVA_VERSION }}
78-
- name: Get latest Quarkus release
79-
run: |
80-
export QUARKUS_VERSION=main #$(curl https://repo1.maven.org/maven2/io/quarkus/quarkus-bom/maven-metadata.xml | awk -F"[<>]" '/latest/ {print $3}')
81-
echo Getting Quarkus $QUARKUS_VERSION
82-
curl --output quarkus.tgz -sL https://api.github.com/repos/quarkusio/quarkus/tarball/$QUARKUS_VERSION
83-
mkdir ${QUARKUS_PATH}
84-
tar xf quarkus.tgz -C ${QUARKUS_PATH} --strip-components=1
85-
- uses: actions/cache@v4
86-
with:
87-
path: ~/.m2/repository
88-
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
89-
restore-keys: |
90-
${{ runner.os }}-maven-
91-
- name: Tar GraalVM JDK
92-
shell: bash
93-
run: tar -czvhf graalvm.tgz -C $(dirname ${GRAALVM_HOME}) $(basename ${GRAALVM_HOME})
94-
- name: Persist GraalVM JDK build
95-
uses: actions/upload-artifact@v4
96-
with:
97-
name: graalvm
98-
path: graalvm.tgz
99-
- name: Build Quarkus
100-
run: |
101-
cd ${QUARKUS_PATH}
102-
eval ./mvnw -e -B -Dquickly
103-
- name: Read json file with native-tests matrix
104-
id: read
105-
run: |
106-
json=$(tr -d '\n' < ${QUARKUS_PATH}/.github/native-tests.json )
107-
echo $json
108-
echo "matrix=${json}" >> $GITHUB_OUTPUT
109-
- name: Tar Maven Repo
110-
shell: bash
111-
run: tar -czvf maven-repo.tgz -C ~ .m2/repository
112-
- name: Persist Maven Repo
113-
uses: actions/upload-artifact@v4
114-
with:
115-
name: maven-repo
116-
path: maven-repo.tgz
117-
118-
native-tests:
119-
name: Native Tests - ${{matrix.category}}
120-
needs: build-quarkus-and-graalvm
121-
runs-on: ubuntu-latest
122-
env:
123-
GRAALVM_HOME: ${{ github.workspace }}/graalvm # identical to the one in ./.github/actions/build-graalvm
124-
# Ignore the following YAML Schema error
125-
timeout-minutes: ${{matrix.timeout}}
126-
strategy:
127-
max-parallel: 8
128-
fail-fast: false
129-
matrix: ${{ fromJson(needs.build-quarkus-and-graalvm.outputs.matrix) }}
130-
steps:
131-
- name: Download GraalVM JDK build
132-
if: startsWith(matrix.os-name, 'ubuntu')
133-
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
134-
with:
135-
name: graalvm
136-
path: .
137-
- name: Extract GraalVM JDK build
138-
if: startsWith(matrix.os-name, 'ubuntu')
139-
shell: bash
140-
run: tar -xzvf graalvm.tgz -C $(dirname ${GRAALVM_HOME})
141-
- name: Get latest Quarkus release
142-
if: startsWith(matrix.os-name, 'ubuntu')
143-
run: |
144-
export QUARKUS_VERSION=main #$(curl https://repo1.maven.org/maven2/io/quarkus/quarkus-bom/maven-metadata.xml | awk -F"[<>]" '/latest/ {print $3}')
145-
echo Getting Quarkus $QUARKUS_VERSION
146-
curl --output quarkus.tgz -sL https://api.github.com/repos/quarkusio/quarkus/tarball/$QUARKUS_VERSION
147-
mkdir ${QUARKUS_PATH}
148-
tar xf quarkus.tgz -C ${QUARKUS_PATH} --strip-components=1
149-
- name: Reclaim Disk Space
150-
if: startsWith(matrix.os-name, 'ubuntu')
151-
run: ${QUARKUS_PATH}/.github/ci-prerequisites.sh
152-
- name: Download Maven Repo
153-
if: startsWith(matrix.os-name, 'ubuntu')
154-
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
155-
with:
156-
name: maven-repo
157-
path: .
158-
- name: Extract Maven Repo
159-
if: startsWith(matrix.os-name, 'ubuntu')
160-
shell: bash
161-
run: tar -xzf maven-repo.tgz -C ~
162-
- uses: actions/setup-java@v4
163-
with:
164-
distribution: 'oracle'
165-
java-version: '17'
166-
- name: Build with Maven
167-
if: startsWith(matrix.os-name, 'ubuntu')
168-
env:
169-
TEST_MODULES: ${{matrix.test-modules}}
170-
run: |
171-
cd ${QUARKUS_PATH}
172-
${GRAALVM_HOME}/bin/native-image --version
173-
./mvnw $COMMON_MAVEN_ARGS -f integration-tests -pl "$TEST_MODULES" $NATIVE_TEST_MAVEN_ARGS
174-
- name: Prepare failure archive (if maven failed)
175-
if: failure()
176-
shell: bash
177-
run: find . -type d -name '*-reports' -o -wholename '*/build/reports/tests/functionalTest' | tar -czf test-reports.tgz -T -
178-
- name: Upload failure Archive (if maven failed)
179-
uses: actions/upload-artifact@v4
180-
if: failure()
181-
with:
182-
name: test-reports-native-${{matrix.category}}
183-
path: 'test-reports.tgz'
53+
call-template:
54+
uses: './.github/workflows/quarkus-template.yml'

0 commit comments

Comments
 (0)