Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cb945c2

Browse files
committed
gh-115383: Use runner version to compute config.cache key
Our GitHub actions build caches the results of "configure" on macOS and Linux. Periodically, GitHub releases new images for their actions runners. This incorporates the runner's OS and image version to compute the config.cache restore key to avoid using a stale configure cache.
1 parent 5719aa2 commit cb945c2

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ jobs:
262262
uses: actions/cache@v4
263263
with:
264264
path: config.cache
265-
key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }}
265+
key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }}-${{ env.ImageVersion }}
266266
- name: Register gcc problem matcher
267267
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
268268
- name: Install Dependencies
@@ -345,7 +345,7 @@ jobs:
345345
uses: actions/cache@v4
346346
with:
347347
path: ${{ env.CPYTHON_BUILDDIR }}/config.cache
348-
key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }}
348+
key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }}-${{ env.ImageVersion }}
349349
- name: Configure CPython out-of-tree
350350
working-directory: ${{ env.CPYTHON_BUILDDIR }}
351351
run: |
@@ -424,7 +424,7 @@ jobs:
424424
uses: actions/cache@v4
425425
with:
426426
path: config.cache
427-
key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }}
427+
key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }}-${{ env.ImageVersion }}
428428
- name: Register gcc problem matcher
429429
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
430430
- name: Install Dependencies

.github/workflows/reusable-macos.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
uses: actions/cache@v4
3333
with:
3434
path: config.cache
35-
key: ${{ github.job }}-${{ matrix.os }}-${{ inputs.config_hash }}
35+
key: ${{ github.job }}-${{ matrix.os }}-${{ inputs.config_hash }}-${{ env.ImageVersion }}
3636
- name: Install Homebrew dependencies
3737
run: brew install pkg-config [email protected] xz gdbm tcl-tk
3838
- name: Configure CPython

.github/workflows/reusable-ubuntu.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
uses: actions/cache@v4
5757
with:
5858
path: ${{ env.CPYTHON_BUILDDIR }}/config.cache
59-
key: ${{ github.job }}-${{ runner.os }}-${{ inputs.config_hash }}
59+
key: ${{ github.job }}-${{ runner.os }}-${{ inputs.config_hash }}-${{ env.ImageVersion }}
6060
- name: Configure CPython out-of-tree
6161
working-directory: ${{ env.CPYTHON_BUILDDIR }}
6262
run: ${{ inputs.options }}

0 commit comments

Comments
 (0)