@@ -30,7 +30,7 @@ defaults:
3030
3131jobs :
3232 runners :
33- name : ' determine runners'
33+ name : ' [meta] determine runners'
3434 runs-on : ubuntu-latest
3535 outputs :
3636 provider : ${{ steps.runners.outputs.provider }}
6666 - name : Determine fetch depth
6767 run : echo "FETCH_DEPTH=$((${{ github.event.pull_request.commits }} + 2))" >> "$GITHUB_ENV"
6868 - *ANNOTATION_PR_NUMBER
69- - uses : actions/checkout@v5
69+ - uses : actions/checkout@v6
7070 with :
7171 ref : ${{ github.event.pull_request.head.sha }}
7272 fetch-depth : ${{ env.FETCH_DEPTH }}
@@ -148,7 +148,7 @@ jobs:
148148
149149 - &CHECKOUT
150150 name : Checkout
151- uses : actions/checkout@v5
151+ uses : actions/checkout@v6
152152 with :
153153 # Ensure the latest merged pull request state is used, even on re-runs.
154154 ref : &CHECKOUT_REF_TMPL ${{ github.event_name == 'pull_request' && github.ref || '' }}
@@ -343,9 +343,23 @@ jobs:
343343 run : |
344344 py -3 test/fuzz/test_runner.py --par $NUMBER_OF_PROCESSORS --loglevel DEBUG "${RUNNER_TEMP}/qa-assets/fuzz_corpora"
345345
346+ record-frozen-commit :
347+ # Record frozen commit, so that the native tests on cross-builds can run on
348+ # the exact same commit id of the build.
349+ name : ' [meta] record frozen commit'
350+ runs-on : ubuntu-latest
351+ outputs :
352+ commit : ${{ steps.record-commit.outputs.commit }}
353+ steps :
354+ - *ANNOTATION_PR_NUMBER
355+ - *CHECKOUT
356+ - name : Record commit
357+ id : record-commit
358+ run : echo "commit=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
359+
346360 windows-cross :
347361 name : ' Windows-cross to x86_64, ${{ matrix.crt }}'
348- needs : runners
362+ needs : [ runners, record-frozen-commit]
349363 runs-on : ${{ needs.runners.outputs.provider == 'cirrus' && 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-sm' || 'ubuntu-24.04' }}
350364 if : ${{ vars.SKIP_BRANCH_PUSH != 'true' || github.event_name == 'pull_request' }}
351365
@@ -368,7 +382,10 @@ jobs:
368382 steps :
369383 - *ANNOTATION_PR_NUMBER
370384
371- - *CHECKOUT
385+ - name : Checkout
386+ uses : actions/checkout@v6
387+ with :
388+ ref : ${{ needs.record-frozen-commit.outputs.commit }}
372389
373390 - name : Configure environment
374391 uses : ./.github/actions/configure-environment
@@ -402,7 +419,7 @@ jobs:
402419 windows-native-test :
403420 name : ' Windows, ${{ matrix.crt }}, test cross-built'
404421 runs-on : windows-2022
405- needs : windows-cross
422+ needs : [ windows-cross, record-frozen-commit]
406423
407424 strategy :
408425 fail-fast : false
@@ -421,7 +438,10 @@ jobs:
421438 steps :
422439 - *ANNOTATION_PR_NUMBER
423440
424- - *CHECKOUT
441+ - name : Checkout
442+ uses : actions/checkout@v6
443+ with :
444+ ref : ${{ needs.record-frozen-commit.outputs.commit }}
425445
426446 - name : Download built executables
427447 uses : actions/download-artifact@v5
@@ -502,6 +522,12 @@ jobs:
502522 fail-fast : false
503523 matrix :
504524 include :
525+ - name : ' iwyu'
526+ cirrus-runner : ' ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-md'
527+ fallback-runner : ' ubuntu-24.04'
528+ timeout-minutes : 120
529+ file-env : ' ./ci/test/00_setup_env_native_iwyu.sh'
530+
505531 - name : ' 32 bit ARM'
506532 cirrus-runner : ' ubuntu-24.04-arm' # Cirrus' Arm runners are Apple (with virtual Linux aarch64), which doesn't support 32-bit mode
507533 fallback-runner : ' ubuntu-24.04-arm'
@@ -637,7 +663,7 @@ jobs:
637663 - *ANNOTATION_PR_NUMBER
638664
639665 - name : Checkout
640- uses : actions/checkout@v5
666+ uses : actions/checkout@v6
641667 with :
642668 ref : *CHECKOUT_REF_TMPL
643669 fetch-depth : 0
0 commit comments