@@ -112,16 +112,16 @@ jobs:
112112
113113 golangci :
114114 name : GolangCI Lint
115- needs : [filter, run-frequency, runner-config ]
115+ needs : [filter, run-frequency ]
116116 # We don't directly merge dependabot PRs to not waste the resources.
117- if : ${{ (github.event_name == 'pull_request' || github.event_name == 'schedule') && github.actor != 'dependabot[bot]' }}
117+ if : ${{ needs.filter.outputs.affected-modules != '[]' && github.event_name != 'merge_group' && github.actor != 'dependabot[bot]' }}
118118 permissions :
119119 # To annotate code in the PR.
120120 checks : write
121121 contents : read
122122 # For golangci-lint-action's `only-new-issues` option.
123123 pull-requests : read
124- runs-on : ${{ needs.runner-config.outputs.lint-runner }}
124+ runs-on : runs-on= ${{ github.run_id }}-${{ strategy.job-index }}/cpu=16/ram=32/family=c6gd/spot=false/image=ubuntu24-full-arm64/extras=s3-cache
125125 strategy :
126126 fail-fast : false
127127 matrix :
@@ -206,27 +206,27 @@ jobs:
206206 matrix :
207207 type :
208208 - cmd : go_core_tests
209- os : ${{ needs.runner-config.outputs.core-tests-runner }}
209+ os : runs-on= ${{ github.run_id }}-unit/cpu=48/ram=96/family=c6i/spot=false/image=ubuntu24-full-x64/extras=s3-cache+tmpfs
210210 should-run : ${{ needs.filter.outputs.should-run-core-tests }}
211211 trunk-auto-quarantine : " true"
212212
213213 - cmd : go_core_tests_integration
214- os : ${{ needs.runner-config.outputs.core-tests-integration-runner }}
214+ os : runs-on= ${{ github.run_id }}-integ/cpu=48/ram=96/family=c6i/spot=false/image=ubuntu24-full-x64/extras=s3-cache+tmpfs
215215 should-run : ${{ needs.filter.outputs.should-run-core-tests }}
216216 trunk-auto-quarantine : " true"
217217 setup-solana : " true"
218218 install-loopps : " true"
219219
220220 - cmd : go_core_fuzz
221- os : ${{ needs.runner-config.outputs.core- fuzz-tests-runner }}
221+ os : runs-on= ${{ github.run_id}}- fuzz/cpu=8/ram=32/family=m6id+m6idn/spot=false/image=ubuntu24-full-x64/extras=s3-cache
222222 should-run : ${{ needs.filter.outputs.should-run-core-tests }}
223223
224224 - cmd : go_core_race_tests
225- os : ${{ needs.runner-config.outputs.core- race-tests-runner }}
225+ os : runs-on= ${{ github.run_id}}- race/cpu=64/ram=128/family=c7i/volume=80gb/spot=false/image=ubuntu24-full-x64/extras=s3-cache
226226 should-run : ${{ needs.filter.outputs.should-run-core-tests }}
227227
228228 - cmd : go_core_ccip_deployment_tests
229- os : ${{ needs.runner-config.outputs. deployment-tests-runner }}
229+ os : runs-on= ${{ github.run_id }}- deployment/cpu=64/ram=128/family=c6i+c7i/spot=false/image=ubuntu24-full-x64/extras=s3-cache+tmpfs
230230 should-run : ${{ needs.filter.outputs.should-run-deployment-tests }}
231231 trunk-auto-quarantine : " true"
232232 go-mod-directory : " deployment/"
@@ -238,9 +238,10 @@ jobs:
238238 name : Core Tests (${{ matrix.type.cmd }}) # Be careful modifying the job name, as it is used to fetch the job URL
239239 # We don't directly merge dependabot PRs, so let's not waste the resources
240240 if : ${{ github.actor != 'dependabot[bot]' }}
241- needs : [filter, run-frequency, runner-config ]
241+ needs : [filter, run-frequency ]
242242 timeout-minutes : 60
243- runs-on : ${{ matrix.type.os }}
243+ # Use ubuntu-latest for jobs that will be skipped
244+ runs-on : ${{ matrix.type.should-run == 'true' && matrix.type.os || 'ubuntu-latest' }}
244245 permissions :
245246 id-token : write
246247 contents : read
@@ -598,116 +599,6 @@ jobs:
598599 echo "one-per-day-frequency=true" | tee -a $GITHUB_OUTPUT
599600 fi
600601
601- # This chooses which runner labels we pass for the matrix jobs above.
602- # General Criteria:
603- # 1. If we are going to 'skip' a test suite, we use the base Github-hosted runner.
604- # - This is based off `should-run-core-tests`, and `should-run-deployment-tests`
605- # 2. If we are not skipping, we check if the PR has the "runs-on-opt-out" label.
606- # - If the PR has the label, we use the larger Github-hosted runners.
607- # - If the PR does not have the label, we use the self-hosted runners.
608- runner-config :
609- name : Runner Config
610- needs : [filter]
611- runs-on : ubuntu-latest
612- env :
613- # include unique label (core/deployment/etc...) to ensure jobs are not competing for the same runner
614- SH_TEST_RUNNER : runs-on=${{ github.run_id }}-core/cpu=48/ram=96/family=c6i/spot=false/image=ubuntu24-full-x64/extras=s3-cache+tmpfs
615- SH_DEPLOYMENT_TEST_RUNNER : runs-on=${{ github.run_id }}-deployment/cpu=48/ram=96/family=c6id/spot=false/image=ubuntu24-full-x64/extras=s3-cache
616- SH_FUZZ_RUNNER : runs-on=${{ github.run_id}}-fuzz/cpu=8+16/ram=32+64/family=c6id+m6id+m6idn/spot=false/image=ubuntu24-full-x64/extras=s3-cache
617- SH_RACE_TEST_RUNNER : runs-on=${{ github.run_id}}-race/cpu=64+128/ram=128+128/family=c7+m7/volume=80gb/spot=false/image=ubuntu24-full-x64/extras=s3-cache
618- SH_LINT_RUNNER : runs-on=${{ github.run_id }}-lint/cpu=16/ram=32/family=c6gd/spot=false/image=ubuntu24-full-arm64/extras=s3-cache
619- GH_TEST_RUNNER : ubuntu22.04-32cores-128GB
620- GH_FUZZ_RUNNER : ubuntu22.04-8cores-32GB
621- GH_BASE_RUNNER : ubuntu-latest
622- GH_LINT_RUNNER : ubuntu-24.04-8cores-32GB-ARM
623- outputs :
624- # go_core_tests / go_core_race_tests / go_core_tests_integration
625- core-tests-runner : ${{ steps.core-tests.outputs.core-tests-runner }}
626- core-tests-integration-runner : ${{ steps.core-tests.outputs.core-tests-integration-runner }}
627- core-fuzz-tests-runner : ${{ steps.core-tests.outputs.core-fuzz-tests-runner }}
628- core-race-tests-runner : ${{ steps.core-tests.outputs.core-race-tests-runner }}
629- # go_core_ccip_deployment_tests
630- deployment-tests-runner : ${{ steps.deployment-tests.outputs.deployment-tests-runner }}
631- # linting
632- lint-runner : ${{ steps.linting.outputs.lint-runner }}
633- steps :
634- - name : Get PR Labels
635- id : pr-labels
636- uses : smartcontractkit/.github/actions/get-pr-labels@get-pr-labels/v1
637- with :
638- check-label : " runs-on-opt-out"
639-
640- - name : Select runners for deployment tests
641- id : deployment-tests
642- shell : bash
643- env :
644- OPT_OUT : ${{ steps.pr-labels.outputs.check-label-found || 'false' }}
645- SHOULD_RUN_DEPLOYMENT_TESTS : ${{ needs.filter.outputs.should-run-deployment-tests }}
646- run : |
647- if [[ "${SHOULD_RUN_DEPLOYMENT_TESTS}" == "false" ]]; then
648- echo "Deployment tests will be skipped, using base Github-hosted runner."
649- echo "deployment-tests-runner=${GH_BASE_RUNNER}" | tee -a $GITHUB_OUTPUT
650- exit 0
651- fi
652-
653- if [[ "$OPT_OUT" == "true" ]]; then
654- echo "Opt-out is true for current run. Using gh-hosted runner for deployment tests."
655- echo "deployment-tests-runner=${GH_TEST_RUNNER}" | tee -a $GITHUB_OUTPUT
656- exit 0
657- fi
658-
659- echo "Opt-out is false for current run. Using self-hosted runner for deployment tests."
660- echo "deployment-tests-runner=${SH_DEPLOYMENT_TEST_RUNNER}" | tee -a $GITHUB_OUTPUT
661-
662- - name : Select runners for core tests
663- id : core-tests
664- shell : bash
665- env :
666- OPT_OUT : ${{ steps.pr-labels.outputs.check-label-found || 'false' }}
667- SHOULD_RUN_CORE_TESTS : ${{ needs.filter.outputs.should-run-core-tests }}
668- run : |
669- if [[ "${SHOULD_RUN_CORE_TESTS}" == "false" ]]; then
670- echo "Core tests will be skipped, using base Github-hosted runner."
671-
672- echo "core-tests-runner=${GH_BASE_RUNNER}" | tee -a $GITHUB_OUTPUT
673- echo "core-tests-integration-runner=${GH_BASE_RUNNER}" | tee -a $GITHUB_OUTPUT
674- echo "core-fuzz-tests-runner=${GH_BASE_RUNNER}" | tee -a $GITHUB_OUTPUT
675- echo "core-race-tests-runner=${GH_BASE_RUNNER}" | tee -a $GITHUB_OUTPUT
676- exit 0
677- fi
678-
679- if [[ "$OPT_OUT" == "true" ]]; then
680- echo "Opt-out is true for current run. Using gh-hosted runner for core tests."
681-
682- echo "core-tests-runner=${GH_TEST_RUNNER}" | tee -a $GITHUB_OUTPUT
683- echo "core-tests-integration-runner=${GH_TEST_RUNNER}" | tee -a $GITHUB_OUTPUT
684- echo "core-fuzz-tests-runner=${GH_FUZZ_RUNNER}" | tee -a $GITHUB_OUTPUT
685- echo "core-race-tests-runner=${GH_TEST_RUNNER}" | tee -a $GITHUB_OUTPUT
686- exit 0
687- fi
688-
689- echo "Opt-out is false for current run. Using self-hosted runner for core tests."
690-
691- echo "core-tests-runner=${SH_TEST_RUNNER}" | tee -a $GITHUB_OUTPUT
692- echo "core-tests-integration-runner=${SH_TEST_RUNNER}" | tee -a $GITHUB_OUTPUT
693- echo "core-fuzz-tests-runner=${SH_FUZZ_RUNNER}" | tee -a $GITHUB_OUTPUT
694- echo "core-race-tests-runner=${SH_RACE_TEST_RUNNER}" | tee -a $GITHUB_OUTPUT
695-
696- - name : Select runners for linting
697- id : linting
698- shell : bash
699- env :
700- OPT_OUT : ${{ steps.pr-labels.outputs.check-label-found || 'false' }}
701- run : |
702- if [[ "$OPT_OUT" == "true" ]]; then
703- echo "Opt-out is true for current run. Using gh-hosted runner for linting."
704- echo "lint-runner=${GH_LINT_RUNNER}" | tee -a $GITHUB_OUTPUT
705- exit 0
706- fi
707-
708- echo "Opt-out is false for current run. Using self-hosted runner for linting."
709- echo "lint-runner=${SH_LINT_RUNNER}" | tee -a $GITHUB_OUTPUT
710-
711602 misc :
712603 # Catchall job for miscellaneous steps.
713604 name : Misc
0 commit comments