|
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_generated_files:
|
79 | 84 | name: 'Check if generated files are up to date'
|
|
87 | 92 | uses: actions/cache@v3
|
88 | 93 | with:
|
89 | 94 | path: config.cache
|
90 |
| - key: ${{ github.job }}-${{ runner.os }}-${{ hashFiles('configure', 'configure.ac', '.github/workflows/build.yml') }} |
| 95 | + key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }} |
91 | 96 | - uses: actions/setup-python@v3
|
92 | 97 | - name: Install Dependencies
|
93 | 98 | run: sudo ./.github/workflows/posix-deps-apt.sh
|
@@ -189,7 +194,7 @@ jobs:
|
189 | 194 | uses: actions/cache@v3
|
190 | 195 | with:
|
191 | 196 | path: config.cache
|
192 |
| - key: ${{ github.job }}-${{ runner.os }}-${{ hashFiles('configure', 'configure.ac', '.github/workflows/build.yml') }} |
| 197 | + key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }} |
193 | 198 | - name: Install Homebrew dependencies
|
194 | 199 | run: brew install pkg-config [email protected] xz gdbm tcl-tk
|
195 | 200 | - name: Configure CPython
|
@@ -255,7 +260,7 @@ jobs:
|
255 | 260 | uses: actions/cache@v3
|
256 | 261 | with:
|
257 | 262 | path: ${{ env.CPYTHON_BUILDDIR }}/config.cache
|
258 |
| - key: ${{ github.job }}-${{ runner.os }}-${{ hashFiles('configure', 'configure.ac', '.github/workflows/build.yml') }} |
| 263 | + key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }} |
259 | 264 | - name: Configure CPython out-of-tree
|
260 | 265 | working-directory: ${{ env.CPYTHON_BUILDDIR }}
|
261 | 266 | run: |
|
@@ -297,7 +302,7 @@ jobs:
|
297 | 302 | uses: actions/cache@v3
|
298 | 303 | with:
|
299 | 304 | path: config.cache
|
300 |
| - key: ${{ github.job }}-${{ runner.os }}-${{ hashFiles('configure', 'configure.ac', '.github/workflows/build.yml') }} |
| 305 | + key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }} |
301 | 306 | - name: Register gcc problem matcher
|
302 | 307 | run: echo "::add-matcher::.github/problem-matchers/gcc.json"
|
303 | 308 | - name: Install Dependencies
|
@@ -376,7 +381,7 @@ jobs:
|
376 | 381 | uses: actions/cache@v3
|
377 | 382 | with:
|
378 | 383 | path: ${{ env.CPYTHON_BUILDDIR }}/config.cache
|
379 |
| - key: ${{ github.job }}-${{ runner.os }}-${{ hashFiles('configure', 'configure.ac', '.github/workflows/build.yml') }} |
| 384 | + key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }} |
380 | 385 | - name: Configure CPython out-of-tree
|
381 | 386 | working-directory: ${{ env.CPYTHON_BUILDDIR }}
|
382 | 387 | run: |
|
@@ -455,7 +460,7 @@ jobs:
|
455 | 460 | uses: actions/cache@v3
|
456 | 461 | with:
|
457 | 462 | path: config.cache
|
458 |
| - key: ${{ github.job }}-${{ runner.os }}-${{ hashFiles('configure', 'configure.ac', '.github/workflows/build.yml') }} |
| 463 | + key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }} |
459 | 464 | - name: Register gcc problem matcher
|
460 | 465 | run: echo "::add-matcher::.github/problem-matchers/gcc.json"
|
461 | 466 | - name: Install Dependencies
|
|
0 commit comments