-
-
Notifications
You must be signed in to change notification settings - Fork 974
1173 lines (1171 loc) Β· 55.2 KB
/
Copy pathgradle.yml
File metadata and controls
1173 lines (1171 loc) Β· 55.2 KB
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
# 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
#
# https://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: "CI"
on:
push:
branches:
- '[0-9]+.[0-9]+.x'
pull_request:
workflow_dispatch:
# Queue jobs - cancel in-progress PR runs when new commits pushed, but allow branch builds to complete
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
validateDependencies:
name: 'Validate Dependency Versions'
runs-on: ubuntu-24.04
steps:
- name: "π₯ Checkout repository"
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: "βοΈ Setup JDK"
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: liberica
java-version: 21
- name: "ποΈ Restore dependency jar cache"
uses: actions/cache@v4
with:
# Cache only downloaded dependency jars and wrapper distributions, never Grails build outputs.
# Keyed by branch version so each release branch maintains its own warm cache.
path: |
~/.gradle/caches/modules-2
~/.gradle/wrapper
key: gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}-${{ hashFiles('**/dependencies.gradle', '**/gradle-wrapper.properties') }}
restore-keys: |
gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}-
- name: "π Setup Gradle"
uses: gradle/actions/setup-gradle@50e97c2cd7a37755bbfafc9c5b7cafaece252f6e # v6.1.0
with:
cache-provider: basic # 'basic' uses the MIT-licensed, open-source cache provider; the default 'enhanced' provider (v6+) is proprietary (Gradle commercial Terms of Use)
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
- name: "π Validate grails-core dependency versions"
run: >
./gradlew validateDependencyVersions
--continue
--stacktrace
- name: "π Validate grails-core production classpath"
run: >
./gradlew validateProductionClasspath
--continue
--stacktrace
- name: "π Validate grails-gradle dependency versions"
working-directory: 'grails-gradle'
run: >
./gradlew validateDependencyVersions
--continue
--stacktrace
buildGradle:
name: 'Build Gradle Plugins'
strategy:
fail-fast: false
matrix:
java: [ 21, 25 ]
runs-on: ubuntu-24.04
steps:
- name: "Output Agent IP" # in the event RAO blocks this agent, this can be used to debug it
run: curl -s https://api.ipify.org
- name: "π₯ Checkout repository"
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: "βοΈ Setup JDK"
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: liberica
java-version: ${{ matrix.java }}
- name: "ποΈ Restore dependency jar cache"
uses: actions/cache@v4
with:
# Cache only downloaded dependency jars and wrapper distributions, never Grails build outputs.
# Keyed by branch version so each release branch maintains its own warm cache.
path: |
~/.gradle/caches/modules-2
~/.gradle/wrapper
key: gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}-${{ hashFiles('**/dependencies.gradle', '**/gradle-wrapper.properties') }}
restore-keys: |
gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}-
- name: "π Setup Gradle"
uses: gradle/actions/setup-gradle@50e97c2cd7a37755bbfafc9c5b7cafaece252f6e # v6.1.0
with:
cache-disabled: true # dependency jars are cached by the explicit branch-keyed step above
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
- name: "π Setup TestLens"
uses: testlens-app/setup-testlens@3f82d2dc6cd5c03f02ce5f7885a21195d85f8d14 # v1.9.3
- name: "π¨ Build project without tests"
if: ${{ contains(github.event.head_commit.message, '[skip tests]') }}
working-directory: 'grails-gradle'
run: >
./gradlew build
--continue
--stacktrace
-PskipCodeStyle
-PskipTests
- name: "π¨ Build project with tests"
if: ${{ !contains(github.event.head_commit.message, '[skip tests]') }}
working-directory: 'grails-gradle'
run: >
./gradlew build
--continue
--stacktrace
--rerun-tasks
-PskipCodeStyle
build:
if: ${{ !contains(github.event.head_commit.message, '[skip tests]') }}
name: 'Build Grails-Core (${{ matrix.job_name }})'
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
java: 21
job_name: Ubuntu JDK 21
gradle_task: 'build :grails-shell-cli:installDist groovydoc'
cache_writer: true
- os: ubuntu-latest
java: 25
job_name: Ubuntu JDK 25
gradle_task: 'build :grails-shell-cli:installDist groovydoc'
cache_writer: false
- os: macos-latest
java: 21
job_name: macOS JDK 21
gradle_task: 'build :grails-shell-cli:installDist groovydoc'
cache_writer: true
- os: windows-latest
java: 25
job_name: Windows JDK 25 shard 0
gradle_task: 'build :grails-shell-cli:installDist groovydoc'
shard_arguments: '-PtestShardCount=3 -PtestShardIndex=0'
cache_writer: true
- os: windows-latest
java: 25
job_name: Windows JDK 25 shard 1
gradle_task: testShard
shard_arguments: '-PtestShardCount=3 -PtestShardIndex=1'
cache_writer: false
- os: windows-latest
java: 25
job_name: Windows JDK 25 shard 2
gradle_task: testShard
shard_arguments: '-PtestShardCount=3 -PtestShardIndex=2'
cache_writer: false
runs-on: ${{ matrix.os }}
steps:
- name: "Output Agent IP" # in the event RAO blocks this agent, this can be used to debug it
run: curl -s https://api.ipify.org
- name: "π₯ Checkout repository"
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: "βοΈ Setup JDK"
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: liberica
java-version: ${{ matrix.java }}
- name: "ποΈ Restore dependency jar cache"
id: dependency-cache
uses: actions/cache/restore@v4
with:
# Cache only downloaded dependency jars and wrapper distributions, never Grails build outputs.
# Keyed by branch version so each release branch maintains its own warm cache.
path: |
~/.gradle/caches/modules-2
~/.gradle/wrapper
key: gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}-${{ hashFiles('**/dependencies.gradle', '**/gradle-wrapper.properties') }}
restore-keys: |
gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}-
- name: "π Setup Gradle"
uses: gradle/actions/setup-gradle@50e97c2cd7a37755bbfafc9c5b7cafaece252f6e # v6.1.0
with:
cache-disabled: true # dependency jars are cached by the explicit branch-keyed step above
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
- name: "π Setup TestLens"
uses: testlens-app/setup-testlens@3f82d2dc6cd5c03f02ce5f7885a21195d85f8d14 # v1.9.3
- name: "π¨ Build project"
# The Grails-Micronaut "island" (grails-micronaut, grails-micronaut-bom, the
# micronaut-tied test-examples) is auto-managed by settings.gradle based on the
# build JDK: it is pruned on a sub-25 JDK (Micronaut 5 GA targets JVM 25 bytecode)
# and included automatically on JDK 25+. So the Java 21 entries build everything
# except the island and the Java 25 entries build the full graph - no flag needed.
run: >
./gradlew ${{ matrix.gradle_task }}
--continue
--stacktrace
-PonlyCoreTests
-PskipCodeStyle
${{ matrix.shard_arguments }}
- name: "ποΈ Save dependency jar cache"
if: ${{ success() && matrix.cache_writer && steps.dependency-cache.outputs.cache-hit != 'true' }}
uses: actions/cache/save@v4
with:
path: |
~/.gradle/caches/modules-2
~/.gradle/wrapper
key: gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}-${{ hashFiles('**/dependencies.gradle', '**/gradle-wrapper.properties') }}
buildRerunTasks:
if: ${{ !contains(github.event.head_commit.message, '[skip tests]') }}
name: 'Build Grails-Core Rerunning all Tasks (${{ matrix.job_name }})'
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
java: 21
job_name: Ubuntu JDK 21 build
gradle_task: 'build :grails-shell-cli:installDist groovydoc'
extra_arguments: '-PskipTests'
cache_writer: true
- os: ubuntu-latest
java: 21
job_name: Ubuntu JDK 21 shard 0
gradle_task: testShard
extra_arguments: '-PtestShardCount=3 -PtestShardIndex=0'
cache_writer: false
- os: ubuntu-latest
java: 21
job_name: Ubuntu JDK 21 shard 1
gradle_task: testShard
extra_arguments: '-PtestShardCount=3 -PtestShardIndex=1'
cache_writer: false
- os: ubuntu-latest
java: 21
job_name: Ubuntu JDK 21 shard 2
gradle_task: testShard
extra_arguments: '-PtestShardCount=3 -PtestShardIndex=2'
cache_writer: false
runs-on: ${{ matrix.os }}
steps:
- name: "Output Agent IP" # in the event RAO blocks this agent, this can be used to debug it
run: curl -s https://api.ipify.org
- name: "π₯ Checkout repository"
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: "βοΈ Setup JDK"
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: liberica
java-version: ${{ matrix.java }}
- name: "ποΈ Restore dependency jar cache"
id: dependency-cache
uses: actions/cache/restore@v4
with:
# Cache only downloaded dependency jars and wrapper distributions, never Grails build outputs.
# Keyed by branch version so each release branch maintains its own warm cache.
path: |
~/.gradle/caches/modules-2
~/.gradle/wrapper
key: gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}-${{ hashFiles('**/dependencies.gradle', '**/gradle-wrapper.properties') }}
restore-keys: |
gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}-
- name: "π Setup Gradle"
uses: gradle/actions/setup-gradle@50e97c2cd7a37755bbfafc9c5b7cafaece252f6e # v6.1.0
with:
cache-disabled: true # dependency jars are cached by the explicit branch-keyed step above
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
- name: "π Setup TestLens"
uses: testlens-app/setup-testlens@3f82d2dc6cd5c03f02ce5f7885a21195d85f8d14 # v1.9.3
- name: "π¨ Build project"
# This job only runs on Java 21, where settings.gradle auto-prunes the Micronaut
# island (Micronaut 5 GA targets JVM 25 bytecode). See comment on `build`.
run: >
./gradlew ${{ matrix.gradle_task }}
--continue
--rerun-tasks
--stacktrace
-PonlyCoreTests
-PskipCodeStyle
${{ matrix.extra_arguments }}
- name: "ποΈ Save dependency jar cache"
if: ${{ success() && matrix.cache_writer && steps.dependency-cache.outputs.cache-hit != 'true' }}
uses: actions/cache/save@v4
with:
path: |
~/.gradle/caches/modules-2
~/.gradle/wrapper
key: gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}-${{ hashFiles('**/dependencies.gradle', '**/gradle-wrapper.properties') }}
buildForge:
name: "Build Grails Forge (Java ${{ matrix.java }}, indy=${{ matrix.indy }})"
strategy:
fail-fast: false
matrix:
java: [ 21, 25 ]
indy: [ false ]
include:
- java: 21
indy: true
runs-on: ubuntu-24.04
steps:
- name: "Output Agent IP" # in the event RAO blocks this agent, this can be used to debug it
run: curl -s https://api.ipify.org
- name: "π₯ Checkout repository"
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: "βοΈ Setup JDK"
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: 'liberica'
java-version: ${{ matrix.java }}
- name: "ποΈ Restore dependency jar cache"
uses: actions/cache@v4
with:
# Cache only downloaded dependency jars and wrapper distributions, never Grails build outputs.
# Keyed by branch version so each release branch maintains its own warm cache.
path: |
~/.gradle/caches/modules-2
~/.gradle/wrapper
key: gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}-${{ hashFiles('**/dependencies.gradle', '**/gradle-wrapper.properties') }}
restore-keys: |
gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}-
- name: "π Setup Gradle"
uses: gradle/actions/setup-gradle@50e97c2cd7a37755bbfafc9c5b7cafaece252f6e # v6.1.0
with:
cache-disabled: true # dependency jars are cached by the explicit branch-keyed step above
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
- name: "π Setup TestLens"
uses: testlens-app/setup-testlens@3f82d2dc6cd5c03f02ce5f7885a21195d85f8d14 # v1.9.3
- name: "π¨ Build project without tests"
if: ${{ contains(github.event.head_commit.message, '[skip tests]') }}
working-directory: 'grails-forge'
# The Forge composite build includes the root grails-core via
# `includeBuild('..')` in grails-forge/settings.gradle. On Java 21 that
# included build auto-prunes the Micronaut island (settings.gradle), so the
# Forge build never tries to compile the JVM-25 island; Java 25 includes it.
run: >
./gradlew build
--continue
--stacktrace
-PgrailsIndy=${{ matrix.indy }}
-PskipCodeStyle
-PskipTests
- name: "π¨ Build project with tests"
if: ${{ !contains(github.event.head_commit.message, '[skip tests]') }}
working-directory: 'grails-forge'
# See comment above on the auto-managed Micronaut island.
run: >
./gradlew build
--continue
--rerun-tasks
--stacktrace
-PgrailsIndy=${{ matrix.indy }}
-PskipCodeStyle
- name: "β
Verify combined CLI"
run: |
cd grails-forge
cp grails-cli/build/distributions/apache-grails-*.zip cli.zip
unzip cli -d tmp1
mv tmp1/apache-grails-* tmp1/cli
./tmp1/cli/bin/grails --version
./tmp1/cli/bin/grails-forge-cli --version
- name: "π€ Upload CLI Zip to Workflow Summary Page"
if: ${{ matrix.java == '21' && matrix.indy == false }}
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: 'apache-grails-SNAPSHOT-bin.zip'
include-hidden-files: true
path: grails-forge/tmp1/cli/**/*
if-no-files-found: 'error'
functional:
name: "Functional Tests (${{ matrix.job_name }})"
if: ${{ !contains(github.event.head_commit.message, '[skip tests]') }}
# 8.0.x history: shard 1 is 22-34 min, indy=true shard 0 is 48-55.
# On Groovy 6, shard 1 tests finish around 31 min then Gradle hangs in
# worker teardown. The init script exits after buildFinished so that hang
# cannot occupy a runner. This job cap is a last-resort backstop.
timeout-minutes: 80
strategy:
fail-fast: false
matrix:
include:
- java: 21
indy: false
job_name: Java 21, indy=false
gradle_task: 'bootJar check'
artifact_suffix: java21-indyfalse-shard0
cache_writer: true
shard_arguments: '-PtestShardCount=2 -PtestShardIndex=0'
- java: 21
indy: false
job_name: Java 21, indy=false, shard 1
gradle_task: testShard
artifact_suffix: java21-indyfalse-shard1
cache_writer: false
shard_arguments: '-PtestShardCount=2 -PtestShardIndex=1'
- java: 21
indy: true
job_name: Java 21, indy=true
gradle_task: 'bootJar check'
artifact_suffix: java21-indytrue-shard0
cache_writer: false
shard_arguments: '-PtestShardCount=2 -PtestShardIndex=0'
- java: 21
indy: true
job_name: Java 21, indy=true, shard 1
gradle_task: testShard
artifact_suffix: java21-indytrue-shard1
cache_writer: false
shard_arguments: '-PtestShardCount=2 -PtestShardIndex=1'
- java: 25
indy: false
job_name: Java 25, indy=false
gradle_task: 'bootJar check'
artifact_suffix: java25-indyfalse-shard0
cache_writer: false
shard_arguments: '-PtestShardCount=2 -PtestShardIndex=0'
- java: 25
indy: false
job_name: Java 25, indy=false, shard 1
gradle_task: testShard
artifact_suffix: java25-indyfalse-shard1
cache_writer: false
shard_arguments: '-PtestShardCount=2 -PtestShardIndex=1'
runs-on: ubuntu-24.04
steps:
- name: "Output Agent IP" # in the event RAO blocks this agent, this can be used to debug it
run: curl -s https://api.ipify.org
- name: "π₯ Checkout repository"
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: "βοΈ Setup JDK"
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: liberica
java-version: ${{ matrix.java }}
- name: "ποΈ Restore dependency jar cache"
id: dependency-cache
uses: actions/cache/restore@v4
with:
# Cache only downloaded dependency jars and wrapper distributions, never Grails build outputs.
# Keyed by branch version so each release branch maintains its own warm cache.
path: |
~/.gradle/caches/modules-2
~/.gradle/wrapper
key: gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}-${{ hashFiles('**/dependencies.gradle', '**/gradle-wrapper.properties') }}
restore-keys: |
gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}-
- name: "π Setup Gradle"
uses: gradle/actions/setup-gradle@50e97c2cd7a37755bbfafc9c5b7cafaece252f6e # v6.1.0
with:
cache-disabled: true # dependency jars are cached by the explicit branch-keyed step above
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
- name: "π Setup TestLens"
uses: testlens-app/setup-testlens@3f82d2dc6cd5c03f02ce5f7885a21195d85f8d14 # v1.9.3
- name: "π Run Functional Tests"
# The Micronaut island is auto-pruned on a sub-25 JDK (settings.gradle), so the
# Java 21 entries skip it and the Java 25 entries include it (see comment on `build`).
# The known hanging cell finishes tests, prints the wrapper:test /
# aggregate-report tail, then hangs before buildFinished. Timeout plus
# that end-of-walk log and green XML is treated as success.
run: |
hanging=0
if [ "${{ matrix.java }}" = "21" ] && [ "${{ matrix.indy }}" = "true" ] && [ "${{ matrix.gradle_task }}" = "testShard" ]; then
hanging=1
limit=45m
else
limit=70m
fi
rm -f build/ci-build-finished.txt build/ci-build-finished.txt.tmp
set +e
timeout --kill-after=30s "$limit" ./gradlew ${{ matrix.gradle_task }} \
--init-script .github/ci-exit-after-build.init.gradle \
--no-daemon \
--continue \
--rerun-tasks \
--stacktrace \
-PgrailsIndy=${{ matrix.indy }} \
-PonlyFunctionalTests \
-PskipCodeStyle \
-PskipHibernate5Tests \
-PskipHibernate7Tests \
-PskipMongodbTests \
-PskipSpringSecurityTests \
-PskipRedisTests \
${{ matrix.shard_arguments }} \
2>&1 | tee gradle-functional.log
code=${PIPESTATUS[0]}
set -e
if [ "$code" -eq 0 ]; then
exit 0
fi
marker="build/ci-build-finished.txt"
if [ "$hanging" -eq 1 ] && { [ "$code" -eq 124 ] || [ "$code" -eq 137 ]; }; then
if [ -f "$marker" ] && [ "$(cat "$marker")" = "SUCCESS" ]; then
echo "Known hanging cell: SUCCESS sentinel after teardown hang."
exit 0
fi
if grep -qE '> Task .+ FAILED' gradle-functional.log; then
echo "A Gradle task FAILED; not recovering from teardown hang."
exit 1
fi
if grep -q '> Task :grails-wrapper:test' gradle-functional.log \
&& grep -q 'Markdown aggregate test report:' gradle-functional.log \
&& python3 .github/ci-check-functional-reports.py; then
echo "Known hanging cell: suite walked to grails-wrapper:test with green XML; teardown hang treated as success."
exit 0
fi
fi
exit "$code"
- name: "ποΈ Save dependency jar cache"
if: ${{ success() && matrix.cache_writer && steps.dependency-cache.outputs.cache-hit != 'true' }}
uses: actions/cache/save@v4
with:
path: |
~/.gradle/caches/modules-2
~/.gradle/wrapper
key: gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}-${{ hashFiles('**/dependencies.gradle', '**/gradle-wrapper.properties') }}
- name: "π€ Upload Geb Reports"
if: failure()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: geb-reports-functional-${{ matrix.artifact_suffix }}
path: '**/build/geb-reports/'
if-no-files-found: ignore
security:
name: "Spring Security Tests (${{ matrix.job_name }})"
if: ${{ !contains(github.event.head_commit.message, '[skip tests]') }}
strategy:
fail-fast: false
matrix:
include:
- java: 21
job_name: Java 21
gradle_task: 'bootJar check'
- java: 25
job_name: Java 25
gradle_task: 'bootJar check'
shard_arguments: '-PtestShardCount=2 -PtestShardIndex=0'
- java: 25
job_name: Java 25, shard 1
gradle_task: testShard
shard_arguments: '-PtestShardCount=2 -PtestShardIndex=1'
runs-on: ubuntu-24.04
steps:
- name: "Output Agent IP" # in the event RAO blocks this agent, this can be used to debug it
run: curl -s https://api.ipify.org
- name: "π₯ Checkout repository"
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: "βοΈ Setup JDK"
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: liberica
java-version: ${{ matrix.java }}
- name: "π Setup Gradle"
uses: gradle/actions/setup-gradle@50e97c2cd7a37755bbfafc9c5b7cafaece252f6e # v6.1.0
with:
cache-provider: basic # 'basic' uses the MIT-licensed, open-source cache provider; the default 'enhanced' provider (v6+) is proprietary (Gradle commercial Terms of Use)
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
- name: "π Setup TestLens"
uses: testlens-app/setup-testlens@3f82d2dc6cd5c03f02ce5f7885a21195d85f8d14 # v1.9.3
- name: "π Run Functional Tests"
run: >
./gradlew ${{ matrix.gradle_task }}
--continue
--rerun-tasks
--stacktrace
-PonlySpringSecurityTests
-PskipCodeStyle
${{ matrix.shard_arguments }}
securityConfig:
name: "Spring Security Config Functional Tests"
if: ${{ !contains(github.event.head_commit.message, '[skip tests]') }}
strategy:
fail-fast: false
matrix:
# Each value boots the core functional-test-app with a different Spring Security configuration.
# The specs are gated with @IgnoreIf({ System.getProperty('TESTCONFIG') != '<config>' }), so a
# config only runs when TESTCONFIG matches. TESTCONFIG is applied at app startup, so every config
# must be its own run. Carried over from the standalone grails-spring-security CI β do not drop
# configs (add, don't remove) when the app's security configurations change.
test-config: [ 'static', 'annotation', 'requestmap', 'basic', 'basicCacheUsers', 'misc', 'putWithParams', 'bcrypt', 'issue503' ]
runs-on: ubuntu-24.04
steps:
- name: "Output Agent IP" # in the event RAO blocks this agent, this can be used to debug it
run: curl -s https://api.ipify.org
- name: "π₯ Checkout repository"
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: "βοΈ Setup JDK"
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: liberica
java-version: 21
- name: "π Setup Gradle"
uses: gradle/actions/setup-gradle@50e97c2cd7a37755bbfafc9c5b7cafaece252f6e # v6.1.0
with:
cache-provider: basic # 'basic' uses the MIT-licensed, open-source cache provider; the default 'enhanced' provider (v6+) is proprietary (Gradle commercial Terms of Use)
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
- name: "π Setup TestLens"
uses: testlens-app/setup-testlens@3f82d2dc6cd5c03f02ce5f7885a21195d85f8d14 # v1.9.3
- name: "π Run Spring Security Functional Tests (TESTCONFIG=${{ matrix.test-config }})"
run: >
./gradlew
:grails-test-examples-spring-security-core-functional-test-app:check
--continue
--rerun-tasks
--stacktrace
-DTESTCONFIG=${{ matrix.test-config }}
-PskipCodeStyle
redis:
name: "Redis Tests"
if: ${{ !contains(github.event.head_commit.message, '[skip tests]') }}
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
java: [ 21, 25 ]
redis-version: [ '7.4', '8.0' ] # Redis container version exercised via Testcontainers
steps:
- name: "Output Agent IP" # in the event RAO blocks this agent, this can be used to debug it
run: curl -s https://api.ipify.org
- name: "π₯ Checkout repository"
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: "βοΈ Setup JDK"
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: liberica
java-version: ${{ matrix.java }}
- name: "π Setup Gradle"
uses: gradle/actions/setup-gradle@50e97c2cd7a37755bbfafc9c5b7cafaece252f6e # v6.1.0
with:
cache-provider: basic # 'basic' uses the MIT-licensed, open-source cache provider; the default 'enhanced' provider (v6+) is proprietary (Gradle commercial Terms of Use)
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
- name: "π Setup TestLens"
uses: testlens-app/setup-testlens@3f82d2dc6cd5c03f02ce5f7885a21195d85f8d14 # v1.9.3
- name: "π Run Redis Tests"
run: >
./gradlew bootJar check
--continue
--rerun-tasks
--stacktrace
-PonlyRedisTests
-PredisContainerVersion=${{ matrix.redis-version }}
-PskipCodeStyle
mongodbFunctional:
if: ${{ !contains(github.event.head_commit.message, '[skip tests]') }}
name: "Mongodb Functional Tests (Java ${{ matrix.java }}, MongoDB ${{ matrix.mongodb-version }}, indy=${{ matrix.indy }})"
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
java: [ 21, 25 ]
mongodb-version: [ '7.0', '8.0' ] # test with supported versions https://www.mongodb.com/legal/support-policy/lifecycles
indy: [ false ]
include:
- java: 21
mongodb-version: '7.0'
indy: true
steps:
- name: "Output Agent IP" # in the event RAO blocks this agent, this can be used to debug it
run: curl -s https://api.ipify.org
- name: "π₯ Checkout the repository"
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: "βοΈ Setup JDK"
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: liberica
java-version: ${{ matrix.java }}
- name: "ποΈ Restore dependency jar cache"
uses: actions/cache@v4
with:
# Cache only downloaded dependency jars and wrapper distributions, never Grails build outputs.
# Keyed by branch version so each release branch maintains its own warm cache.
path: |
~/.gradle/caches/modules-2
~/.gradle/wrapper
key: gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}-${{ hashFiles('**/dependencies.gradle', '**/gradle-wrapper.properties') }}
restore-keys: |
gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}-
- name: "π Setup Gradle"
uses: gradle/actions/setup-gradle@50e97c2cd7a37755bbfafc9c5b7cafaece252f6e # v6.1.0
with:
cache-disabled: true # dependency jars are cached by the explicit branch-keyed step above
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
- name: "π Run Functional Tests"
env:
GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
# The Micronaut island is auto-pruned on a sub-25 JDK (settings.gradle), so the
# Java 21 entries skip it and the Java 25 entries include it (see comment on `build`).
run: >
./gradlew bootJar check
--continue
--rerun-tasks
--stacktrace
-PgrailsIndy=${{ matrix.indy }}
-PonlyMongodbTests
-PmongodbContainerVersion=${{ matrix.mongodb-version }}
-PskipCodeStyle
hibernate5Functional:
if: ${{ !contains(github.event.head_commit.message, '[skip tests]') }}
name: "Hibernate5 Functional Tests (Java ${{ matrix.java }}, indy=${{ matrix.indy }})"
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
java: [ 21, 25 ]
indy: [ false ]
include:
- java: 21
indy: true
steps:
- name: "Output Agent IP" # in the event RAO blocks this agent, this can be used to debug it
run: curl -s https://api.ipify.org
- name: "π₯ Checkout the repository"
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: "βοΈ Setup JDK"
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: liberica
java-version: ${{ matrix.java }}
- name: "ποΈ Restore dependency jar cache"
uses: actions/cache@v4
with:
# Cache only downloaded dependency jars and wrapper distributions, never Grails build outputs.
# Keyed by branch version so each release branch maintains its own warm cache.
path: |
~/.gradle/caches/modules-2
~/.gradle/wrapper
key: gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}-${{ hashFiles('**/dependencies.gradle', '**/gradle-wrapper.properties') }}
restore-keys: |
gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}-
- name: "π Setup Gradle"
uses: gradle/actions/setup-gradle@50e97c2cd7a37755bbfafc9c5b7cafaece252f6e # v6.1.0
with:
cache-disabled: true # dependency jars are cached by the explicit branch-keyed step above
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
- name: "π Run Functional Tests"
env:
GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
# The Micronaut island is auto-pruned on a sub-25 JDK (settings.gradle), so the
# Java 21 entries skip it and the Java 25 entries include it (see comment on `build`).
run: >
./gradlew bootJar check
--continue
--rerun-tasks
--stacktrace
-PgrailsIndy=${{ matrix.indy }}
-PonlyHibernate5Tests
-PskipCodeStyle
hibernate7Functional:
if: ${{ !contains(github.event.head_commit.message, '[skip tests]') }}
name: "Hibernate7 Functional Tests (${{ matrix.job_name }})"
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
include:
- java: 21
indy: false
job_name: Java 21, indy=false
gradle_task: 'bootJar check'
shard_arguments: '-PtestShardCount=3 -PtestShardIndex=0'
- java: 21
indy: false
job_name: Java 21, indy=false, shard 1
gradle_task: testShard
shard_arguments: '-PtestShardCount=3 -PtestShardIndex=1'
- java: 21
indy: false
job_name: Java 21, indy=false, shard 2
gradle_task: testShard
shard_arguments: '-PtestShardCount=3 -PtestShardIndex=2'
- java: 21
indy: true
job_name: Java 21, indy=true
gradle_task: 'bootJar check'
shard_arguments: '-PtestShardCount=2 -PtestShardIndex=0'
- java: 21
indy: true
job_name: Java 21, indy=true, shard 1
gradle_task: testShard
shard_arguments: '-PtestShardCount=2 -PtestShardIndex=1'
- java: 25
indy: false
job_name: Java 25, indy=false
gradle_task: 'bootJar check'
shard_arguments: '-PtestShardCount=2 -PtestShardIndex=0'
- java: 25
indy: false
job_name: Java 25, indy=false, shard 1
gradle_task: testShard
shard_arguments: '-PtestShardCount=2 -PtestShardIndex=1'
steps:
- name: "Output Agent IP" # in the event RAO blocks this agent, this can be used to debug it
run: curl -s https://api.ipify.org
- name: "π₯ Checkout the repository"
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: "βοΈ Setup JDK"
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: liberica
java-version: ${{ matrix.java }}
- name: "π Setup Gradle"
uses: gradle/actions/setup-gradle@50e97c2cd7a37755bbfafc9c5b7cafaece252f6e # v6.1.0
with:
cache-provider: basic # 'basic' uses the MIT-licensed, open-source cache provider; the default 'enhanced' provider (v6+) is proprietary (Gradle commercial Terms of Use)
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
- name: "π Run Functional Tests"
env:
GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
run: >
./gradlew ${{ matrix.gradle_task }}
--continue
--rerun-tasks
--stacktrace
-PgrailsIndy=${{ matrix.indy }}
-PonlyHibernate7Tests
-PskipCodeStyle
${{ matrix.shard_arguments }}
publishGradle:
if: github.repository_owner == 'apache' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch')
needs: [ buildGradle ]
runs-on: ubuntu-24.04
steps:
- name: "Output Agent IP" # in the event RAO blocks this agent, this can be used to debug it
run: curl -s https://api.ipify.org
- name: "π₯ Checkout repository"
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: "βοΈ Setup JDK"
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: liberica
java-version: 21
- name: "ποΈ Restore dependency jar cache"
uses: actions/cache@v4
with:
# Cache only downloaded dependency jars and wrapper distributions, never Grails build outputs.
# Keyed by branch version so each release branch maintains its own warm cache.
path: |
~/.gradle/caches/modules-2
~/.gradle/wrapper
key: gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}-${{ hashFiles('**/dependencies.gradle', '**/gradle-wrapper.properties') }}
restore-keys: |
gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}-
- name: "π Setup Gradle"
uses: gradle/actions/setup-gradle@50e97c2cd7a37755bbfafc9c5b7cafaece252f6e # v6.1.0
with:
cache-disabled: true # dependency jars are cached by the explicit branch-keyed step above
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
- name: "π Setup TestLens"
uses: testlens-app/setup-testlens@3f82d2dc6cd5c03f02ce5f7885a21195d85f8d14 # v1.9.3
- name: "π€ Publish Gradle Snapshot Artifacts"
env:
GRAILS_PUBLISH_RELEASE: 'false'
MAVEN_PUBLISH_URL: ${{ secrets.GRAILS_NEXUS_PUBLISH_SNAPSHOT_URL }}
MAVEN_PUBLISH_USERNAME: ${{ secrets.NEXUS_USER }}
MAVEN_PUBLISH_PASSWORD: ${{ secrets.NEXUS_PW }}
working-directory: 'grails-gradle'
run: >
./gradlew publish aggregateChecksums aggregatePublishedArtifacts
--no-build-cache
--rerun-tasks
- name: "π€ Upload grails-gradle checksums"
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: grails-gradle-checksums
path: grails-gradle/build/grails-gradle-checksums.txt
- name: "π€ Upload grails-gradle published artifacts"
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: grails-gradle-artifacts.txt
path: grails-gradle/build/grails-gradle-artifacts.txt
publish:
needs: [ publishGradle, build, functional, security, securityConfig, redis, hibernate5Functional, hibernate7Functional, mongodbFunctional ]
if: >-
${{ always() &&
github.repository_owner == 'apache' &&
(github.event_name == 'push' || github.event_name == 'workflow_dispatch') &&
needs.publishGradle.result == 'success' &&
(needs.build.result == 'success' || needs.build.result == 'skipped') &&
(needs.functional.result == 'success' || needs.functional.result == 'skipped') &&
(needs.security.result == 'success' || needs.security.result == 'skipped') &&
(needs.securityConfig.result == 'success' || needs.securityConfig.result == 'skipped') &&
(needs.redis.result == 'success' || needs.redis.result == 'skipped') &&
(needs.hibernate5Functional.result == 'success' || needs.hibernate5Functional.result == 'skipped') &&
(needs.hibernate7Functional.result == 'success' || needs.hibernate7Functional.result == 'skipped') &&
(needs.mongodbFunctional.result == 'success' || needs.mongodbFunctional.result == 'skipped')
}}
runs-on: ubuntu-24.04
steps:
- name: "Output Agent IP" # in the event RAO blocks this agent, this can be used to debug it
run: curl -s https://api.ipify.org
- name: "π₯ Checkout repository"
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: "βοΈ Setup JDK"
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: liberica
java-version: 21
- name: "ποΈ Restore dependency jar cache"
uses: actions/cache@v4
with:
# Cache only downloaded dependency jars and wrapper distributions, never Grails build outputs.
# Keyed by branch version so each release branch maintains its own warm cache.
path: |
~/.gradle/caches/modules-2
~/.gradle/wrapper
key: gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}-${{ hashFiles('**/dependencies.gradle', '**/gradle-wrapper.properties') }}
restore-keys: |
gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}-
- name: "π Setup Gradle"
uses: gradle/actions/setup-gradle@50e97c2cd7a37755bbfafc9c5b7cafaece252f6e # v6.1.0
with:
cache-disabled: true # dependency jars are cached by the explicit branch-keyed step above
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
- name: "π Setup TestLens"
uses: testlens-app/setup-testlens@3f82d2dc6cd5c03f02ce5f7885a21195d85f8d14 # v1.9.3
- name: "π€ Publish Grails-Core Snapshot Artifacts"
# This Java 21 publish excludes the Micronaut 5 / JVM 25 island automatically -
# settings.gradle prunes it on a sub-25 JDK. The island artifacts (grails-micronaut,
# grails-micronaut-bom) are published by the parallel publishMicronaut job below,
# which runs on JDK 25.
uses: nick-fields/retry@ad984534de44a9489a53aefd81eb77f87c70dc60 # v4.0.0
env:
GRAILS_PUBLISH_RELEASE: 'false'
MAVEN_PUBLISH_URL: ${{ secrets.GRAILS_NEXUS_PUBLISH_SNAPSHOT_URL }}
MAVEN_PUBLISH_USERNAME: ${{ secrets.NEXUS_USER }}
MAVEN_PUBLISH_PASSWORD: ${{ secrets.NEXUS_PW }}
with:
timeout_seconds: 3600 # normal range ~14-25min uncached (no tests); generous headroom for slow Nexus uploads so a single attempt is not killed mid-publish
max_attempts: 3 # Attempts to address: Could not write to resource 'https://repository.apache.org/content/repositories/snapshots/...' Read timed out
retry_wait_seconds: 180
command: ./gradlew publish aggregateChecksums aggregatePublishedArtifacts --no-build-cache --rerun-tasks
- name: "π€ Upload grails-core checksums"
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: grails-core-checksums.txt
path: build/grails-core-checksums.txt
- name: "π€ Upload grails-core published artifacts"
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: grails-core-artifacts.txt
path: build/grails-core-artifacts.txt
- name: "π¨ Create Grails Wrapper Distribution Zip"
run: |
./gradlew :grails-wrapper:distZip
cp grails-wrapper/build/distributions/apache-grails-wrapper-*.zip build/wrapper.zip
cd build
unzip wrapper -d tmp
mv tmp/apache-grails-wrapper-* tmp/wrapper
- name: "π€ Upload Wrapper Zip to Workflow Summary Page"
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: apache-grails-wrapper-SNAPSHOT-bin
path: build/tmp/wrapper
publishMicronaut:
# Micronaut 5.0.0 publishes JARs targeting JVM 25 bytecode, so the Micronaut
# "island" (grails-micronaut, grails-micronaut-bom) must publish from a JDK 25
# runner. The sibling `publish` job runs on JDK 21, where settings.gradle
# auto-prunes the island, so it publishes everything else; this job publishes
# the two Micronaut artifacts. The two test-example projects in the island are
# not published.
needs: [ publishGradle, build, functional, hibernate5Functional, mongodbFunctional ]
if: >-
${{ always() &&
github.repository_owner == 'apache' &&
(github.event_name == 'push' || github.event_name == 'workflow_dispatch') &&
needs.publishGradle.result == 'success' &&
(needs.build.result == 'success' || needs.build.result == 'skipped') &&
(needs.functional.result == 'success' || needs.functional.result == 'skipped') &&
(needs.hibernate5Functional.result == 'success' || needs.hibernate5Functional.result == 'skipped') &&
(needs.mongodbFunctional.result == 'success' || needs.mongodbFunctional.result == 'skipped')
}}
runs-on: ubuntu-24.04
steps:
- name: "Output Agent IP" # in the event RAO blocks this agent, this can be used to debug it
run: curl -s https://api.ipify.org
- name: "π₯ Checkout repository"
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: "βοΈ Setup JDK"
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: liberica
java-version: 25
- name: "π Setup Gradle"
uses: gradle/actions/setup-gradle@50e97c2cd7a37755bbfafc9c5b7cafaece252f6e # v6.1.0
with:
cache-provider: basic # 'basic' uses the MIT-licensed, open-source cache provider; the default 'enhanced' provider (v6+) is proprietary (Gradle commercial Terms of Use)
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
- name: "π Setup TestLens"
uses: testlens-app/setup-testlens@3f82d2dc6cd5c03f02ce5f7885a21195d85f8d14 # v1.9.3
- name: "π€ Publish Grails-Micronaut Snapshot Artifacts"
uses: nick-fields/retry@ad984534de44a9489a53aefd81eb77f87c70dc60 # v4.0.0
env:
GRAILS_PUBLISH_RELEASE: 'false'
MAVEN_PUBLISH_URL: ${{ secrets.GRAILS_NEXUS_PUBLISH_SNAPSHOT_URL }}
MAVEN_PUBLISH_USERNAME: ${{ secrets.NEXUS_USER }}