9696 steps :
9797 - name : Build
9898 run : sleep 30
99+ runs-on :
100+ name : " Configure Runs-On"
101+ runs-on : ubuntu-latest
102+ outputs :
103+ config : ${{ steps.configure.outputs.config }}
104+ steps :
105+ - name : Set up JDK 21
106+ uses : actions/setup-java@v4
107+ with :
108+ distribution : temurin
109+ java-version : 21
110+ - name : Configure Runs-On
111+ id : configure
112+ uses : quarkusio/runs-on-action@main
113+ with :
114+ github-token : ${{ secrets.GITHUB_TOKEN }}
115+ main-repository : quarkusio/quarkus
116+ runs-on : true
117+
99118 build-jdk17 :
100119 name : " Initial JDK 17 Build"
101- runs-on : ubuntu-latest
120+ needs : [ runs-on ]
121+ runs-on : ${{ fromJson(needs.runs-on.outputs.config).runners['ubuntu-latest'].runsOn || 'ubuntu-latest' }}
102122 # Skip main in forks
103123 # Skip draft PRs, rerun as soon as its removed
104124 if : " (github.repository == 'quarkusio/quarkus' || !endsWith(github.ref, '/main')) && ( \
@@ -108,6 +128,8 @@ jobs:
108128 github.event.action != 'edited' \
109129 ) \
110130 )"
131+ env :
132+ RUNS_ON_ENABLED : ${{ fromJson(needs.runs-on.outputs.config).runners['ubuntu-latest'].runsOn && 'true' || 'false' }}
111133 outputs :
112134 gib_args : ${{ steps.get-gib-args.outputs.gib_args }}
113135 gib_impacted : ${{ steps.get-gib-impacted.outputs.impacted_modules }}
@@ -149,7 +171,7 @@ jobs:
149171 echo "quarkus-metadata-cache-key-default=quarkus-metadata-cache-${CURRENT_WEEK}-${{ github.event.repository.default_branch }}" >> $GITHUB_OUTPUT
150172 - name : Cache Maven Repository
151173 id : cache-maven
152- uses : actions /cache@v4
174+ uses : quarkusio /cache-action @v4
153175 # if it's not a pull request, we restore and save the cache
154176 if : github.event_name != 'pull_request'
155177 with :
@@ -161,8 +183,9 @@ jobs:
161183 restore-keys : |
162184 ${{ steps.cache-key.outputs.m2-monthly-branch-cache-key }}-
163185 ${{ steps.cache-key.outputs.m2-monthly-cache-key }}-
186+ runs-on : ${{ env.RUNS_ON_ENABLED }}
164187 - name : Restore Maven Repository
165- uses : actions /cache/restore@v4
188+ uses : quarkusio /cache-action /restore@v4
166189 # if it a pull request, we restore the cache but we don't save it
167190 if : github.event_name == 'pull_request'
168191 with :
@@ -171,14 +194,16 @@ jobs:
171194 restore-keys : |
172195 ${{ steps.cache-key.outputs.m2-monthly-branch-cache-key }}-
173196 ${{ steps.cache-key.outputs.m2-monthly-cache-key }}-
197+ runs-on : ${{ env.RUNS_ON_ENABLED }}
174198 - name : Cache Develocity local cache
175- uses : actions /cache@v4
199+ uses : quarkusio /cache-action @v4
176200 if : github.event_name == 'pull_request'
177201 with :
178202 path : ~/.m2/.develocity/build-cache
179203 key : develocity-cache-Initial JDK 17 Build-${{ github.event.pull_request.number }}-${{ github.event.pull_request.head.sha }}
180204 restore-keys : |
181205 develocity-cache-Initial JDK 17 Build-${{ github.event.pull_request.number }}-
206+ runs-on : ${{ env.RUNS_ON_ENABLED }}
182207 - name : Populate the cache
183208 # only populate the cache if it's not a pull request as we only store the cache in this case
184209 if : github.event_name != 'pull_request'
@@ -341,14 +366,15 @@ jobs:
341366
342367 jvm-tests :
343368 name : ${{ matrix.java.name }}
344- runs-on : ${{ matrix.java.os-name }}
345- needs : [build-jdk17, calculate-test-jobs]
369+ runs-on : ${{ fromJson(needs.runs-on.outputs.config).runners[matrix.java.os-name].runsOn || matrix.java.os-name }}
370+ needs : [runs-on, build-jdk17, calculate-test-jobs]
346371 # Skip main in forks
347372 if : " needs.calculate-test-jobs.outputs.run_jvm == 'true' && (github.repository == 'quarkusio/quarkus' || !endsWith(github.ref, '/main'))"
348373 timeout-minutes : 400
349374 env :
350375 MAVEN_OPTS : ${{ matrix.java.maven_opts }}
351376 JAVA_VERSION_GRADLE : ${{ matrix.java.java-version-gradle || matrix.java.java-version }}
377+ RUNS_ON_ENABLED : ${{ fromJson(needs.runs-on.outputs.config).runners[matrix.java.os-name].runsOn && 'true' || 'false' }}
352378 strategy :
353379 fail-fast : false
354380 matrix : ${{ fromJson(needs.calculate-test-jobs.outputs.jvm_matrix) }}
@@ -404,13 +430,14 @@ jobs:
404430 architecture : ${{ matrix.java.architecture || 'x64' }}
405431
406432 - name : Restore Maven Repository
407- uses : actions /cache/restore@v4
433+ uses : quarkusio /cache-action /restore@v4
408434 with :
409435 path : ~/.m2/repository
410436 key : ${{ needs.build-jdk17.outputs.m2-cache-key }}
411437 restore-keys : |
412438 ${{ needs.build-jdk17.outputs.m2-monthly-branch-cache-key }}-
413439 ${{ needs.build-jdk17.outputs.m2-monthly-cache-key }}-
440+ runs-on : ${{ env.RUNS_ON_ENABLED }}
414441 - name : Download previously uploaded .m2 content
415442 uses : actions/download-artifact@v4
416443 with :
@@ -419,13 +446,14 @@ jobs:
419446 - name : Extract previously uploaded .m2 content
420447 run : tar -xzf m2-content.tgz -C ~
421448 - name : Cache Develocity local cache
422- uses : actions /cache@v4
449+ uses : quarkusio /cache-action @v4
423450 if : github.event_name == 'pull_request'
424451 with :
425452 path : ~/.m2/.develocity/build-cache
426453 key : develocity-cache-${{matrix.java.name}}-${{ github.event.pull_request.number }}-${{ github.event.pull_request.head.sha }}
427454 restore-keys : |
428455 develocity-cache-${{matrix.java.name}}-${{ github.event.pull_request.number }}-
456+ runs-on : ${{ env.RUNS_ON_ENABLED }}
429457 - name : Setup Develocity Build Scan capture
430458 uses :
gradle/develocity-actions/[email protected] 431459 with :
@@ -499,10 +527,11 @@ jobs:
499527
500528 maven-tests :
501529 name : Maven Tests - JDK ${{matrix.java.name}}
502- runs-on : ${{ matrix.java.os-name }}
503- needs : [build-jdk17, calculate-test-jobs]
530+ runs-on : ${{ fromJson(needs.runs-on.outputs.config).runners[matrix.java.os-name].runsOn || matrix.java.os-name }}
531+ needs : [runs-on, build-jdk17, calculate-test-jobs]
504532 env :
505533 MAVEN_OPTS : -Xmx2g -XX:MaxMetaspaceSize=1g
534+ RUNS_ON_ENABLED : ${{ fromJson(needs.runs-on.outputs.config).runners[matrix.java.os-name].runsOn && 'true' || 'false' }}
506535 # Skip main in forks
507536 if : " needs.calculate-test-jobs.outputs.run_maven == 'true' && (github.repository == 'quarkusio/quarkus' || !endsWith(github.ref, '/main'))"
508537 timeout-minutes : 130
@@ -535,13 +564,14 @@ jobs:
535564 - name : Add quarkusio remote for GIB
536565 run : git remote show quarkusio &> /dev/null || git remote add quarkusio https://github.com/quarkusio/quarkus.git
537566 - name : Restore Maven Repository
538- uses : actions /cache/restore@v4
567+ uses : quarkusio /cache-action /restore@v4
539568 with :
540569 path : ~/.m2/repository
541570 key : ${{ needs.build-jdk17.outputs.m2-cache-key }}
542571 restore-keys : |
543572 ${{ needs.build-jdk17.outputs.m2-monthly-branch-cache-key }}-
544573 ${{ needs.build-jdk17.outputs.m2-monthly-cache-key }}-
574+ runs-on : ${{ env.RUNS_ON_ENABLED }}
545575 - name : Download previously uploaded .m2 content
546576 uses : actions/download-artifact@v4
547577 with :
@@ -605,11 +635,12 @@ jobs:
605635
606636 gradle-tests :
607637 name : Gradle Tests - JDK ${{matrix.java.name}}
608- runs-on : ${{matrix.java.os-name}}
609- needs : [build-jdk17, calculate-test-jobs]
638+ runs-on : ${{ fromJson(needs.runs-on.outputs.config).runners[ matrix.java.os-name].runsOn || matrix.java.os-name }}
639+ needs : [runs-on, build-jdk17, calculate-test-jobs]
610640 env :
611641 # leave more space for the actual gradle execution (which is just wrapped by maven)
612642 MAVEN_OPTS : -Xmx1g
643+ RUNS_ON_ENABLED : ${{ fromJson(needs.runs-on.outputs.config).runners[matrix.java.os-name].runsOn && 'true' || 'false' }}
613644 # Skip main in forks
614645 if : " needs.calculate-test-jobs.outputs.run_gradle == 'true' && (github.repository == 'quarkusio/quarkus' || !endsWith(github.ref, '/main'))"
615646 timeout-minutes : 120
@@ -637,13 +668,14 @@ jobs:
637668 run : git config --global core.longpaths true
638669 - uses : actions/checkout@v4
639670 - name : Restore Maven Repository
640- uses : actions /cache/restore@v4
671+ uses : quarkusio /cache-action /restore@v4
641672 with :
642673 path : ~/.m2/repository
643674 key : ${{ needs.build-jdk17.outputs.m2-cache-key }}
644675 restore-keys : |
645676 ${{ needs.build-jdk17.outputs.m2-monthly-branch-cache-key }}-
646677 ${{ needs.build-jdk17.outputs.m2-monthly-cache-key }}-
678+ runs-on : ${{ env.RUNS_ON_ENABLED }}
647679 - name : Download previously uploaded .m2 content
648680 uses : actions/download-artifact@v4
649681 with :
@@ -695,10 +727,12 @@ jobs:
695727
696728 devtools-tests :
697729 name : Devtools Tests - JDK ${{matrix.java.name}}
698- runs-on : ${{matrix.java.os-name}}
699- needs : [build-jdk17, calculate-test-jobs]
730+ runs-on : ${{ fromJson(needs.runs-on.outputs.config).runners[ matrix.java.os-name].runsOn || matrix.java.os-name }}
731+ needs : [runs-on, build-jdk17, calculate-test-jobs]
700732 # Skip main in forks
701733 if : " needs.calculate-test-jobs.outputs.run_devtools == 'true' && (github.repository == 'quarkusio/quarkus' || !endsWith(github.ref, '/main'))"
734+ env :
735+ RUNS_ON_ENABLED : ${{ fromJson(needs.runs-on.outputs.config).runners[matrix.java.os-name].runsOn && 'true' || 'false' }}
702736 timeout-minutes : 60
703737 strategy :
704738 fail-fast : false
@@ -729,13 +763,14 @@ jobs:
729763 run : git config --global core.longpaths true
730764 - uses : actions/checkout@v4
731765 - name : Restore Maven Repository
732- uses : actions /cache/restore@v4
766+ uses : quarkusio /cache-action /restore@v4
733767 with :
734768 path : ~/.m2/repository
735769 key : ${{ needs.build-jdk17.outputs.m2-cache-key }}
736770 restore-keys : |
737771 ${{ needs.build-jdk17.outputs.m2-monthly-branch-cache-key }}-
738772 ${{ needs.build-jdk17.outputs.m2-monthly-cache-key }}-
773+ runs-on : ${{ env.RUNS_ON_ENABLED }}
739774 - name : Download previously uploaded .m2 content
740775 uses : actions/download-artifact@v4
741776 with :
@@ -791,10 +826,12 @@ jobs:
791826
792827 kubernetes-tests :
793828 name : Kubernetes Tests - JDK ${{matrix.java.name}}
794- runs-on : ${{matrix.java.os-name}}
795- needs : [build-jdk17, calculate-test-jobs]
829+ runs-on : ${{ fromJson(needs.runs-on.outputs.config).runners[ matrix.java.os-name].runsOn || matrix.java.os-name }}
830+ needs : [runs-on, build-jdk17, calculate-test-jobs]
796831 # Skip main in forks
797832 if : " needs.calculate-test-jobs.outputs.run_kubernetes == 'true' && (github.repository == 'quarkusio/quarkus' || !endsWith(github.ref, '/main'))"
833+ env :
834+ RUNS_ON_ENABLED : ${{ fromJson(needs.runs-on.outputs.config).runners[matrix.java.os-name].runsOn && 'true' || 'false' }}
798835 timeout-minutes : 40
799836 strategy :
800837 fail-fast : false
@@ -825,13 +862,14 @@ jobs:
825862 run : git config --global core.longpaths true
826863 - uses : actions/checkout@v4
827864 - name : Restore Maven Repository
828- uses : actions /cache/restore@v4
865+ uses : quarkusio /cache-action /restore@v4
829866 with :
830867 path : ~/.m2/repository
831868 key : ${{ needs.build-jdk17.outputs.m2-cache-key }}
832869 restore-keys : |
833870 ${{ needs.build-jdk17.outputs.m2-monthly-branch-cache-key }}-
834871 ${{ needs.build-jdk17.outputs.m2-monthly-cache-key }}-
872+ runs-on : ${{ env.RUNS_ON_ENABLED }}
835873 - name : Download previously uploaded .m2 content
836874 uses : actions/download-artifact@v4
837875 with :
@@ -887,10 +925,12 @@ jobs:
887925
888926 quickstarts-tests :
889927 name : Quickstarts Compilation - JDK ${{matrix.java.name}}
890- runs-on : ${{matrix.java.os-name}}
891- needs : [build-jdk17, calculate-test-jobs]
928+ runs-on : ${{ fromJson(needs.runs-on.outputs.config).runners[ matrix.java.os-name].runsOn || matrix.java.os-name }}
929+ needs : [runs-on, build-jdk17, calculate-test-jobs]
892930 # Skip main in forks
893931 if : " needs.calculate-test-jobs.outputs.run_quickstarts == 'true' && (github.repository == 'quarkusio/quarkus' || !endsWith(github.ref, '/main'))"
932+ env :
933+ RUNS_ON_ENABLED : ${{ fromJson(needs.runs-on.outputs.config).runners[matrix.java.os-name].runsOn && 'true' || 'false' }}
894934 timeout-minutes : 90
895935 strategy :
896936 fail-fast : false
@@ -908,13 +948,14 @@ jobs:
908948 echo "GE_CUSTOM_VALUES=gh-job-name=Quickstarts Compilation - JDK ${{matrix.java.name}}" >> "$GITHUB_ENV"
909949 - uses : actions/checkout@v4
910950 - name : Restore Maven Repository
911- uses : actions /cache/restore@v4
951+ uses : quarkusio /cache-action /restore@v4
912952 with :
913953 path : ~/.m2/repository
914954 key : ${{ needs.build-jdk17.outputs.m2-cache-key }}
915955 restore-keys : |
916956 ${{ needs.build-jdk17.outputs.m2-monthly-branch-cache-key }}-
917957 ${{ needs.build-jdk17.outputs.m2-monthly-cache-key }}-
958+ runs-on : ${{ env.RUNS_ON_ENABLED }}
918959 - name : Download previously uploaded .m2 content
919960 uses : actions/download-artifact@v4
920961 with :
@@ -980,10 +1021,12 @@ jobs:
9801021
9811022 virtual-thread-native-tests :
9821023 name : Native Tests - Virtual Thread - ${{matrix.category}}
983- runs-on : ${{matrix.os-name}}
984- needs : [build-jdk17, calculate-test-jobs]
1024+ runs-on : ${{ fromJson(needs.runs-on.outputs.config).runners[ matrix.os-name].runsOn || matrix.os-name }}
1025+ needs : [runs-on, build-jdk17, calculate-test-jobs]
9851026 # Skip main in forks
9861027 if : " needs.calculate-test-jobs.outputs.virtual_threads_matrix != '{}' && (github.repository == 'quarkusio/quarkus' || !endsWith(github.ref, '/main'))"
1028+ env :
1029+ RUNS_ON_ENABLED : ${{ fromJson(needs.runs-on.outputs.config).runners[matrix.os-name].runsOn && 'true' || 'false' }}
9871030 timeout-minutes : ${{matrix.timeout}}
9881031 strategy :
9891032 max-parallel : 12
@@ -997,13 +1040,14 @@ jobs:
9971040 echo "GE_CUSTOM_VALUES=gh-job-name=Native Tests - Virtual Thread - ${{matrix.category}}" >> "$GITHUB_ENV"
9981041 - uses : actions/checkout@v4
9991042 - name : Restore Maven Repository
1000- uses : actions /cache/restore@v4
1043+ uses : quarkusio /cache-action /restore@v4
10011044 with :
10021045 path : ~/.m2/repository
10031046 key : ${{ needs.build-jdk17.outputs.m2-cache-key }}
10041047 restore-keys : |
10051048 ${{ needs.build-jdk17.outputs.m2-monthly-branch-cache-key }}-
10061049 ${{ needs.build-jdk17.outputs.m2-monthly-cache-key }}-
1050+ runs-on : ${{ env.RUNS_ON_ENABLED }}
10071051 - name : Download previously uploaded .m2 content
10081052 uses : actions/download-artifact@v4
10091053 with :
@@ -1057,10 +1101,12 @@ jobs:
10571101
10581102 tcks-test :
10591103 name : MicroProfile TCKs Tests
1060- needs : [build-jdk17, calculate-test-jobs]
1104+ needs : [runs-on, build-jdk17, calculate-test-jobs]
10611105 # Skip main in forks
10621106 if : " needs.calculate-test-jobs.outputs.run_tcks == 'true' && (github.repository == 'quarkusio/quarkus' || !endsWith(github.ref, '/main'))"
1063- runs-on : ubuntu-latest
1107+ runs-on : ${{ fromJson(needs.runs-on.outputs.config).runners['ubuntu-latest'].runsOn || 'ubuntu-latest' }}
1108+ env :
1109+ RUNS_ON_ENABLED : ${{ fromJson(needs.runs-on.outputs.config).runners['ubuntu-latest'].runsOn && 'true' || 'false' }}
10641110 timeout-minutes : 150
10651111 steps :
10661112 - name : Gradle Enterprise environment
@@ -1081,13 +1127,14 @@ jobs:
10811127 distribution : temurin
10821128 java-version : 17
10831129 - name : Restore Maven Repository
1084- uses : actions /cache/restore@v4
1130+ uses : quarkusio /cache-action /restore@v4
10851131 with :
10861132 path : ~/.m2/repository
10871133 key : ${{ needs.build-jdk17.outputs.m2-cache-key }}
10881134 restore-keys : |
10891135 ${{ needs.build-jdk17.outputs.m2-monthly-branch-cache-key }}-
10901136 ${{ needs.build-jdk17.outputs.m2-monthly-cache-key }}-
1137+ runs-on : ${{ env.RUNS_ON_ENABLED }}
10911138 - name : Download previously uploaded .m2 content
10921139 uses : actions/download-artifact@v4
10931140 with :
@@ -1142,11 +1189,12 @@ jobs:
11421189
11431190 native-tests :
11441191 name : Native Tests - ${{matrix.category}}
1145- needs : [build-jdk17, calculate-test-jobs]
1146- runs-on : ${{matrix.os-name}}
1192+ needs : [runs-on, build-jdk17, calculate-test-jobs]
1193+ runs-on : ${{ fromJson(needs.runs-on.outputs.config).runners[ matrix.os-name].runsOn || matrix.os-name }}
11471194 env :
11481195 # leave more space for the actual native compilation and execution
11491196 MAVEN_OPTS : -Xmx1g
1197+ RUNS_ON_ENABLED : ${{ fromJson(needs.runs-on.outputs.config).runners[matrix.os-name].runsOn && 'true' || 'false' }}
11501198 # Skip main in forks
11511199 if : " needs.calculate-test-jobs.outputs.native_matrix != '{}' && (github.repository == 'quarkusio/quarkus' || !endsWith(github.ref, '/main'))"
11521200 # Ignore the following YAML Schema error
@@ -1194,13 +1242,14 @@ jobs:
11941242 cat <<< $(jq '.HttpHeaders += {"User-Agent": "Quarkus-CI-Docker-Client"}' ~/.docker/config.json) > ~/.docker/config.json
11951243 fi
11961244 - name : Restore Maven Repository
1197- uses : actions /cache/restore@v4
1245+ uses : quarkusio /cache-action /restore@v4
11981246 with :
11991247 path : ~/.m2/repository
12001248 key : ${{ needs.build-jdk17.outputs.m2-cache-key }}
12011249 restore-keys : |
12021250 ${{ needs.build-jdk17.outputs.m2-monthly-branch-cache-key }}-
12031251 ${{ needs.build-jdk17.outputs.m2-monthly-cache-key }}-
1252+ runs-on : ${{ env.RUNS_ON_ENABLED }}
12041253 - name : Download previously uploaded .m2 content
12051254 uses : actions/download-artifact@v4
12061255 with :
0 commit comments