|
37 | 37 | outputs: |
38 | 38 | run_tests: ${{ steps.check.outputs.run_tests }} |
39 | 39 | run_ssl_tests: ${{ steps.check.outputs.run_ssl_tests }} |
| 40 | + config_hash: ${{ steps.config_hash.outputs.hash }} |
40 | 41 | steps: |
41 | 42 | - uses: actions/checkout@v3 |
42 | 43 | - name: Check for source changes |
|
63 | 64 | git diff --name-only origin/$GITHUB_BASE_REF.. | grep -qvE '(\.rst$|^Doc|^Misc)' && echo "run_tests=true" >> $GITHUB_OUTPUT || true |
64 | 65 | git diff --name-only origin/$GITHUB_BASE_REF.. | grep -qE '(ssl|hashlib|hmac|^.github)' && echo "run_ssl_tests=true" >> $GITHUB_OUTPUT || true |
65 | 66 | fi |
| 67 | + - name: Compute hash for config cache key |
| 68 | + id: config_hash |
| 69 | + run: | |
| 70 | + echo "hash=${{ hashFiles('configure', 'configure.ac', '.github/workflows/build.yml') }}" >> $GITHUB_OUTPUT |
66 | 71 |
|
67 | 72 | check_abi: |
68 | 73 | name: 'Check if the ABI has changed' |
@@ -106,7 +111,7 @@ jobs: |
106 | 111 | uses: actions/cache@v3 |
107 | 112 | with: |
108 | 113 | path: config.cache |
109 | | - key: ${{ github.job }}-${{ runner.os }}-${{ hashFiles('configure', 'configure.ac', '.github/workflows/build.yml') }} |
| 114 | + key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }} |
110 | 115 | - uses: actions/setup-python@v3 |
111 | 116 | - name: Install Dependencies |
112 | 117 | run: sudo ./.github/workflows/posix-deps-apt.sh |
@@ -205,7 +210,7 @@ jobs: |
205 | 210 | uses: actions/cache@v3 |
206 | 211 | with: |
207 | 212 | path: config.cache |
208 | | - key: ${{ github.job }}-${{ runner.os }}-${{ hashFiles('configure', 'configure.ac', '.github/workflows/build.yml') }} |
| 213 | + key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }} |
209 | 214 | - name: Install Homebrew dependencies |
210 | 215 | run: brew install pkg-config [email protected] xz gdbm tcl-tk |
211 | 216 | - name: Configure CPython |
@@ -271,7 +276,7 @@ jobs: |
271 | 276 | uses: actions/cache@v3 |
272 | 277 | with: |
273 | 278 | path: ${{ env.CPYTHON_BUILDDIR }}/config.cache |
274 | | - key: ${{ github.job }}-${{ runner.os }}-${{ hashFiles('configure', 'configure.ac', '.github/workflows/build.yml') }} |
| 279 | + key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }} |
275 | 280 | - name: Configure CPython out-of-tree |
276 | 281 | working-directory: ${{ env.CPYTHON_BUILDDIR }} |
277 | 282 | run: | |
@@ -313,7 +318,7 @@ jobs: |
313 | 318 | uses: actions/cache@v3 |
314 | 319 | with: |
315 | 320 | path: config.cache |
316 | | - key: ${{ github.job }}-${{ runner.os }}-${{ hashFiles('configure', 'configure.ac', '.github/workflows/build.yml') }} |
| 321 | + key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }} |
317 | 322 | - name: Register gcc problem matcher |
318 | 323 | run: echo "::add-matcher::.github/problem-matchers/gcc.json" |
319 | 324 | - name: Install Dependencies |
@@ -362,7 +367,7 @@ jobs: |
362 | 367 | uses: actions/cache@v3 |
363 | 368 | with: |
364 | 369 | path: config.cache |
365 | | - key: ${{ github.job }}-${{ runner.os }}-${{ hashFiles('configure', 'configure.ac', '.github/workflows/build.yml') }} |
| 370 | + key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }} |
366 | 371 | - name: Register gcc problem matcher |
367 | 372 | run: echo "::add-matcher::.github/problem-matchers/gcc.json" |
368 | 373 | - name: Install Dependencies |
|
0 commit comments