-
Notifications
You must be signed in to change notification settings - Fork 194
629 lines (601 loc) · 23.2 KB
/
ci-build.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
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
name: Camel Quarkus CI
on:
push:
branches:
- main
- camel-main
- quarkus-main
- "[0-9]+.[0-9]+.x"
paths-ignore:
- '**.adoc'
- '**.md'
- 'Jenkinsfile'
- 'Jenkinsfile.*'
- 'KEYS'
- 'LICENSE.txt'
- 'NOTICE.txt'
- 'camel-quarkus-sbom/**'
- '.github/*.sh'
- '.github/*.yaml'
- '.github/*.yml'
- '.github/workflows/assign-issue-milestone.yaml'
- '.github/workflows/assign-wontfix-issue-milestone.yaml'
- '.github/workflows/camel-master-cron.yaml'
- '.github/workflows/generate-sbom-main.yml'
- '.github/workflows/label-issue.yaml'
- '.github/workflows/pr-validate.yml'
- '.github/workflows/quarkus-master-cron.yaml'
- '.github/workflows/synchronize-dependabot-branch.yaml'
- 'docs/antora.yml'
pull_request:
branches:
- main
- camel-main
- quarkus-main
- "[0-9]+.[0-9]+.x"
paths-ignore:
- '**.adoc'
- '**.md'
- 'Jenkinsfile'
- 'Jenkinsfile.*'
- 'KEYS'
- 'LICENSE.txt'
- 'NOTICE.txt'
- '.github/*.sh'
- '.github/*.yaml'
- '.github/*.yml'
- '.github/workflows/assign-issue-milestone.yaml'
- '.github/workflows/assign-wontfix-issue-milestone.yaml'
- '.github/workflows/camel-master-cron.yaml'
- '.github/workflows/generate-sbom-main.yml'
- '.github/workflows/label-issue.yaml'
- '.github/workflows/pr-validate.yml'
- '.github/workflows/quarkus-master-cron.yaml'
- '.github/workflows/synchronize-dependabot-branch.yaml'
- 'docs/antora.yml'
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
env:
LANG: en_US.UTF-8
MAVEN_OPTS: -Xmx3000m
CQ_MAVEN_ARGS: -V -ntp -e -Daether.connector.http.connectionMaxTtl=120
TESTCONTAINERS_RYUK_DISABLED: true
CHECKOUT_REF: ${{ github.event_name == 'pull_request' && github.actor == 'dependabot[bot]' && github.head_ref || '' }}
jobs:
pre-build-checks:
if: github.repository == 'apache/camel-quarkus'
runs-on: ubuntu-latest
outputs:
continue-build: ${{ steps.pre-build-checks.outputs.continue-build }}
run-checks: ${{ steps.init.outputs.run-checks }}
steps:
- name: Initialize
id: init
run: |
if [[ "${{ github.event_name }}" == "pull_request" ]] && [[ "${{ github.actor }}" == "dependabot[bot]" ]]; then
echo "run-checks=true" >> $GITHUB_OUTPUT
else
echo "run-checks=false" >> $GITHUB_OUTPUT
fi
- name: Set up JDK 17
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0
if: steps.init.outputs.run-checks == 'true'
with:
distribution: 'temurin'
java-version: '17'
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
if: steps.init.outputs.run-checks == 'true'
with:
ref: ${{ env.CHECKOUT_REF }}
fetch-depth: 0
- name: Pre build checks
id: pre-build-checks
run: |
if [[ "${{ steps.init.outputs.run-checks }}" == "true" ]]; then
./mvnw cq:sync-versions -N ${CQ_MAVEN_ARGS}
./mvnw clean install -pl poms/bom -am -Dcq.flatten-bom.format --fail-never ${CQ_MAVEN_ARGS}
./mvnw clean install -f poms/bom ${CQ_MAVEN_ARGS}
./mvnw clean validate -pl docs ${CQ_MAVEN_ARGS}
if [[ -z "$(git status --porcelain)" ]]; then
echo "continue-build=true" >> $GITHUB_OUTPUT
else
mkdir ./dependabot-pr
echo ${{ github.head_ref }} > ./dependabot-pr/BRANCH_REF
echo "$GITHUB_REF" | awk -F / '{print $3}' > ./dependabot-pr/PR_NUMBER
git diff -p --binary > ./dependabot-pr/changes.patch
echo "continue-build=false" >> $GITHUB_OUTPUT
fi
else
echo "continue-build=true" >> $GITHUB_OUTPUT
fi
- name: Upload dependabot changeset
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
if: steps.pre-build-checks.outputs.continue-build == 'false'
with:
name: dependabot-pr-changeset
path: dependabot-pr/
retention-days: 1
initial-mvn-install:
if: needs.pre-build-checks.outputs.continue-build == 'true'
runs-on: ubuntu-latest
needs: pre-build-checks
outputs:
matrix: ${{ steps.set-native-matrix.outputs.matrix }}
examples-matrix: ${{ steps.set-examples-matrix.outputs.examples-matrix }}
alternate-jvm-matrix: ${{ steps.set-alternate-jvm-matrix.outputs.alternate-jvm-matrix }}
env:
MAVEN_OPTS: -Xmx4600m
steps:
- name: Check free space on disk
run: |
df -h /
- name: Set up JDK 17
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0
with:
distribution: 'temurin'
java-version: '17'
- name: Build Camel
if: github.ref == 'refs/heads/camel-main' || github.base_ref == 'camel-main'
run: |
cd ../
git clone --depth 1 --branch main https://github.com/apache/camel.git \
&& cd camel \
&& echo "Current Camel commit:" $(git rev-parse HEAD) \
&& ./mvnw ${CQ_MAVEN_ARGS} clean install -Dquickly -T1C
- name: Build Quarkus
if: github.ref == 'refs/heads/quarkus-main' || github.base_ref == 'quarkus-main'
run: |
git clone --depth 1 --branch main https://github.com/quarkusio/quarkus.git \
&& cd quarkus \
&& echo "Current Quarkus commit:" $(git rev-parse HEAD) \
&& sed -i '/<module>integration-tests<\/module>/d' pom.xml \
&& ./mvnw ${CQ_MAVEN_ARGS} clean install -Dquickly -Prelocations -T1C
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ env.CHECKOUT_REF }}
fetch-depth: 0
- name: Update extension metadata
run: |
./mvnw -N cq:update-quarkus-metadata ${CQ_MAVEN_ARGS}
- name: mvn clean install -DskipTests
run: |
eval ./mvnw ${CQ_MAVEN_ARGS} ${BRANCH_OPTIONS} clean install -DskipTests -Dquarkus.build.skip -Pformat
- name: Sync Maven properties
run: |
./mvnw cq:sync-versions ${CQ_MAVEN_ARGS} -N
- 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
ls -lh ${{ runner.temp }}/maven-repo.tgz
df -h /
- name: Persist Maven Repo
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: maven-repo
path: ${{ runner.temp }}/maven-repo.tgz
retention-days: 1
- name: Setup Native Test Matrix
id: set-native-matrix
run: |
CATEGORIES=$(yq -M -N -I 0 -o=json e 'keys' tooling/scripts/test-categories.yaml | tr '"' "'")
echo "matrix={'category': ${CATEGORIES}}" >> $GITHUB_OUTPUT
- name: Setup Alternate JVM Matrix
id: set-alternate-jvm-matrix
shell: bash
run: |
cd integration-tests
mvn help:evaluate -Dexpression=project.modules -N -q -DforceStdout | sed -e 's/<[^>]*>//g' -e 's/^[[:space:]]*//' -e '/^$/d' > ${{ runner.temp }}/itest-modules.txt
GROUP1_MODULES=$(cat ${{ runner.temp }}/itest-modules.txt | grep -E '^[a-m].*' | tr '\n' ',' | sed 's/,$//')
GROUP2_MODULES=$(cat ${{ runner.temp }}/itest-modules.txt | grep -E '^[n-z].*' | tr '\n' ',' | sed 's/,$//')
echo "alternate-jvm-matrix={'include': [{'name': 'group-01', 'modules': '${GROUP1_MODULES}'},{'name': 'group-02', 'modules': '${GROUP2_MODULES}'}]}" >> $GITHUB_OUTPUT
- name: Setup Examples Matrix
id: set-examples-matrix
run: |
EXAMPLES_BRANCH="camel-quarkus-main"
if [[ ${GITHUB_REF_NAME} =~ [0-9]+.[0-9]+.x ]]; then
EXAMPLES_BRANCH=${GITHUB_REF_NAME}
elif [[ ${GITHUB_BASE_REF} =~ [0-9]+.[0-9]+.x ]]; then
EXAMPLES_BRANCH=${GITHUB_BASE_REF}
fi
sudo apt install groovy -y --no-install-recommends
EXAMPLES_MATRIX=$(groovy -DEXAMPLES_BRANCH=${EXAMPLES_BRANCH} tooling/scripts/generate-examples-matrix.groovy)
echo "examples-matrix=${EXAMPLES_MATRIX}" >> $GITHUB_OUTPUT
native-tests:
name: Native Tests - ${{matrix.category}}
needs: initial-mvn-install
runs-on: ubuntu-latest
if: github.event_name != 'pull_request' || !contains(github.event.pull_request.labels.*.name, 'JVM')
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.initial-mvn-install.outputs.matrix) }}
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ env.CHECKOUT_REF }}
fetch-depth: 0
- name: Reclaim Disk Space
run: .github/reclaim-disk-space.sh
- name: Set up JDK 17
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0
with:
distribution: 'temurin'
java-version: '17'
- name: Download Maven Repo
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: maven-repo
path: ..
- name: Extract Maven Repo
shell: bash
run: |
df -h /
tar -xzf ../maven-repo.tgz -C ~
rm -f ../maven-repo.tgz
df -h /
- name: Integration Tests
run: |
for MODULE in $(yq -M -N e ".${{ matrix.category }}" tooling/scripts/test-categories.yaml | grep -vE '^\s*#' | cut -f2 -d' '); do
if [[ "${MODULE}" == "null" ]]; then
continue
fi
MODULE="integration-tests/$(echo ${MODULE} | sed 's/^[ \t]*//;s/[ \t]*$//')"
if [[ "x$(./mvnw org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate -Dexpression=ci.native.tests.skip -DforceStdout -q -f ${MODULE})" == "xtrue" ]]; then
JVM_MODULES+=("${MODULE}")
else
NATIVE_MODULES+=("${MODULE}")
fi
done
if [[ ${#JVM_MODULES[@]} -eq 0 ]] && [[ ${#NATIVE_MODULES[@]} -eq 0 ]]; then
echo "No test modules were found for category ${{ matrix.category }}"
exit 1
fi
IFS=,
if [[ ${JVM_MODULES[@]} ]]; then
eval ./mvnw ${CQ_MAVEN_ARGS} ${BRANCH_OPTIONS} clean test \
-Dformatter.skip -Dimpsort.skip -Denforcer.skip \
-Pdocker,ci \
-pl "${JVM_MODULES[*]}"
fi
if [[ ${NATIVE_MODULES[@]} ]]; then
eval ./mvnw ${CQ_MAVEN_ARGS} ${BRANCH_OPTIONS} clean verify \
-Dformatter.skip -Dimpsort.skip -Denforcer.skip \
-Dquarkus.native.builder-image.pull=missing \
-Pnative,docker,ci \
--fail-at-end \
-pl "${NATIVE_MODULES[*]}"
fi
- name: Report test failures
uses: ./.github/actions/test-summary-report
if: ${{ failure() }}
with:
test-report-xml-base-dir: integration-tests
- name: Fail if there are uncommitted changes
shell: bash
run: |
[[ -z $(git status --porcelain) ]] || { echo 'There are uncommitted changes'; git status; git diff; exit 1; }
functional-extension-tests:
runs-on: ubuntu-latest
needs: initial-mvn-install
if: github.event_name != 'pull_request' || !contains(github.event.pull_request.labels.*.name, 'JVM')
env:
MAVEN_OPTS: -Xmx3000m
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ env.CHECKOUT_REF }}
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0
with:
distribution: 'temurin'
java-version: '17'
- name: Download Maven Repo
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: maven-repo
path: ..
- name: Extract Maven Repo
shell: bash
run: |
df -h /
tar -xzf ../maven-repo.tgz -C ~
rm -f ../maven-repo.tgz
df -h /
- name: cd extensions-core && mvn test
run: |
cd extensions-core
../mvnw ${CQ_MAVEN_ARGS} ${BRANCH_OPTIONS} \
-Dformatter.skip -Dimpsort.skip -Denforcer.skip -Dcamel-quarkus.update-extension-doc-page.skip \
--fail-at-end \
test
- name: Report test failures
uses: ./.github/actions/test-summary-report
if: ${{ failure() }}
with:
test-report-xml-base-dir: extensions-core
- name: cd extensions && mvn test
run: |
cd extensions
../mvnw ${CQ_MAVEN_ARGS} ${BRANCH_OPTIONS} \
-Dformatter.skip -Dimpsort.skip -Denforcer.skip -Dcamel-quarkus.update-extension-doc-page.skip \
--fail-at-end \
test
- name: Report test failures
uses: ./.github/actions/test-summary-report
if: ${{ failure() }}
with:
test-report-xml-base-dir: extensions
- name: cd test-framework && mvn test
run: |
cd test-framework
../mvnw ${CQ_MAVEN_ARGS} ${BRANCH_OPTIONS} \
-Dformatter.skip -Dimpsort.skip -Denforcer.skip -Dcamel-quarkus.update-extension-doc-page.skip \
--fail-at-end \
test
- name: Report test failures
uses: ./.github/actions/test-summary-report
if: ${{ failure() }}
with:
test-report-xml-base-dir: test-framework
- name: cd tooling && mvn verify
run: |
cd tooling
../mvnw ${CQ_MAVEN_ARGS} ${BRANCH_OPTIONS} \
-Dformatter.skip -Dimpsort.skip -Denforcer.skip \
--fail-at-end \
verify
- name: Report test failures
uses: ./.github/actions/test-summary-report
if: ${{ failure() }}
with:
test-report-xml-base-dir: tooling
- name: cd catalog && mvn test
run: |
cd catalog
../mvnw ${CQ_MAVEN_ARGS} ${BRANCH_OPTIONS} \
-Dformatter.skip -Dimpsort.skip -Denforcer.skip \
test
- name: Report test failures
uses: ./.github/actions/test-summary-report
if: ${{ failure() }}
with:
test-report-xml-base-dir: catalog
extensions-jvm-tests:
runs-on: ubuntu-latest
needs: initial-mvn-install
strategy:
fail-fast: false
matrix:
java: [ '17', '21' ]
env:
MAVEN_OPTS: -Xmx3000m
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ env.CHECKOUT_REF }}
fetch-depth: 0
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
- name: Download Maven Repo
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: maven-repo
path: ..
- name: Extract Maven Repo
shell: bash
run: |
df -h /
tar -xzf ../maven-repo.tgz -C ~
rm -f ../maven-repo.tgz
df -h /
- name: cd integration-tests-jvm && mvn clean test
run: |
cd integration-tests-jvm
../mvnw ${CQ_MAVEN_ARGS} ${BRANCH_OPTIONS} \
-Dformatter.skip -Dimpsort.skip -Denforcer.skip \
--fail-at-end \
clean test
- name: Report test failures
uses: ./.github/actions/test-summary-report
if: ${{ failure() }}
with:
test-report-xml-base-dir: integration-tests-jvm
integration-tests-alternative-jdk:
name: Integration Tests Alternative JDK 21 ${{matrix.name}}
runs-on: ubuntu-latest
needs: initial-mvn-install
if: github.event_name != 'pull_request' || !contains(github.event.pull_request.labels.*.name, 'JVM')
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.initial-mvn-install.outputs.alternate-jvm-matrix) }}
env:
MAVEN_OPTS: -Xmx3000m
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ env.CHECKOUT_REF }}
fetch-depth: 0
- name: Reclaim Disk Space
run: .github/reclaim-disk-space.sh
- name: Set up JDK 21
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0
with:
distribution: 'temurin'
java-version: '21'
- name: Download Maven Repo
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: maven-repo
path: ..
- name: Extract Maven Repo
shell: bash
run: |
df -h /
tar -xzf ../maven-repo.tgz -C ~
rm -f ../maven-repo.tgz
df -h /
- name: cd integration-tests && mvn clean verify
shell: bash
env:
TEST_MODULES: ${{matrix.modules}}
run: |
cd integration-tests
../mvnw ${CQ_MAVEN_ARGS} ${BRANCH_OPTIONS} \
-pl "${TEST_MODULES// /,}" \
-Dformatter.skip -Dimpsort.skip -Denforcer.skip \
--fail-at-end \
clean verify
- name: Report test failures
uses: ./.github/actions/test-summary-report
if: ${{ failure() }}
with:
test-report-xml-base-dir: integration-tests
integration-tests-alternative-platform:
runs-on: ${{ matrix.os }}
needs: initial-mvn-install
strategy:
fail-fast: false
matrix:
os: [ 'windows-latest' ]
if: github.event_name != 'pull_request' || !contains(github.event.pull_request.labels.*.name, 'JVM')
env:
MAVEN_OPTS: -Xmx3000m
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ env.CHECKOUT_REF }}
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0
with:
distribution: 'temurin'
java-version: '17'
- name: Download Maven Repo
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: maven-repo
path: ..
- name: Extract Maven Repo
shell: bash
run: |
tar -xzf ../maven-repo.tgz -C ~
rm -f ../maven-repo.tgz
- name: PDFBox font cache
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
if: runner.os == 'Windows'
with:
path: ~/.pdfbox.cache
key: ${{ runner.os }}-pdfbox-cache
- name: cd integration-tests && mvn clean verify
shell: bash
run: |
cd integration-tests
../mvnw ${CQ_MAVEN_ARGS} ${BRANCH_OPTIONS} \
-Dskip-testcontainers-tests -Dformatter.skip -Dimpsort.skip -Denforcer.skip \
--fail-at-end \
clean verify
- name: Report test failures
uses: ./.github/actions/test-summary-report
if: ${{ failure() }}
with:
test-report-xml-base-dir: integration-tests
examples-tests:
name: Examples Tests - ${{matrix.name}}
needs: initial-mvn-install
runs-on: ubuntu-latest
if: github.event_name != 'pull_request' || !contains(github.event.pull_request.labels.*.name, 'JVM')
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.initial-mvn-install.outputs.examples-matrix) }}
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up JDK 17
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0
with:
distribution: 'temurin'
java-version: '17'
- name: Download Maven Repo
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: maven-repo
path: ..
- name: Extract Maven Repo
shell: bash
run: |
df -h /
tar -xzf ../maven-repo.tgz -C ~
rm -f ../maven-repo.tgz
df -h /
- name: set CQ_VERSION
run: echo "CQ_VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout -N)" >> $GITHUB_ENV
- name: clone and verify examples
env:
EXAMPLE_MODULES: ${{matrix.examples}}
shell: '/usr/bin/bash {0}'
run: |
EXAMPLES_BRANCH="camel-quarkus-main"
if [[ ${GITHUB_REF_NAME} =~ [0-9]+.[0-9]+.x ]]; then
EXAMPLES_BRANCH=${GITHUB_REF_NAME}
elif [[ ${GITHUB_BASE_REF} =~ [0-9]+.[0-9]+.x ]]; then
EXAMPLES_BRANCH=${GITHUB_BASE_REF}
fi
git clone --depth 1 --branch ${EXAMPLES_BRANCH} https://github.com/apache/camel-quarkus-examples.git \
&& cd camel-quarkus-examples \
&& echo "Current Examples commit:" $(git rev-parse HEAD) \
&& ./mvnw ${CQ_MAVEN_ARGS} ${BRANCH_OPTIONS} org.l2x6.cq:cq-maven-plugin:2.10.0:examples-set-platform -Dcq.camel-quarkus.version=${CQ_VERSION}
BUILD_FAILURES=()
for MODULE in ${EXAMPLE_MODULES//,/ }; do
cd ${MODULE}
../mvnw ${CQ_MAVEN_ARGS} clean verify \
-Dformatter.skip -Dimpsort.skip \
-Dquarkus.native.builder-image.pull=missing \
-Pnative,docker,ci
if [[ $? -ne 0 ]]; then
BUILD_FAILURES[${#BUILD_FAILURES[@]}]=${MODULE}
fi
cd -
done
if [[ ${#BUILD_FAILURES[@]} -gt 0 ]]; then
echo -e "\nBuild errors were encountered in the following projects:\n"
for FAILURE in ${BUILD_FAILURES[@]}; do
echo "* ${FAILURE}"
done
echo -e "\nCheck build logs for further information."
exit 1
fi
- name: Report test failures
uses: ./.github/actions/test-summary-report
if: ${{ failure() }}