generated from quarkiverse/quarkiverse-template
-
Notifications
You must be signed in to change notification settings - Fork 61
120 lines (104 loc) · 3.73 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
name: Build
on:
push:
branches:
- main
- "[0-9]+.[0-9]+"
- "[0-9]+.[0-9]+.x"
paths-ignore:
- '.gitignore'
- 'CODEOWNERS'
- 'LICENSE'
- 'README*'
pull_request:
env:
QUARKUS_CXF_MTOM_LARGE_ATTACHMENT_INCREMENT_KB: 512
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
build-and-run-jvm-tests:
if: startsWith(github.head_ref, 'trigger-release-') == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- name: Cache local Maven repository
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Ensure mvn cq:sync-versions -N causes no changes
shell: bash
run: |
./mvnw cq:sync-versions -Dcq.simpleElementWhitespace=AUTODETECT_PREFER_SPACE -N
[[ -z $(git status --porcelain | grep -v antora.yml) ]] || { echo 'There are uncommitted changes'; git status; git diff; exit 1; }
- name: mvn -B formatter:validate install
run: ./mvnw -B formatter:validate install
- name: 'Upload generated Antora docs site'
uses: actions/upload-artifact@v4
with:
name: docs
path: docs/target/site
- name: Fail if there are uncommitted changes
shell: bash
run: |
[[ -z $(git status --porcelain | grep -v antora.yml) ]] || { echo 'There are uncommitted changes'; git status; git diff; exit 1; }
- name: Tar Maven Repo
shell: bash
run: |
tar -czf ${{ runner.temp }}/maven-repo.tgz -C ~ .m2/repository
# Avoid caching our own artifacts
rm -Rf ~/.m2/repository/io/quarkiverse/cxf
- name: Persist Maven Repo
uses: actions/upload-artifact@v4
with:
name: maven-repo
path: ${{ runner.temp }}/maven-repo.tgz
retention-days: 1
native-tests:
strategy:
fail-fast: false
matrix:
testModule: ['client', 'client-server', 'hc5', 'metrics', 'mtom', 'mtom-awt', 'opentelemetry', 'server', 'ws-rm-client', 'ws-security-client', 'ws-security-policy', 'ws-security-policy -Djks', 'ws-security-server', 'ws-security-server -Djks', 'ws-trust', 'wsdl2java', 'wsdl2java-no-config']
name: ${{matrix.testModule}} native tests
needs: build-and-run-jvm-tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- name: Download Maven Repo
uses: actions/download-artifact@v4
with:
name: maven-repo
path: ..
- name: Extract Maven Repo
shell: bash
run: |
tar -xzf ../maven-repo.tgz -C ~
- name: Run integration test ${{matrix.testModule}}
# Skip native tests for CodeQL Security Scans
if: "${{ env.SKIP_NATIVE_TESTS != 'true' }}"
run: |
array=(${{matrix.testModule}})
if [ "${array[0]}" == "ws-rm-client" ]; then
# ws-rm-client requires test-ws-rm-server native executable
cd test-util-parent/test-ws-rm-server && ../../mvnw -B clean install -Pnative -Dquarkus.native.container-build=true
cd ../..
fi
if [ "${#array[@]}" -gt "1" ]; then
additionalArgs=("${array[@]:1}")
cd integration-tests/${array[0]} && ../../mvnw -B verify -Pnative -Dquarkus.native.container-build=true "${additionalArgs[@]}"
else
cd integration-tests/${array[0]} && ../../mvnw -B verify -Pnative -Dquarkus.native.container-build=true
fi