-
Notifications
You must be signed in to change notification settings - Fork 2.7k
1334 lines (1309 loc) · 58.4 KB
/
ci-actions-incremental.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
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
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
name: Quarkus CI
on:
push:
branches-ignore:
- 'dependabot/**'
# paths-ignore in ci-fork-mvn-cache.yml should match
paths-ignore:
- '.gitignore'
- '.dockerignore'
- '*.md'
- '*.adoc'
- '*.txt'
- 'adr/**'
- 'jakarta/**'
- 'docs/**'
- '.github/ISSUE_TEMPLATE/**'
- '.github/*.yml'
- '.github/*.java'
- '.github/*.conf'
- '.github/workflows/doc-build.yml'
- '.github/workflows/preview.yml'
- '.sdkmanrc'
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths-ignore:
- '.gitignore'
- '.dockerignore'
- '*.md'
- '*.adoc'
- '*.txt'
- 'adr/**'
- 'jakarta/**'
- 'docs/**'
- '.github/ISSUE_TEMPLATE/**'
- '.github/*.yml'
- '.github/*.java'
- '.github/*.conf'
- '.github/workflows/doc-build.yml'
- '.github/workflows/preview.yml'
- '.sdkmanrc'
workflow_dispatch:
concurrency:
group: "workflow = ${{ github.workflow }}, ref = ${{ github.event.ref }}, pr = ${{ github.event.pull_request.id }}"
cancel-in-progress: ${{ github.event_name == 'pull_request' || github.repository != 'quarkusio/quarkus' }}
env:
# Workaround testsuite locale issue
LANG: en_US.UTF-8
COMMON_MAVEN_ARGS: "-e -B --settings .github/mvn-settings.xml --fail-at-end"
COMMON_TEST_MAVEN_ARGS: "-Dformat.skip -Denforcer.skip -DskipDocs -Dforbiddenapis.skip -DskipExtensionValidation -DskipCodestartValidation"
NATIVE_TEST_MAVEN_ARGS: "-Dtest-containers -Dstart-containers -Dquarkus.native.native-image-xmx=6g -Dnative -Dnative.surefire.skip -Dno-descriptor-tests clean install -DskipDocs"
JVM_TEST_MAVEN_ARGS: "-Dtest-containers -Dstart-containers -Dquarkus.test.hang-detection-timeout=60"
PTS_MAVEN_ARGS: "-Ddevelocity.pts.enabled=${{ github.event_name == 'pull_request' && github.base_ref == 'main' && 'true' || 'false' }}"
DB_USER: hibernate_orm_test
DB_PASSWORD: hibernate_orm_test
DB_NAME: hibernate_orm_test
PULL_REQUEST_NUMBER: ${{ github.event.number }}
defaults:
run:
shell: bash
jobs:
# This is a hack to work around a GitHub API limitation:
# when the PR is coming from another fork, the pull_requests field of the
# workflow_run payload is empty.
# For more details, see
# https://gh.neting.ccmunity/t/pull-request-attribute-empty-in-workflow-run-event-object-for-pr-from-forked-repo/154682
attach-pr-number:
runs-on: ubuntu-latest
name: Attach pull request number
if: github.event_name == 'pull_request'
steps:
- name: Create file
run: |
echo -n ${{ github.event.number }} > pull-request-number
- name: Upload pull request number
uses: actions/upload-artifact@v4
with:
name: pull-request-number-${{ github.event.number }}
path: pull-request-number
retention-days: 1
ci-sanity-check:
name: "CI Sanity Check"
runs-on: ubuntu-latest
# Skip main in forks
if: "github.repository == 'quarkusio/quarkus' || !endsWith(github.ref, '/main')"
steps:
- name: Build
run: sleep 30
build-jdk17:
name: "Initial JDK 17 Build"
runs-on: ubuntu-latest
# Skip main in forks
# Skip draft PRs, rerun as soon as its removed
if: "(github.repository == 'quarkusio/quarkus' || !endsWith(github.ref, '/main')) && ( \
github.event_name != 'pull_request' || ( \
github.event.pull_request.draft == false && \
github.event.pull_request.state != 'closed' && \
github.event.action != 'edited' \
) \
)"
outputs:
gib_args: ${{ steps.get-gib-args.outputs.gib_args }}
gib_impacted: ${{ steps.get-gib-impacted.outputs.impacted_modules }}
m2-monthly-branch-cache-key: ${{ steps.cache-key.outputs.m2-monthly-branch-cache-key }}
m2-monthly-cache-key: ${{ steps.cache-key.outputs.m2-monthly-cache-key }}
m2-cache-key: ${{ steps.cache-key.outputs.m2-cache-key }}
quarkus-metadata-cache-key: ${{ steps.cache-key.outputs.quarkus-metadata-cache-key }}
quarkus-metadata-cache-key-default: ${{ steps.cache-key.outputs.quarkus-metadata-cache-key-default }}
steps:
- name: Gradle Enterprise environment
run: |
echo "GE_TAGS=jdk-17" >> "$GITHUB_ENV"
echo "GE_CUSTOM_VALUES=gh-job-name=Initial JDK 17 Build" >> "$GITHUB_ENV"
- uses: actions/checkout@v4
with:
# this is important for GIB to work
fetch-depth: 0
- name: Add quarkusio remote
run: git remote show quarkusio &> /dev/null || git remote add quarkusio https://github.com/quarkusio/quarkus.git
- name: Reclaim Disk Space
run: .github/ci-prerequisites.sh
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- name: Generate cache key
id: cache-key
run: |
CURRENT_BRANCH="${{ github.repository != 'quarkusio/quarkus' && 'fork' || github.base_ref || github.ref_name }}"
CURRENT_MONTH=$(/bin/date -u "+%Y-%m")
CURRENT_DAY=$(/bin/date -u "+%d")
ROOT_CACHE_KEY="m2-cache"
echo "m2-monthly-cache-key=${ROOT_CACHE_KEY}-${CURRENT_MONTH}" >> $GITHUB_OUTPUT
echo "m2-monthly-branch-cache-key=${ROOT_CACHE_KEY}-${CURRENT_MONTH}-${CURRENT_BRANCH}" >> $GITHUB_OUTPUT
echo "m2-cache-key=${ROOT_CACHE_KEY}-${CURRENT_MONTH}-${CURRENT_BRANCH}-${CURRENT_DAY}" >> $GITHUB_OUTPUT
CURRENT_WEEK=$(/bin/date -u "+%Y-%U")
echo "quarkus-metadata-cache-key=quarkus-metadata-cache-${CURRENT_WEEK}-${{ github.ref_name }}" >> $GITHUB_OUTPUT
echo "quarkus-metadata-cache-key-default=quarkus-metadata-cache-${CURRENT_WEEK}-${{ github.event.repository.default_branch }}" >> $GITHUB_OUTPUT
- name: Cache Maven Repository
id: cache-maven
uses: actions/cache@v4
# if it's not a pull request, we restore and save the cache
if: github.event_name != 'pull_request'
with:
path: ~/.m2/repository
# A new cache will be stored daily. After that first store of the day, cache save actions will fail because the cache is immutable but it's not a problem.
# The whole cache is dropped monthly to prevent unlimited growth.
# The cache is per branch but in case we don't find a branch for a given branch, we will get a cache from another branch.
key: ${{ steps.cache-key.outputs.m2-cache-key }}
restore-keys: |
${{ steps.cache-key.outputs.m2-monthly-branch-cache-key }}-
${{ steps.cache-key.outputs.m2-monthly-cache-key }}-
- name: Restore Maven Repository
uses: actions/cache/restore@v4
# if it a pull request, we restore the cache but we don't save it
if: github.event_name == 'pull_request'
with:
path: ~/.m2/repository
key: ${{ steps.cache-key.outputs.m2-cache-key }}
restore-keys: |
${{ steps.cache-key.outputs.m2-monthly-branch-cache-key }}-
${{ steps.cache-key.outputs.m2-monthly-cache-key }}-
- name: Cache Develocity local cache
uses: actions/cache@v4
if: github.event_name == 'pull_request'
with:
path: ~/.m2/.develocity/build-cache
key: develocity-cache-Initial JDK 17 Build-${{ github.event.pull_request.number }}-${{ github.event.pull_request.head.sha }}
restore-keys: |
develocity-cache-Initial JDK 17 Build-${{ github.event.pull_request.number }}-
- name: Populate the cache
# only populate the cache if it's not a pull request as we only store the cache in this case
if: github.event_name != 'pull_request'
run: |
./mvnw -T2C $COMMON_MAVEN_ARGS dependency:go-offline
- name: Verify native-tests.json
run: ./.github/verify-tests-json.sh native-tests.json integration-tests/
- name: Verify virtual-threads-tests.json
run: ./.github/verify-tests-json.sh virtual-threads-tests.json integration-tests/virtual-threads/
- name: Setup Develocity Build Scan capture
uses: gradle/develocity-actions/setup-maven@v1.3
with:
capture-strategy: ON_DEMAND
job-name: "Initial JDK 17 Build"
add-pr-comment: false
add-job-summary: false
develocity-access-key: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
develocity-token-expiry: 6
- name: Build
env:
CAPTURE_BUILD_SCAN: true
run: |
./mvnw -T1C $COMMON_MAVEN_ARGS -DskipTests -DskipITs -DskipDocs -Dinvoker.skip -Dskip.gradle.tests -Djbang.skip -Dtruststore.skip -Dno-format -Dtcks -Prelocations clean install
- name: Verify extension dependencies
run: ./update-extension-dependencies.sh $COMMON_MAVEN_ARGS
- name: Get GIB arguments
id: get-gib-args
env:
PULL_REQUEST_BASE: ${{ github.event.pull_request.base.ref }}
run: |
# See also: https://github.com/gitflow-incremental-builder/gitflow-incremental-builder#configuration (GIB)
# Common GIB_ARGS for all CI cases (hint: see also root pom.xml):
# - disableSelectedProjectsHandling: required to detect changes in jobs that use -pl
# - untracked: to ignore files created by jobs (and uncommitted to be consistent)
GIB_ARGS="-Dincremental -Dgib.disableSelectedProjectsHandling -Dgib.untracked=false -Dgib.uncommitted=false"
if [ -n "$PULL_REQUEST_BASE" ]
then
# The PR defines a clear merge target so just use that branch for reference, *unless*:
# - the current branch is a backport branch targeting some released branch like 1.10 (merge target is not main)
GIB_ARGS+=" -Dgib.referenceBranch=origin/$PULL_REQUEST_BASE -Dgib.disableIfReferenceBranchMatches='origin/\d+\.\d+'"
else
# No PR means the merge target is uncertain so fetch & use main of quarkusio/quarkus, *unless*:
# - the current branch is main or some released branch like 1.10
# - the current branch is a backport branch which is going to target some released branch like 1.10 (merge target is not main)
GIB_ARGS+=" -Dgib.referenceBranch=refs/remotes/quarkusio/main -Dgib.fetchReferenceBranch -Dgib.disableIfBranchMatches='main|\d+\.\d+|.*backport.*'"
fi
echo "GIB_ARGS: $GIB_ARGS"
echo "gib_args=${GIB_ARGS}" >> $GITHUB_OUTPUT
- name: Get GIB impacted modules
id: get-gib-impacted
# mvnw just for creating gib-impacted.log ("validate" should not waste much time if not incremental at all, e.g. on main)
run: |
./mvnw -q -T1C $COMMON_MAVEN_ARGS -Dscan=false -Dtcks -Dquickly-ci ${{ steps.get-gib-args.outputs.gib_args }} -Dgib.logImpactedTo=gib-impacted.log validate
if [ -f gib-impacted.log ]
then
GIB_IMPACTED=$(cat gib-impacted.log)
else
GIB_IMPACTED='_all_'
fi
echo "GIB_IMPACTED: ${GIB_IMPACTED}"
# three steps to retain linefeeds in output for other jobs
# (see https://github.com/github/docs/issues/21529 and https://github.com/orgs/community/discussions/26288#discussioncomment-3876281)
echo 'impacted_modules<<EOF' >> $GITHUB_OUTPUT
echo "${GIB_IMPACTED}" >> $GITHUB_OUTPUT
echo 'EOF' >> $GITHUB_OUTPUT
- name: Tar .m2 content pushed to subsequent jobs
run: tar -czf m2-content.tgz -C ~ .m2/repository/io/quarkus .m2/.develocity/build-cache
- name: Upload .m2 content pushed to subsequent jobs
uses: actions/upload-artifact@v4
with:
name: m2-content
path: m2-content.tgz
retention-days: 7
- name: Delete snapshots artifacts from cache
run: find ~/.m2 -name \*-SNAPSHOT -type d -exec rm -rf {} +
- name: Prepare build reports archive
if: always()
run: |
7z a -tzip build-reports.zip -r \
'target/build-report.json' \
'target/gradle-build-scan-url.txt' \
LICENSE
- name: Upload build reports
uses: actions/upload-artifact@v4
if: always()
with:
name: "build-reports-${{ github.run_attempt }}-Initial JDK 17 Build"
path: |
build-reports.zip
retention-days: 7
calculate-test-jobs:
name: Calculate Test Jobs
runs-on: ubuntu-latest
# Skip main in forks
if: "github.repository == 'quarkusio/quarkus' || !endsWith(github.ref, '/main')"
needs: build-jdk17
env:
GIB_IMPACTED_MODULES: ${{ needs.build-jdk17.outputs.gib_impacted }}
outputs:
native_matrix: ${{ steps.calc-native-matrix.outputs.matrix }}
jvm_matrix: ${{ steps.calc-jvm-matrix.outputs.matrix }}
virtual_threads_matrix: ${{ steps.calc-virtual-threads-matrix.outputs.matrix }}
run_jvm: ${{ steps.calc-run-flags.outputs.run_jvm }}
run_devtools: ${{ steps.calc-run-flags.outputs.run_devtools }}
run_gradle: ${{ steps.calc-run-flags.outputs.run_gradle }}
run_maven: ${{ steps.calc-run-flags.outputs.run_maven }}
run_kubernetes: ${{ steps.calc-run-flags.outputs.run_kubernetes }}
run_quickstarts: ${{ steps.calc-run-flags.outputs.run_quickstarts }}
run_tcks: ${{ steps.calc-run-flags.outputs.run_tcks }}
steps:
- uses: actions/checkout@v4
- name: Calculate matrix from native-tests.json
id: calc-native-matrix
run: |
echo "GIB_IMPACTED_MODULES: ${GIB_IMPACTED_MODULES}"
json=$(.github/filter-native-tests-json.sh "${GIB_IMPACTED_MODULES}" | tr -d '\n')
echo "${json}"
echo "matrix=${json}" >> $GITHUB_OUTPUT
- name: Calculate matrix from matrix-jvm-tests.json
id: calc-jvm-matrix
run: |
json=$(.github/filter-jvm-tests-json.sh)
echo "${json}"
echo "matrix=${json}" >> $GITHUB_OUTPUT
- name: Calculate matrix from virtual-threads-tests.json
id: calc-virtual-threads-matrix
run: |
echo "GIB_IMPACTED_MODULES: ${GIB_IMPACTED_MODULES}"
json=$(.github/filter-virtual-threads-tests-json.sh "${GIB_IMPACTED_MODULES}" | tr -d '\n')
echo "${json}"
echo "matrix=${json}" >> $GITHUB_OUTPUT
- name: Calculate run flags
id: calc-run-flags
run: |
run_jvm=true; run_devtools=true; run_gradle=true; run_maven=true; run_kubernetes=true; run_quickstarts=true; run_tcks=true
if [ -z "${GIB_IMPACTED_MODULES}" ]
then
run_jvm=false; run_devtools=false; run_gradle=false; run_maven=false; run_kubernetes=false; run_quickstarts=false; run_tcks=false
elif [ "${GIB_IMPACTED_MODULES}" != '_all_' ]
then
# Important: keep -pl ... in actual jobs in sync with the following grep commands!
if ! (echo -n "${GIB_IMPACTED_MODULES}" | grep -qPv 'integration-tests/(devtools|gradle|maven|devmode|kubernetes/.*)|tcks/.*'); then run_jvm=false; fi
if ! (echo -n "${GIB_IMPACTED_MODULES}" | grep -q 'integration-tests/devtools'); then run_devtools=false; fi
if ! (echo -n "${GIB_IMPACTED_MODULES}" | grep -q 'integration-tests/gradle'); then run_gradle=false; fi
if ! (echo -n "${GIB_IMPACTED_MODULES}" | grep -qP 'integration-tests/(maven|devmode)'); then run_maven=false; fi
if ! (echo -n "${GIB_IMPACTED_MODULES}" | grep -qP 'integration-tests/kubernetes/.*'); then run_kubernetes=false; fi
if ! (echo -n "${GIB_IMPACTED_MODULES}" | grep -qPv '(docs|integration-tests|tcks)/.*'); then run_quickstarts=false; fi
if ! (echo -n "${GIB_IMPACTED_MODULES}" | grep -q 'tcks/.*'); then run_tcks=false; fi
fi
echo "run_jvm=${run_jvm}, run_devtools=${run_devtools}, run_gradle=${run_gradle}, run_maven=${run_maven}, run_kubernetes=${run_kubernetes}, run_quickstarts=${run_quickstarts}, run_tcks=${run_tcks}"
echo "run_jvm=${run_jvm}" >> $GITHUB_OUTPUT
echo "run_devtools=${run_devtools}" >> $GITHUB_OUTPUT
echo "run_gradle=${run_gradle}" >> $GITHUB_OUTPUT
echo "run_maven=${run_maven}" >> $GITHUB_OUTPUT
echo "run_kubernetes=${run_kubernetes}" >> $GITHUB_OUTPUT
echo "run_quickstarts=${run_quickstarts}" >> $GITHUB_OUTPUT
echo "run_tcks=${run_tcks}" >> $GITHUB_OUTPUT
jvm-tests:
name: JVM Tests - JDK ${{matrix.java.name}}
runs-on: ${{ matrix.java.os-name }}
needs: [build-jdk17, calculate-test-jobs]
# Skip main in forks
if: "needs.calculate-test-jobs.outputs.run_jvm == 'true' && (github.repository == 'quarkusio/quarkus' || !endsWith(github.ref, '/main'))"
timeout-minutes: 400
env:
MAVEN_OPTS: ${{ matrix.java.maven_opts }}
JAVA_VERSION_GRADLE: ${{ matrix.java.java-version-gradle || matrix.java.java-version }}
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.calculate-test-jobs.outputs.jvm_matrix) }}
steps:
- name: Gradle Enterprise environment
run: |
echo "GE_TAGS=jdk-${{matrix.java.name}}" >> "$GITHUB_ENV"
echo "GE_CUSTOM_VALUES=gh-job-name=JVM Tests - JDK ${{matrix.java.name}}" >> "$GITHUB_ENV"
- name: Stop mysql
if: "!startsWith(matrix.java.os-name, 'windows') && !startsWith(matrix.java.os-name, 'macos')"
run: |
ss -ln
sudo service mysql stop || true
- name: Support longpaths on Windows
if: "startsWith(matrix.java.os-name, 'windows')"
run: git config --global core.longpaths true
- uses: actions/checkout@v4
with:
# this is important for GIB to work
fetch-depth: 0
- name: Add quarkusio remote for GIB
run: git remote show quarkusio &> /dev/null || git remote add quarkusio https://github.com/quarkusio/quarkus.git
- name: apt clean
if: "!startsWith(matrix.java.os-name, 'windows') && !startsWith(matrix.java.os-name, 'macos')"
run: sudo apt-get clean
- name: Reclaim Disk Space
if: "!startsWith(matrix.java.os-name, 'windows') && !startsWith(matrix.java.os-name, 'macos')"
run: .github/ci-prerequisites.sh
- name: Set up JDK ${{ env.JAVA_VERSION_GRADLE }} for Gradle (if needed)
if: ${{ env.JAVA_VERSION_GRADLE != matrix.java.java-version }}
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ matrix.java.java-version-gradle }}
architecture: ${{ matrix.java.architecture || 'x64' }}
- name: Set up GRADLE_JAVA_HOME (if needed)
if: ${{ env.JAVA_VERSION_GRADLE != matrix.java.java-version }}
run: |
JAVA_HOME_ARCHITECTURE=$(echo "${{ matrix.java.architecture || 'x64' }}" | tr [:lower:] [:upper:])
GRADLE_JAVA_HOME_VARIABLE="JAVA_HOME_${JAVA_VERSION_GRADLE}_${JAVA_HOME_ARCHITECTURE}"
echo "GRADLE_JAVA_HOME=${!GRADLE_JAVA_HOME_VARIABLE}" >> "$GITHUB_ENV"
- name: Set up JDK ${{ matrix.java.java-version }}
uses: actions/setup-java@v4
with:
distribution: ${{ matrix.java.java-distribution || 'temurin' }}
java-version: ${{ matrix.java.java-version }}
architecture: ${{ matrix.java.architecture || 'x64' }}
- name: Restore Maven Repository
uses: actions/cache/restore@v4
with:
path: ~/.m2/repository
key: ${{ needs.build-jdk17.outputs.m2-cache-key }}
restore-keys: |
${{ needs.build-jdk17.outputs.m2-monthly-branch-cache-key }}-
${{ needs.build-jdk17.outputs.m2-monthly-cache-key }}-
- name: Download previously uploaded .m2 content
uses: actions/download-artifact@v4
with:
name: m2-content
path: .
- name: Extract previously uploaded .m2 content
run: tar -xzf m2-content.tgz -C ~
- name: Cache Develocity local cache
uses: actions/cache@v4
if: github.event_name == 'pull_request'
with:
path: ~/.m2/.develocity/build-cache
key: develocity-cache-JVM Tests - JDK ${{matrix.java.name}}-${{ github.event.pull_request.number }}-${{ github.event.pull_request.head.sha }}
restore-keys: |
develocity-cache-JVM Tests - JDK ${{matrix.java.name}}-${{ github.event.pull_request.number }}-
- name: Setup Develocity Build Scan capture
uses: gradle/develocity-actions/setup-maven@v1.3
with:
capture-strategy: ON_DEMAND
job-name: "JVM Tests - JDK ${{matrix.java.name}}"
add-pr-comment: false
add-job-summary: false
develocity-access-key: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
develocity-token-expiry: 6
- name: Build
env:
CAPTURE_BUILD_SCAN: true
# Despite the pre-calculated run_jvm flag, GIB has to be re-run here to figure out the exact submodules to build.
run: ./mvnw $COMMON_MAVEN_ARGS $COMMON_TEST_MAVEN_ARGS $PTS_MAVEN_ARGS clean install -Dsurefire.timeout=1200 -pl !integration-tests/gradle -pl !integration-tests/maven -pl !integration-tests/devmode -pl !integration-tests/devtools -Dno-test-kubernetes -pl !docs ${{ matrix.java.maven_args }} ${{ needs.build-jdk17.outputs.gib_args }}
- name: Clean Gradle temp directory
if: always()
run: devtools/gradle/gradlew --stop && rm -rf devtools/gradle/gradle-extension-plugin/build/tmp
- name: Analyze disk space
if: always() && !startsWith(matrix.java.os-name, 'windows') && !startsWith(matrix.java.os-name, 'macos')
run: .github/ci-disk-usage.sh
- name: Prepare failure archive (if maven failed)
if: failure()
run: find . -name '*-reports' -type d -o -name '*.log' | tar -czf test-reports.tgz -T -
- name: Upload failure Archive (if maven failed)
uses: actions/upload-artifact@v4
if: failure()
with:
name: test-reports-jvm${{matrix.java.name}}
path: 'test-reports.tgz'
retention-days: 7
- name: Prepare build reports archive
if: always()
run: |
7z a -tzip build-reports.zip -r \
'**/target/*-reports/TEST-*.xml' \
'target/build-report.json' \
'target/gradle-build-scan-url.txt' \
LICENSE
- name: Upload build reports
uses: actions/upload-artifact@v4
if: always()
with:
name: "build-reports-${{ github.run_attempt }}-JVM Tests - JDK ${{matrix.java.name}}"
path: |
build-reports.zip
retention-days: 7
- name: Upload test-produced debug dumps
uses: actions/upload-artifact@v4
# We need this as soon as there's a matching file
# -- even in case of success, as some flaky tests won't fail the build
if: always()
with:
name: "debug-${{ github.run_attempt }}-JVM Tests - JDK ${{matrix.java.name}}"
path: "**/target/debug/**"
if-no-files-found: ignore # If we're not currently debugging any test, it's fine.
retention-days: 28 # We don't get notified for flaky tests, so let's give maintainers time to get back to it
- name: Upload build.log (if build failed)
uses: actions/upload-artifact@v4
if: ${{ failure() || cancelled() }}
with:
name: "build-logs-JVM Tests - JDK ${{matrix.java.name}}"
path: |
**/build.log
retention-days: 7
maven-tests:
name: Maven Tests - JDK ${{matrix.java.name}}
runs-on: ${{ matrix.java.os-name }}
needs: [build-jdk17, calculate-test-jobs]
env:
MAVEN_OPTS: -Xmx2g -XX:MaxMetaspaceSize=1g
# Skip main in forks
if: "needs.calculate-test-jobs.outputs.run_maven == 'true' && (github.repository == 'quarkusio/quarkus' || !endsWith(github.ref, '/main'))"
timeout-minutes: 130
strategy:
fail-fast: false
matrix:
java:
- {
name: "17",
java-version: 17,
os-name: "ubuntu-latest"
}
- {
name: "17 Windows",
java-version: 17,
os-name: "windows-latest"
}
steps:
- name: Gradle Enterprise environment
run: |
echo "GE_TAGS=jdk-${{matrix.java.name}}" >> "$GITHUB_ENV"
echo "GE_CUSTOM_VALUES=gh-job-name=Maven Tests - JDK ${{matrix.java.name}}" >> "$GITHUB_ENV"
- name: Support longpaths on Windows
if: "startsWith(matrix.java.os-name, 'windows')"
run: git config --global core.longpaths true
- uses: actions/checkout@v4
with:
# this is important for GIB to work
fetch-depth: 0
- name: Add quarkusio remote for GIB
run: git remote show quarkusio &> /dev/null || git remote add quarkusio https://github.com/quarkusio/quarkus.git
- name: Restore Maven Repository
uses: actions/cache/restore@v4
with:
path: ~/.m2/repository
key: ${{ needs.build-jdk17.outputs.m2-cache-key }}
restore-keys: |
${{ needs.build-jdk17.outputs.m2-monthly-branch-cache-key }}-
${{ needs.build-jdk17.outputs.m2-monthly-cache-key }}-
- name: Download previously uploaded .m2 content
uses: actions/download-artifact@v4
with:
name: m2-content
path: .
- name: Extract previously uploaded .m2 content
run: tar -xzf m2-content.tgz -C ~
- name: Set up JDK ${{ matrix.java.java-version }}
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ matrix.java.java-version }}
- name: Setup Develocity Build Scan capture
uses: gradle/develocity-actions/setup-maven@v1.3
with:
capture-strategy: ON_DEMAND
job-name: "Maven Tests - JDK ${{matrix.java.name}}"
add-pr-comment: false
add-job-summary: false
develocity-access-key: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
develocity-token-expiry: 6
- name: Build
env:
CAPTURE_BUILD_SCAN: true
# Important: keep -pl ... in sync with "Calculate run flags"!
# Despite the pre-calculated run_jvm flag, GIB has to be re-run here to figure out the exact submodules to build.
run: ./mvnw $COMMON_MAVEN_ARGS $COMMON_TEST_MAVEN_ARGS $PTS_MAVEN_ARGS $JVM_TEST_MAVEN_ARGS clean install -pl 'integration-tests/maven' -pl 'integration-tests/devmode' ${{ needs.build-jdk17.outputs.gib_args }}
- name: Prepare failure archive (if maven failed)
if: failure()
run: find . -name '*-reports' -type d -o -name '*.log' | tar -czf test-reports.tgz -T -
- name: Upload failure Archive (if maven failed)
uses: actions/upload-artifact@v4
if: failure()
with:
name: test-reports-maven-java${{matrix.java.name}}
path: 'test-reports.tgz'
retention-days: 7
# see https://github.com/actions/toolkit/blob/master/packages/artifact/docs/additional-information.md#non-supported-characters
- name: Rename invalid path
if: ${{ failure() || cancelled() }}
run: |
if [ -d 'integration-tests/maven/target/test-classes/projects/qit?fast?jar' ]; then mv 'integration-tests/maven/target/test-classes/projects/qit?fast?jar' 'integration-tests/maven/target/test-classes/projects/qit--fast--jar'; fi
if [ -d 'integration-tests/maven/target/test-classes/projects/qit?legacy?jar' ]; then mv 'integration-tests/maven/target/test-classes/projects/qit?legacy?jar' 'integration-tests/maven/target/test-classes/projects/qit--legacy--jar'; fi
if [ -d 'integration-tests/maven/target/test-classes/projects/qit?uber?jar' ]; then mv 'integration-tests/maven/target/test-classes/projects/qit?uber?jar' 'integration-tests/maven/target/test-classes/projects/qit--uber--jar'; fi
- name: Prepare build reports archive
if: always()
run: |
7z a -tzip build-reports.zip -r \
'**/target/*-reports/TEST-*.xml' \
'target/build-report.json' \
'target/gradle-build-scan-url.txt' \
LICENSE
- name: Upload build reports
uses: actions/upload-artifact@v4
if: always()
with:
name: "build-reports-${{ github.run_attempt }}-Maven Tests - JDK ${{matrix.java.name}}"
path: |
build-reports.zip
retention-days: 7
gradle-tests:
name: Gradle Tests - JDK ${{matrix.java.name}}
runs-on: ${{matrix.java.os-name}}
needs: [build-jdk17, calculate-test-jobs]
env:
# leave more space for the actual gradle execution (which is just wrapped by maven)
MAVEN_OPTS: -Xmx1g
# Skip main in forks
if: "needs.calculate-test-jobs.outputs.run_gradle == 'true' && (github.repository == 'quarkusio/quarkus' || !endsWith(github.ref, '/main'))"
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
java:
- {
name: "17",
java-version: 17,
os-name: "ubuntu-latest"
}
- {
name: "17 Windows",
java-version: 17,
os-name: "windows-latest"
}
steps:
- name: Gradle Enterprise environment
run: |
echo "GE_TAGS=jdk-${{matrix.java.name}}" >> "$GITHUB_ENV"
echo "GE_CUSTOM_VALUES=gh-job-name=Gradle Tests - JDK ${{matrix.java.name}}" >> "$GITHUB_ENV"
- name: Support longpaths on Windows
if: "startsWith(matrix.java.os-name, 'windows')"
run: git config --global core.longpaths true
- uses: actions/checkout@v4
- name: Restore Maven Repository
uses: actions/cache/restore@v4
with:
path: ~/.m2/repository
key: ${{ needs.build-jdk17.outputs.m2-cache-key }}
restore-keys: |
${{ needs.build-jdk17.outputs.m2-monthly-branch-cache-key }}-
${{ needs.build-jdk17.outputs.m2-monthly-cache-key }}-
- name: Download previously uploaded .m2 content
uses: actions/download-artifact@v4
with:
name: m2-content
path: .
- name: Extract previously uploaded .m2 content
run: tar -xzf m2-content.tgz -C ~
- name: Set up JDK ${{ matrix.java.java-version }}
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ matrix.java.java-version }}
cache: 'gradle'
- name: Verify dependencies
# runs on Windows as well but would require newline conversion, not worth it
if: "!startsWith(matrix.java.os-name, 'windows')"
run: ./integration-tests/gradle/update-dependencies.sh $COMMON_MAVEN_ARGS -Dscan=false
- name: Setup Develocity Build Scan capture
uses: gradle/develocity-actions/setup-maven@v1.3
with:
capture-strategy: ON_DEMAND
job-name: "Gradle Tests - JDK ${{matrix.java.name}}"
add-pr-comment: false
add-job-summary: false
develocity-access-key: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
develocity-token-expiry: 6
- name: Build
env:
CAPTURE_BUILD_SCAN: true
# Important: keep -pl ... in sync with "Calculate run flags"!
run: ./mvnw $COMMON_MAVEN_ARGS $COMMON_TEST_MAVEN_ARGS $PTS_MAVEN_ARGS $JVM_TEST_MAVEN_ARGS clean install -pl integration-tests/gradle
- name: Prepare build reports archive
if: always()
run: |
7z a -tzip build-reports.zip -r \
'**/build/test-results/test/TEST-*.xml' \
'**/target/*-reports/TEST-*.xml' \
'target/build-report.json' \
'target/gradle-build-scan-url.txt' \
LICENSE
- name: Upload build reports
uses: actions/upload-artifact@v4
if: always()
with:
name: "build-reports-${{ github.run_attempt }}-Gradle Tests - JDK ${{matrix.java.name}}"
path: |
build-reports.zip
retention-days: 7
devtools-tests:
name: Devtools Tests - JDK ${{matrix.java.name}}
runs-on: ${{matrix.java.os-name}}
needs: [build-jdk17, calculate-test-jobs]
# Skip main in forks
if: "needs.calculate-test-jobs.outputs.run_devtools == 'true' && (github.repository == 'quarkusio/quarkus' || !endsWith(github.ref, '/main'))"
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
java:
- {
name: "17",
java-version: 17,
os-name: "ubuntu-latest"
}
- {
name: "21",
java-version: 21,
os-name: "ubuntu-latest"
}
- {
name: "17 Windows",
java-version: 17,
os-name: "windows-latest"
}
steps:
- name: Gradle Enterprise environment
run: |
echo "GE_TAGS=jdk-${{matrix.java.name}}" >> "$GITHUB_ENV"
echo "GE_CUSTOM_VALUES=gh-job-name=Devtools Tests - JDK ${{matrix.java.name}}" >> "$GITHUB_ENV"
- name: Support longpaths on Windows
if: "startsWith(matrix.java.os-name, 'windows')"
run: git config --global core.longpaths true
- uses: actions/checkout@v4
- name: Restore Maven Repository
uses: actions/cache/restore@v4
with:
path: ~/.m2/repository
key: ${{ needs.build-jdk17.outputs.m2-cache-key }}
restore-keys: |
${{ needs.build-jdk17.outputs.m2-monthly-branch-cache-key }}-
${{ needs.build-jdk17.outputs.m2-monthly-cache-key }}-
- name: Download previously uploaded .m2 content
uses: actions/download-artifact@v4
with:
name: m2-content
path: .
- name: Extract previously uploaded .m2 content
run: tar -xzf m2-content.tgz -C ~
- name: Set up JDK ${{ matrix.java.java-version }}
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ matrix.java.java-version }}
- name: Setup Develocity Build Scan capture
uses: gradle/develocity-actions/setup-maven@v1.3
with:
capture-strategy: ON_DEMAND
job-name: "Devtools Tests - JDK ${{matrix.java.name}}"
add-pr-comment: false
add-job-summary: false
develocity-access-key: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
develocity-token-expiry: 6
- name: Build
env:
CAPTURE_BUILD_SCAN: true
# Important: keep -pl ... in sync with "Calculate run flags"!
run: ./mvnw $COMMON_MAVEN_ARGS $COMMON_TEST_MAVEN_ARGS $PTS_MAVEN_ARGS $JVM_TEST_MAVEN_ARGS clean install -pl 'integration-tests/devtools'
- name: Prepare failure archive (if maven failed)
if: failure()
run: find . -name '*-reports' -type d -o -name '*.log' | tar -czf test-reports.tgz -T -
- name: Upload failure Archive (if maven failed)
uses: actions/upload-artifact@v4
if: failure()
with:
name: test-reports-devtools-java${{matrix.java.name}}
path: 'test-reports.tgz'
retention-days: 7
- name: Prepare build reports archive
if: always()
run: |
7z a -tzip build-reports.zip -r \
'**/target/*-reports/TEST-*.xml' \
'target/build-report.json' \
'target/gradle-build-scan-url.txt' \
LICENSE
- name: Upload build reports
uses: actions/upload-artifact@v4
if: always()
with:
name: "build-reports-${{ github.run_attempt }}-Devtools Tests - JDK ${{matrix.java.name}}"
path: |
build-reports.zip
retention-days: 7
kubernetes-tests:
name: Kubernetes Tests - JDK ${{matrix.java.name}}
runs-on: ${{matrix.java.os-name}}
needs: [build-jdk17, calculate-test-jobs]
# Skip main in forks
if: "needs.calculate-test-jobs.outputs.run_kubernetes == 'true' && (github.repository == 'quarkusio/quarkus' || !endsWith(github.ref, '/main'))"
timeout-minutes: 40
strategy:
fail-fast: false
matrix:
java:
- {
name: "17",
java-version: 17,
os-name: "ubuntu-latest"
}
- {
name: "21",
java-version: 21,
os-name: "ubuntu-latest"
}
- {
name: "17 Windows",
java-version: 17,
os-name: "windows-latest"
}
steps:
- name: Gradle Enterprise environment
run: |
echo "GE_TAGS=jdk-${{matrix.java.name}}" >> "$GITHUB_ENV"
echo "GE_CUSTOM_VALUES=gh-job-name=Kubernetes Tests - JDK ${{matrix.java.name}}" >> "$GITHUB_ENV"
- name: Support longpaths on Windows
if: "startsWith(matrix.java.os-name, 'windows')"
run: git config --global core.longpaths true
- uses: actions/checkout@v4
- name: Restore Maven Repository
uses: actions/cache/restore@v4
with:
path: ~/.m2/repository
key: ${{ needs.build-jdk17.outputs.m2-cache-key }}
restore-keys: |
${{ needs.build-jdk17.outputs.m2-monthly-branch-cache-key }}-
${{ needs.build-jdk17.outputs.m2-monthly-cache-key }}-
- name: Download previously uploaded .m2 content
uses: actions/download-artifact@v4
with:
name: m2-content
path: .
- name: Extract previously uploaded .m2 content
run: tar -xzf m2-content.tgz -C ~
- name: Set up JDK ${{ matrix.java.java-version }}
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ matrix.java.java-version }}
- name: Setup Develocity Build Scan capture
uses: gradle/develocity-actions/setup-maven@v1.3
with:
capture-strategy: ON_DEMAND
job-name: "Kubernetes Tests - JDK ${{matrix.java.name}}"
add-pr-comment: false
add-job-summary: false
develocity-access-key: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
develocity-token-expiry: 6
- name: Build
env:
CAPTURE_BUILD_SCAN: true
# Important: keep -pl ... in sync with "Calculate run flags"!
run: ./mvnw $COMMON_MAVEN_ARGS $COMMON_TEST_MAVEN_ARGS $PTS_MAVEN_ARGS $JVM_TEST_MAVEN_ARGS clean install -f 'integration-tests/kubernetes'
- name: Prepare failure archive (if maven failed)
if: failure()
run: find . -name '*-reports' -type d -o -name '*.log' | tar -czf test-reports.tgz -T -
- name: Upload failure Archive (if maven failed)
uses: actions/upload-artifact@v4
if: failure()
with:
name: test-reports-kubernetes-java${{matrix.java.name}}
path: 'test-reports.tgz'
retention-days: 7
- name: Prepare build reports archive
if: always()
run: |
7z a -tzip build-reports.zip -r \
'**/target/*-reports/TEST-*.xml' \
'target/build-report.json' \
'target/gradle-build-scan-url.txt' \
LICENSE
- name: Upload build reports
uses: actions/upload-artifact@v4
if: always()
with:
name: "build-reports-${{ github.run_attempt }}-Kubernetes Tests - JDK ${{matrix.java.name}}"
path: |
build-reports.zip
retention-days: 7
quickstarts-tests:
name: Quickstarts Compilation - JDK ${{matrix.java.name}}
runs-on: ${{matrix.java.os-name}}
needs: [build-jdk17, calculate-test-jobs]
# Skip main in forks
if: "needs.calculate-test-jobs.outputs.run_quickstarts == 'true' && (github.repository == 'quarkusio/quarkus' || !endsWith(github.ref, '/main'))"
timeout-minutes: 90
strategy:
fail-fast: false
matrix:
java:
- {
name: "17",
java-version: 17,
os-name: "ubuntu-latest"
}
steps:
- name: Gradle Enterprise environment
run: |
echo "GE_TAGS=jdk-${{matrix.java.name}}" >> "$GITHUB_ENV"
echo "GE_CUSTOM_VALUES=gh-job-name=Quickstarts Compilation - JDK ${{matrix.java.name}}" >> "$GITHUB_ENV"
- uses: actions/checkout@v4
- name: Restore Maven Repository
uses: actions/cache/restore@v4
with:
path: ~/.m2/repository
key: ${{ needs.build-jdk17.outputs.m2-cache-key }}
restore-keys: |
${{ needs.build-jdk17.outputs.m2-monthly-branch-cache-key }}-
${{ needs.build-jdk17.outputs.m2-monthly-cache-key }}-
- name: Download previously uploaded .m2 content
uses: actions/download-artifact@v4
with:
name: m2-content
path: .
- name: Extract previously uploaded .m2 content
run: tar -xzf m2-content.tgz -C ~
- name: Set up JDK ${{ matrix.java.java-version }}
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ matrix.java.java-version }}
- name: Setup Develocity Build Scan capture
uses: gradle/develocity-actions/setup-maven@v1.3
with:
capture-strategy: ON_DEMAND
job-name: "Quickstarts Compilation - JDK ${{matrix.java.name}}"
add-pr-comment: false
add-job-summary: false
develocity-access-key: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
develocity-token-expiry: 6
- uses: actions/github-script@v7
id: get-quickstarts-branch
with:
result-encoding: string
script: |
if (process.env.GITHUB_REPOSITORY != 'quarkusio/quarkus') {
return 'development'
}
const branch = process.env.GITHUB_BASE_REF ? process.env.GITHUB_BASE_REF : process.env.GITHUB_REF_NAME
if (branch == 'main') {
return 'development'
} else {
return branch
}
- name: Get Quarkus version
id: get-quarkus-version
run: |
echo "quarkus-version=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_OUTPUT
- name: Compile Quickstarts
env:
CAPTURE_BUILD_SCAN: true
run: |
git clone --depth=1 -b ${{ steps.get-quickstarts-branch.outputs.result }} https://github.com/quarkusio/quarkus-quickstarts.git && cd quarkus-quickstarts
QUARKUS_VERSION_ARGS="-Dquarkus.platform.version=${{ steps.get-quarkus-version.outputs.quarkus-version }}"
export LANG=en_US && ./mvnw -e -B -fae --settings .github/mvn-settings.xml clean verify -DskipTests -Dquarkus.platform.group-id=io.quarkus $QUARKUS_VERSION_ARGS
- name: Prepare build reports archive
if: always()
run: |
7z a -tzip build-reports.zip -r \
'quarkus-quickstarts/**/target/*-reports/TEST-*.xml' \
'quarkus-quickstarts/target/build-report.json' \
'quarkus-quickstarts/LICENSE' \
- name: Upload build reports
uses: actions/upload-artifact@v4
if: always()
with:
name: "build-reports-${{ github.run_attempt }}-Quickstarts Compilation - JDK ${{matrix.java.name}}"
path: |
build-reports.zip
retention-days: 7
virtual-thread-native-tests:
name: Native Tests - Virtual Thread - ${{matrix.category}}
runs-on: ${{matrix.os-name}}
needs: [build-jdk17, calculate-test-jobs]
# Skip main in forks
if: "needs.calculate-test-jobs.outputs.virtual_threads_matrix != '{}' && (github.repository == 'quarkusio/quarkus' || !endsWith(github.ref, '/main'))"
timeout-minutes: ${{matrix.timeout}}
strategy:
max-parallel: 12
fail-fast: false
matrix: ${{ fromJson(needs.calculate-test-jobs.outputs.virtual_threads_matrix) }}
steps:
- name: Gradle Enterprise environment
run: |
category=$(echo -n '${{matrix.category}}' | tr '[:upper:]' '[:lower:]' | tr -c '[:alnum:]-' '-' | sed -E 's/-+/-/g')
echo "GE_TAGS=virtual-thread-native-${category}" >> "$GITHUB_ENV"
echo "GE_CUSTOM_VALUES=gh-job-name=Native Tests - Virtual Thread - ${{matrix.category}}" >> "$GITHUB_ENV"
- uses: actions/checkout@v4
- name: Restore Maven Repository
uses: actions/cache/restore@v4
with:
path: ~/.m2/repository
key: ${{ needs.build-jdk17.outputs.m2-cache-key }}
restore-keys: |
${{ needs.build-jdk17.outputs.m2-monthly-branch-cache-key }}-
${{ needs.build-jdk17.outputs.m2-monthly-cache-key }}-
- name: Download previously uploaded .m2 content
uses: actions/download-artifact@v4
with:
name: m2-content
path: .
- name: Extract previously uploaded .m2 content
run: tar -xzf m2-content.tgz -C ~