|
39 | 39 | outputs:
|
40 | 40 | run_tests: ${{ steps.check.outputs.run_tests }}
|
41 | 41 | run_hypothesis: ${{ steps.check.outputs.run_hypothesis }}
|
| 42 | + config_hash: ${{ steps.config_hash.outputs.hash }} |
42 | 43 | steps:
|
43 | 44 | - uses: actions/checkout@v3
|
44 | 45 | - name: Check for source changes
|
|
74 | 75 | echo "Run hypothesis tests"
|
75 | 76 | echo "run_hypothesis=true" >> $GITHUB_OUTPUT
|
76 | 77 | fi
|
| 78 | + - name: Compute hash for config cache key |
| 79 | + id: config_hash |
| 80 | + run: | |
| 81 | + echo "hash=${{ hashFiles('configure', 'configure.ac', '.github/workflows/build.yml') }}" >> $GITHUB_OUTPUT |
77 | 82 |
|
78 | 83 | check_abi:
|
79 | 84 | name: 'Check if the ABI has changed'
|
@@ -117,7 +122,7 @@ jobs:
|
117 | 122 | uses: actions/cache@v3
|
118 | 123 | with:
|
119 | 124 | path: config.cache
|
120 |
| - key: ${{ github.job }}-${{ runner.os }}-${{ hashFiles('configure', 'configure.ac', '.github/workflows/build.yml') }} |
| 125 | + key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }} |
121 | 126 | - uses: actions/setup-python@v3
|
122 | 127 | - name: Install Dependencies
|
123 | 128 | run: sudo ./.github/workflows/posix-deps-apt.sh
|
@@ -219,7 +224,7 @@ jobs:
|
219 | 224 | uses: actions/cache@v3
|
220 | 225 | with:
|
221 | 226 | path: config.cache
|
222 |
| - key: ${{ github.job }}-${{ runner.os }}-${{ hashFiles('configure', 'configure.ac', '.github/workflows/build.yml') }} |
| 227 | + key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }} |
223 | 228 | - name: Install Homebrew dependencies
|
224 | 229 | run: brew install pkg-config [email protected] xz gdbm tcl-tk
|
225 | 230 | - name: Configure CPython
|
@@ -285,7 +290,7 @@ jobs:
|
285 | 290 | uses: actions/cache@v3
|
286 | 291 | with:
|
287 | 292 | path: ${{ env.CPYTHON_BUILDDIR }}/config.cache
|
288 |
| - key: ${{ github.job }}-${{ runner.os }}-${{ hashFiles('configure', 'configure.ac', '.github/workflows/build.yml') }} |
| 293 | + key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }} |
289 | 294 | - name: Configure CPython out-of-tree
|
290 | 295 | working-directory: ${{ env.CPYTHON_BUILDDIR }}
|
291 | 296 | run: |
|
@@ -327,7 +332,7 @@ jobs:
|
327 | 332 | uses: actions/cache@v3
|
328 | 333 | with:
|
329 | 334 | path: config.cache
|
330 |
| - key: ${{ github.job }}-${{ runner.os }}-${{ hashFiles('configure', 'configure.ac', '.github/workflows/build.yml') }} |
| 335 | + key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }} |
331 | 336 | - name: Register gcc problem matcher
|
332 | 337 | run: echo "::add-matcher::.github/problem-matchers/gcc.json"
|
333 | 338 | - name: Install Dependencies
|
@@ -406,7 +411,7 @@ jobs:
|
406 | 411 | uses: actions/cache@v3
|
407 | 412 | with:
|
408 | 413 | path: ${{ env.CPYTHON_BUILDDIR }}/config.cache
|
409 |
| - key: ${{ github.job }}-${{ runner.os }}-${{ hashFiles('configure', 'configure.ac', '.github/workflows/build.yml') }} |
| 414 | + key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }} |
410 | 415 | - name: Configure CPython out-of-tree
|
411 | 416 | working-directory: ${{ env.CPYTHON_BUILDDIR }}
|
412 | 417 | run: |
|
@@ -485,7 +490,7 @@ jobs:
|
485 | 490 | uses: actions/cache@v3
|
486 | 491 | with:
|
487 | 492 | path: config.cache
|
488 |
| - key: ${{ github.job }}-${{ runner.os }}-${{ hashFiles('configure', 'configure.ac', '.github/workflows/build.yml') }} |
| 493 | + key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }} |
489 | 494 | - name: Register gcc problem matcher
|
490 | 495 | run: echo "::add-matcher::.github/problem-matchers/gcc.json"
|
491 | 496 | - name: Install Dependencies
|
|
0 commit comments