-
Notifications
You must be signed in to change notification settings - Fork 28
339 lines (338 loc) · 13.2 KB
/
pr.yaml
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
name: "PR"
on:
- pull_request
jobs:
validate-format:
name: Validate format
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 17 ]
steps:
- uses: actions/checkout@v4
- name: Reclaim Disk Space
run: .github/ci-prerequisites.sh
- name: Install required tools
run: sudo apt update && sudo apt install pigz
- name: Install JDK {{ matrix.java }}
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
check-latest: true
cache: 'maven'
- name: Build with Maven
run: |
mvn -V -B --no-transfer-progress -s .github/mvn-settings.xml clean install -Pframework,examples -Dvalidate-format -DskipTests -DskipITs
- name: Tar Maven Repo
shell: bash
run: tar -I 'pigz -9' -cf maven-repo-current-fw.tgz -C ~ .m2/repository
- name: Persist Maven Repo
uses: actions/upload-artifact@v4
with:
name: maven-repo-current-fw${{matrix.java}}
path: maven-repo-current-fw.tgz
retention-days: 1
quarkus-main-build:
name: Quarkus 3.15 build
runs-on: ubuntu-latest
needs: validate-format
strategy:
matrix:
java: [ 17 ]
steps:
- uses: actions/checkout@v4
- name: Reclaim Disk Space
run: .github/ci-prerequisites.sh
- name: Install required tools
run: sudo apt update && sudo apt install pigz
- name: Install JDK {{ matrix.java }}
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
check-latest: true
cache: 'maven'
- name: Build Quarkus main
run: |
git clone -b 3.15 https://github.com/quarkusio/quarkus.git && cd quarkus && ./mvnw -B --no-transfer-progress -s .github/mvn-settings.xml clean install -Dquickly -Dno-test-modules -Prelocations
- name: Tar Maven Repo
shell: bash
run: tar -I 'pigz -9' -cf maven-repo.tgz -C ~ .m2/repository
- name: Persist Maven Repo
uses: actions/upload-artifact@v4
with:
name: maven-repo${{matrix.java}}
path: maven-repo.tgz
retention-days: 1
linux-build-jvm-released:
name: Linux - JVM build - 3.15.1
runs-on: ubuntu-latest
needs: validate-format
strategy:
matrix:
quarkus-version: ["3.15.1"]
java: [ 17 ]
outputs:
has-flaky-tests: ${{steps.flaky-test-detector.outputs.has-flaky-tests}}
steps:
- uses: actions/checkout@v4
- name: Reclaim Disk Space
run: .github/ci-prerequisites.sh
- name: Install JDK {{ matrix.java }}
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
check-latest: true
cache: 'maven'
- name: Download Maven Repo
uses: actions/download-artifact@v4
with:
name: maven-repo-current-fw${{matrix.java}}
path: .
- name: Extract Maven Repo
shell: bash
run: tar -xzf maven-repo-current-fw.tgz -C ~
- name: Build in JVM mode
run: |
mvn -B --no-transfer-progress -fae -s .github/mvn-settings.xml clean install -Pexamples
- name: Detect flaky tests
id: flaky-test-detector
shell: bash
if: ${{ hashFiles('**/flaky-run-report.json') != '' }}
run: echo "has-flaky-tests=true" >> "$GITHUB_OUTPUT"
- name: Archive flaky run report
id: archive-flaky-run-report
if: ${{ hashFiles('**/flaky-run-report.json') != '' }}
uses: actions/upload-artifact@v4
with:
name: flaky-run-report-linux-jvm-released
path: target/flaky-run-report.json
- name: Zip Artifacts
run: |
zip -R artifacts-quarkus${{ matrix.quarkus-version }}-linux-jvm${{ matrix.java }}.zip '*-reports/*'
- name: Archive artifacts
uses: actions/upload-artifact@v4
with:
name: artifacts-quarkus${{ matrix.quarkus-version }}-linux-jvm${{ matrix.java }}
path: artifacts-quarkus${{ matrix.quarkus-version }}-linux-jvm${{ matrix.java }}.zip
linux-build-jvm-latest:
name: Linux - JVM build - Latest 3.15 Version
runs-on: ubuntu-latest
needs: quarkus-main-build
strategy:
matrix:
quarkus-version: ["3.15.999-SNAPSHOT"]
java: [ 17 ]
outputs:
has-flaky-tests: ${{steps.flaky-test-detector.outputs.has-flaky-tests}}
steps:
- uses: actions/checkout@v4
- name: Reclaim Disk Space
run: .github/ci-prerequisites.sh
- name: Install JDK {{ matrix.java }}
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
check-latest: true
cache: 'maven'
- name: Download Maven Repo
uses: actions/download-artifact@v4
with:
name: maven-repo${{matrix.java}}
path: .
- name: Extract Maven Repo
shell: bash
run: tar -xzf maven-repo.tgz -C ~
- name: Install Quarkus CLI
run: |
wget -O cli.zip https://github.com/quarkusio/quarkus/releases/download/3.15.1/quarkus-cli-3.15.1.zip
unzip cli.zip
chmod +x ./quarkus-cli-3.15.1/bin/quarkus
./quarkus-cli-3.15.1/bin/quarkus version
- name: Build in JVM mode
run: |
mvn -B --no-transfer-progress -fae -s .github/mvn-settings.xml clean install -Pframework,examples -Drun-cli-tests -Dts.quarkus.cli.cmd="${PWD}/quarkus-cli-3.15.1/bin/quarkus" -Dquarkus.platform.version="${{ matrix.quarkus-version }}"
- name: Detect flaky tests
id: flaky-test-detector
shell: bash
if: ${{ hashFiles('**/flaky-run-report.json') != '' }}
run: echo "has-flaky-tests=true" >> "$GITHUB_OUTPUT"
- name: Zip Artifacts
run: |
zip -R artifacts-latest-linux-jvm${{ matrix.java }}.zip '*-reports/*'
- name: Archive flaky run report
id: archive-flaky-run-report
if: ${{ hashFiles('**/flaky-run-report.json') != '' }}
uses: actions/upload-artifact@v4
with:
name: flaky-run-report-linux-jvm-latest
path: target/flaky-run-report.json
- name: Archive artifacts
uses: actions/upload-artifact@v4
with:
name: artifacts-latest-linux-jvm${{ matrix.java }}
path: artifacts-latest-linux-jvm${{ matrix.java }}.zip
linux-build-native-released:
name: Linux - Native build - Released Version
runs-on: ubuntu-latest
needs: validate-format
strategy:
matrix:
quarkus-version: [ "3.15.1" ]
java: [ 17 ]
examples: [
'examples/pingpong,examples/restclient,examples/greetings,examples/blocking-reactive-model,examples/https,examples/grpc,examples/consul,examples/infinispan,examples/microprofile,examples/keycloak,examples/kafka,examples/kafka-registry,examples/kafka-streams',
'!examples/pingpong,!examples/restclient,!examples/greetings,!examples/blocking-reactive-model,!examples/https,!examples/grpc,!examples/consul,!examples/infinispan,!examples/microprofile,!examples/keycloak,!examples/kafka,!examples/kafka-registry,!examples/kafka-streams'
]
outputs:
has-flaky-tests: ${{steps.flaky-test-detector.outputs.has-flaky-tests}}
steps:
- uses: actions/checkout@v4
- name: Reclaim Disk Space
run: .github/ci-prerequisites.sh
- name: Install JDK {{ matrix.java }}
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
check-latest: true
cache: 'maven'
- name: Download Maven Repo
uses: actions/download-artifact@v4
with:
name: maven-repo-current-fw${{matrix.java}}
path: .
- name: Extract Maven Repo
shell: bash
run: tar -xzf maven-repo-current-fw.tgz -C ~
- name: Build
run: |
mvn -B --no-transfer-progress -fae -s .github/mvn-settings.xml clean install -Pexamples,native -pl '${{ matrix.examples }}'
- name: Detect flaky tests
id: flaky-test-detector
shell: bash
if: ${{ hashFiles('**/flaky-run-report.json') != '' }}
run: echo "has-flaky-tests=true" >> "$GITHUB_OUTPUT"
- name: Archive flaky run report
id: archive-flaky-run-report
if: ${{ hashFiles('**/flaky-run-report.json') != '' }}
uses: actions/upload-artifact@v4
with:
name: flaky-run-report-linux-native-released
path: target/flaky-run-report.json
- name: Zip Artifacts
if: failure()
run: |
zip -R artifacts-native-${{ matrix.quarkus-version }}-${{ matrix.java }}.zip '*-reports/*'
- name: Archive artifacts
if: failure()
uses: actions/upload-artifact@v4
with:
name: artifacts-native-${{ matrix.quarkus-version }}-${{ matrix.java }}
path: artifacts-native-${{ matrix.quarkus-version }}-${{ matrix.java }}.zip
windows-build-jvm-latest:
name: Windows - JVM build - Latest Version
runs-on: windows-latest
needs: quarkus-main-build
strategy:
matrix:
java: [ 17 ]
quarkus-version: ["3.15.999-SNAPSHOT"]
outputs:
has-flaky-tests: ${{steps.flaky-test-detector.outputs.has-flaky-tests}}
steps:
- uses: actions/checkout@v4
- name: Install JDK {{ matrix.java }}
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
check-latest: true
cache: 'maven'
- name: Download Maven Repo
uses: actions/download-artifact@v4
with:
name: maven-repo${{matrix.java}}
path: .
- name: Extract Maven Repo
shell: bash
run: tar -xzf maven-repo.tgz -C ~
- name: Build in JVM mode
shell: bash
run: |
mvn -B --no-transfer-progress -fae -s .github/mvn-settings.xml clean install -Pframework,examples -Dquarkus.platform.version="${{ matrix.quarkus-version }}"
- name: Detect flaky tests
shell: bash
id: flaky-test-detector
if: ${{ hashFiles('**/flaky-run-report.json') != '' }}
run: echo "has-flaky-tests=true" >> "$GITHUB_OUTPUT"
- name: Archive flaky run report
id: archive-flaky-run-report
if: ${{ hashFiles('**/flaky-run-report.json') != '' }}
uses: actions/upload-artifact@v4
with:
name: flaky-run-report-windows-jvm-last
path: target/flaky-run-report.json
- name: Zip Artifacts
shell: bash
if: failure()
run: |
# Disambiguate windows find from cygwin find
/usr/bin/find . -name '*-reports/*' -type d | tar -czf artifacts-latest-windows-jvm${{ matrix.java }}.tar -T -
- name: Archive artifacts
if: failure()
uses: actions/upload-artifact@v4
with:
name: artifacts-latest-windows-jvm${{ matrix.java }}
path: artifacts-latest-windows-jvm${{ matrix.java }}.tar
detect-flaky-tests:
name: Detect flaky tests
runs-on: ubuntu-latest
needs: [linux-build-jvm-released, linux-build-jvm-latest, linux-build-native-released, windows-build-jvm-latest]
steps:
- name: Create file with information about job with flaky test
if: needs.linux-build-jvm-released.outputs.has-flaky-tests == 'true' || needs.linux-build-jvm-latest.outputs.has-flaky-tests == 'true' || needs.linux-build-native-released.outputs.has-flaky-tests == 'true' || needs.windows-build-jvm-latest.outputs.has-flaky-tests == 'true'
run: |
job_name=""
if $IS_LINUX_JVM_LATEST
then
job_name+=", 'Linux - JVM build - Latest Version'"
fi
if $IS_LINUX_JVM_RELEASED
then
job_name+=", 'Linux - JVM build - Released Versions'"
fi
if $IS_LINUX_NATIVE_RELEASED
then
job_name+=", 'Linux - Native build - Released Version'"
fi
if $IS_WINDOWS_JVM_LATEST
then
job_name+=", 'Windows - JVM build - Latest Version'"
fi
echo "${job_name:2}" > jobs-with-flaky-tests
env:
IS_LINUX_JVM_LATEST: ${{ needs.linux-build-jvm-latest.outputs.has-flaky-tests == 'true' }}
IS_LINUX_JVM_RELEASED: ${{ needs.linux-build-jvm-released.outputs.has-flaky-tests == 'true' }}
IS_LINUX_NATIVE_RELEASED: ${{ needs.linux-build-native-released.outputs.has-flaky-tests == 'true' }}
IS_WINDOWS_JVM_LATEST: ${{ needs.windows-build-jvm-latest.outputs.has-flaky-tests == 'true' }}
- name: Archive 'jobs-with-flaky-tests' artifact
if: ${{ hashFiles('**/jobs-with-flaky-tests') != '' }}
uses: actions/upload-artifact@v4
with:
name: jobs-with-flaky-tests
path: jobs-with-flaky-tests
- name: Save PR number
if: ${{ hashFiles('**/jobs-with-flaky-tests') != '' }}
env:
PR_NUMBER: ${{ github.event.number }}
run: echo $PR_NUMBER > pr-number
- name: Archive PR number
uses: actions/upload-artifact@v4
if: ${{ hashFiles('**/jobs-with-flaky-tests') != '' }}
with:
name: pr-number
path: pr-number