@@ -23,30 +23,22 @@ jobs:
2323 macos_dev_target : 14.0
2424 arch : arm64
2525 python-arch : arm64
26- enable_pch : ON
2726 run_regressions : true
2827 pretty : " Mac arm64"
2928 - os : ubuntu-24.04
3029 arch : x86_64
3130 python-arch : x64
32- enable_pch : ON
3331 run_regressions : true
3432 pretty : " Ubuntu 24.04"
3533 - os : windows-2022
3634 arch : x86_64
3735 python-arch : x64
38- enable_pch : OFF
3936 run_regressions : false
4037 pretty : " Windows x64"
4138
4239 steps :
4340
44- - name : Checkout PR head
45- uses : actions/checkout@v6
46- with :
47- repository : ${{ github.event.pull_request.head.repo.full_name }}
48- ref : ${{ github.event.pull_request.head.sha }}
49- fetch-depth : 0
41+ - uses : actions/checkout@v6
5042
5143 - name : Setup System
5244 id : setup-runner
@@ -58,26 +50,21 @@ jobs:
5850 - name : Get Develop and Branch Git SHA
5951 shell : bash
6052 run : |
61- echo "Figuring out the develop GIT SHA already merged into the PR branch"
62- BASE_BRANCH="${{ github.base_ref }}"
63- if git remote get-url upstream >/dev/null 2>&1; then
64- git remote set-url upstream "https://github.com/$GITHUB_REPOSITORY.git"
65- else
66- git remote add upstream "https://github.com/$GITHUB_REPOSITORY.git"
67- fi
68- git fetch --no-tags upstream "refs/heads/${BASE_BRANCH}:refs/remotes/upstream/${BASE_BRANCH}"
69- DEVELOP_SHA=$(git merge-base HEAD "upstream/${BASE_BRANCH}")
70- echo "Develop GIT SHA merged into this branch is '${DEVELOP_SHA}'"
53+ echo "Figuring out the develop GIT SHA"
54+ # github.event.pull_request.base.sha points to develop at the time the PR was created, not the current one
55+ DEVELOP_SHA=$(git ls-remote https://github.com/$GITHUB_REPOSITORY.git develop | cut -f1 | cut -c1-10)
56+ echo "Develop GIT SHA is '${DEVELOP_SHA}'"
7157 echo "DEVELOP_SHA=$DEVELOP_SHA" >> $GITHUB_ENV
7258
7359 CURRENT_HEAD_SHA=${{ github.event.pull_request.head.sha }}
7460 echo "Current Branch HEAD SHA is '${CURRENT_HEAD_SHA}'"
75- echo "CURRENT_HEAD_SHA=$CURRENT_HEAD_SHA " >> $GITHUB_ENV
61+ echo "CURRENT_HEAD_SHA=$DEVELOP_SHA " >> $GITHUB_ENV
7662
77- echo "GitHub synthetic merge commit SHA is '${GITHUB_SHA}'"
63+ echo "Current merge commit SHA is '${GITHUB_SHA}'"
7864 echo "::endgroup::"
79- # Default PCH behavior is per-platform, then regression-cache hits may override it.
80- echo "ENABLE_PCH=${{ matrix.enable_pch }}" >> $GITHUB_ENV
65+ # We default to using PCH, in case we don't find the baseline reg tests,
66+ # since it speeds up the build significantly and we'll build TWICE
67+ echo "ENABLE_PCH=ON" >> $GITHUB_ENV
8168
8269 - name : Baseline Regression Testing caching
8370 uses : actions/cache@v5
10592 restore-keys : |
10693 ccache-${{ matrix.os }}-${{ steps.setup-runner.outputs.compiler-id }}-${{ github.head_ref }}
10794 ccache-${{ matrix.os }}-${{ steps.setup-runner.outputs.compiler-id }}-${{ env.DEVELOP_SHA }}
95+ ccache-${{ matrix.os }}-${{ steps.setup-runner.outputs.compiler-id }}-
96+ ccache-${{ matrix.os }}-
10897
10998 - name : Did restoring the CCache-cache work?
11099 shell : bash
@@ -151,8 +140,7 @@ jobs:
151140 if : matrix.run_regressions && steps.cachebaselineregression.outputs.cache-hit != 'true'
152141 uses : actions/checkout@v6
153142 with :
154- repository : ${{ github.repository }}
155- ref : ${{ env.DEVELOP_SHA }}
143+ ref : develop
156144 clean : false # Do NOT wipe the build/ and .ccache folder (`git clean -ffdx && git reset --hard HEAD`)
157145
158146 - name : Baseline Configure and Build
@@ -196,8 +184,6 @@ jobs:
196184 if : matrix.run_regressions && steps.cachebaselineregression.outputs.cache-hit != 'true'
197185 uses : actions/checkout@v6
198186 with :
199- repository : ${{ github.event.pull_request.head.repo.full_name }}
200- ref : ${{ env.CURRENT_HEAD_SHA }}
201187 clean : false # Do NOT wipe the build/ and .ccache folder (`git clean -ffdx && git reset --hard HEAD`)
202188
203189 - name : Install problem matcher
0 commit comments