Skip to content

Commit b1f2720

Browse files
committed
wip2
1 parent bf06442 commit b1f2720

File tree

1 file changed

+1
-187
lines changed

1 file changed

+1
-187
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 187 deletions
Original file line numberDiff line numberDiff line change
@@ -106,29 +106,11 @@ jobs:
106106
outputs:
107107
JVM_MODULES_MAVEN_PARAM: ${{ steps.prepare-modules-mvn-param.outputs.JVM_MODULES_MAVEN_PARAM }}
108108
NATIVE_MODULES_MAVEN_PARAM: ${{ steps.prepare-modules-mvn-param.outputs.NATIVE_MODULES_MAVEN_PARAM }}
109-
linux-validate-format:
110-
name: Validate format
111-
runs-on: ubuntu-latest
112-
needs: prepare-jvm-native-latest-modules-mvn-param
113-
strategy:
114-
matrix:
115-
java: [ 17 ]
116-
steps:
117-
- uses: actions/checkout@v5
118-
- name: Install JDK {{ matrix.java }}
119-
uses: actions/setup-java@v5
120-
with:
121-
distribution: 'temurin'
122-
java-version: ${{ matrix.java }}
123-
check-latest: true
124-
- name: Build with Maven
125-
run: |
126-
mvn -V -B --no-transfer-progress -s .github/mvn-settings.xml verify -Dall-modules -Dvalidate-format -DskipTests -DskipITs -Dquarkus.container-image.build=false -Dquarkus.container-image.push=false
127109
linux-build-jvm-latest:
128110
name: Linux JVM
129111
runs-on: ubuntu-latest
130112
timeout-minutes: 240
131-
needs: [linux-validate-format, prepare-jvm-native-latest-modules-mvn-param]
113+
needs: [prepare-jvm-native-latest-modules-mvn-param]
132114
strategy:
133115
fail-fast: false
134116
matrix:
@@ -178,171 +160,3 @@ jobs:
178160
with:
179161
name: artifacts-latest-linux-jvm${{ matrix.java }}
180162
path: artifacts-latest-linux-jvm${{ matrix.java }}.zip
181-
linux-build-native-latest:
182-
name: Linux Native
183-
runs-on: ubuntu-latest
184-
needs: [linux-validate-format, prepare-jvm-native-latest-modules-mvn-param]
185-
strategy:
186-
fail-fast: false
187-
matrix:
188-
java: [ 17 ]
189-
module-mvn-args: ${{ fromJSON(needs.prepare-jvm-native-latest-modules-mvn-param.outputs.NATIVE_MODULES_MAVEN_PARAM) }}
190-
outputs:
191-
has-flaky-tests: ${{steps.flaky-test-detector.outputs.has-flaky-tests}}
192-
steps:
193-
- uses: actions/checkout@v5
194-
- name: Reclaim Disk Space
195-
run: .github/ci-prerequisites.sh
196-
- name: Install JDK {{ matrix.java }}
197-
# Uses sha for added security since tags can be updated
198-
uses: actions/setup-java@v5
199-
with:
200-
distribution: 'temurin'
201-
java-version: ${{ matrix.java }}
202-
check-latest: true
203-
cache: 'maven'
204-
- uses: ./.github/actions/prepare-quarkus-cli
205-
- uses: ./.github/actions/use-docker-mirror
206-
- name: Build with Maven
207-
run: |
208-
mvn -fae -V -B --no-transfer-progress \
209-
-Dinclude.quarkus-cli-tests -Dts.quarkus.cli.cmd="${PWD}/quarkus-dev-cli" \
210-
${{ matrix.module-mvn-args }} clean verify -Dnative -am
211-
- name: Detect flaky tests
212-
id: flaky-test-detector
213-
if: ${{ hashFiles('**/flaky-run-report.json') != '' }}
214-
run: echo "has-flaky-tests=true" >> "$GITHUB_OUTPUT"
215-
- name: Rename flaky test run report to avoid file name conflicts
216-
id: rename-flaky-test-run-report
217-
if: ${{ hashFiles('**/flaky-run-report.json') != '' }}
218-
shell: bash
219-
run: mv target/flaky-run-report.json target/flaky-run-report-linux-native-latest.json
220-
- name: Archive flaky run report
221-
id: archive-flaky-run-report
222-
if: ${{ hashFiles('**/flaky-run-report-linux-native-latest.json') != '' }}
223-
uses: actions/upload-artifact@v4
224-
with:
225-
name: flaky-run-report-linux-native-latest
226-
path: target/flaky-run-report-linux-native-latest.json
227-
- name: Zip Artifacts
228-
if: failure()
229-
run: |
230-
zip -R artifacts-latest-linux-native${{ matrix.java }}.zip '*-reports/*'
231-
- uses: actions/upload-artifact@v4
232-
if: failure()
233-
with:
234-
name: artifacts-latest-linux-native${{ matrix.java }}
235-
path: artifacts-latest-linux-native${{ matrix.java }}.zip
236-
windows-build-jvm-latest:
237-
name: Windows JVM
238-
runs-on: windows-latest
239-
needs: [linux-validate-format, prepare-jvm-native-latest-modules-mvn-param]
240-
strategy:
241-
fail-fast: false
242-
matrix:
243-
java: [ 17 ]
244-
module-mvn-args: ${{ fromJSON(needs.prepare-jvm-native-latest-modules-mvn-param.outputs.JVM_MODULES_MAVEN_PARAM) }}
245-
outputs:
246-
has-flaky-tests: ${{steps.flaky-test-detector.outputs.has-flaky-tests}}
247-
steps:
248-
- uses: actions/checkout@v5
249-
- name: Install JDK {{ matrix.java }}
250-
uses: actions/setup-java@v5
251-
with:
252-
distribution: 'temurin'
253-
java-version: ${{ matrix.java }}
254-
check-latest: true
255-
cache: 'maven'
256-
- name: Set up Maven settings.xml
257-
run: Copy-Item -Path ".github/quarkus-snapshots-mvn-settings.xml" -Destination "$env:USERPROFILE/.m2/settings.xml"
258-
- name: Download Quarkus CLI
259-
shell: bash
260-
run: mvn -B --no-transfer-progress org.apache.maven.plugins:maven-dependency-plugin:get -Dartifact=io.quarkus:quarkus-cli:999-SNAPSHOT:jar:runner
261-
- name: Install Quarkus CLI
262-
run: |
263-
$quarkusCliFileContent = @"
264-
@ECHO OFF
265-
java -jar %HOMEDRIVE%%HOMEPATH%\.m2\repository\io\quarkus\quarkus-cli\999-SNAPSHOT\quarkus-cli-999-SNAPSHOT-runner.jar %*
266-
"@
267-
New-Item -Path "$(pwd)\quarkus-dev-cli.bat" -ItemType File
268-
Set-Content -Path "$(pwd)\quarkus-dev-cli.bat" -Value $quarkusCliFileContent
269-
./quarkus-dev-cli.bat version
270-
- name: Build in JVM mode
271-
shell: bash
272-
run: |
273-
# Need to set UTF-8 as otherwise the cp1252 is used on GH windows runner
274-
# TODO revisit this with Windows 2025 when available or when we move testing to JDK 21+ only
275-
export JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF8"
276-
mvn -B --no-transfer-progress -fae clean verify ${{ matrix.module-mvn-args }} -am -D"include.quarkus-cli-tests" -D"ts.quarkus.cli.cmd=$(pwd)\quarkus-dev-cli.bat" -D"gh-action-disable-on-win"
277-
- name: Detect flaky tests
278-
id: flaky-test-detector
279-
if: ${{ hashFiles('**/flaky-run-report.json') != '' }}
280-
shell: bash
281-
run: echo "has-flaky-tests=true" >> "$GITHUB_OUTPUT"
282-
- name: Rename flaky test run report to avoid file name conflicts
283-
id: rename-flaky-test-run-report
284-
if: ${{ hashFiles('**/flaky-run-report.json') != '' }}
285-
shell: bash
286-
run: mv target/flaky-run-report.json target/flaky-run-report-windows-jvm-latest.json
287-
- name: Archive flaky run report
288-
id: archive-flaky-run-report
289-
if: ${{ hashFiles('**/flaky-run-report-windows-jvm-latest.json') != '' }}
290-
uses: actions/upload-artifact@v4
291-
with:
292-
name: flaky-run-report-windows-jvm-latest
293-
path: target/flaky-run-report-windows-jvm-latest.json
294-
- name: Zip Artifacts
295-
shell: bash
296-
if: failure()
297-
run: |
298-
# Disambiguate windows find from cygwin find
299-
/usr/bin/find . -name '*-reports/*' -type d | tar -czf artifacts-latest-windows-jvm${{ matrix.java }}.tar -T -
300-
- name: Archive artifacts
301-
if: failure()
302-
uses: actions/upload-artifact@v4
303-
with:
304-
name: artifacts-latest-windows-jvm${{ matrix.java }}
305-
path: artifacts-latest-windows-jvm${{ matrix.java }}.tar
306-
detect-flaky-tests:
307-
name: Detect flaky tests
308-
runs-on: ubuntu-latest
309-
needs: [linux-build-jvm-latest, linux-build-native-latest, windows-build-jvm-latest]
310-
steps:
311-
- name: Create file with information about job with flaky test
312-
if: needs.linux-build-jvm-latest.outputs.has-flaky-tests == 'true' || needs.linux-build-native-latest.outputs.has-flaky-tests == 'true' || needs.windows-build-jvm-latest.outputs.has-flaky-tests == 'true'
313-
run: |
314-
job_name=""
315-
if $IS_LINUX_JVM
316-
then
317-
job_name+=", 'Linux JVM'"
318-
fi
319-
if $IS_LINUX_NATIVE
320-
then
321-
job_name+=", 'Linux Native'"
322-
fi
323-
if $IS_WINDOWS_JVM
324-
then
325-
job_name+=", 'Windows JVM'"
326-
fi
327-
echo "${job_name:2}" > jobs-with-flaky-tests
328-
env:
329-
IS_LINUX_JVM: ${{ needs.linux-build-jvm-latest.outputs.has-flaky-tests == 'true' }}
330-
IS_LINUX_NATIVE: ${{ needs.linux-build-native-latest.outputs.has-flaky-tests == 'true' }}
331-
IS_WINDOWS_JVM: ${{ needs.windows-build-jvm-latest.outputs.has-flaky-tests == 'true' }}
332-
- name: Archive 'jobs-with-flaky-tests' artifact
333-
if: ${{ hashFiles('**/jobs-with-flaky-tests') != '' }}
334-
uses: actions/upload-artifact@v4
335-
with:
336-
name: jobs-with-flaky-tests
337-
path: jobs-with-flaky-tests
338-
- name: Save PR number
339-
if: ${{ hashFiles('**/jobs-with-flaky-tests') != '' }}
340-
env:
341-
PR_NUMBER: ${{ github.event.number }}
342-
run: echo $PR_NUMBER > pr-number
343-
- name: Archive PR number
344-
uses: actions/upload-artifact@v4
345-
if: ${{ hashFiles('**/jobs-with-flaky-tests') != '' }}
346-
with:
347-
name: pr-number
348-
path: pr-number

0 commit comments

Comments
 (0)