Skip to content

Commit ce5c716

Browse files
committed
[3.14] GH-139596: Cease caching config.cache & ccache in GH Actions
Manual redo/backport of #139623 to 3.14.
1 parent 91f33ef commit ce5c716

5 files changed

Lines changed: 0 additions & 87 deletions

File tree

.github/workflows/build.yml

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -156,20 +156,10 @@ jobs:
156156
python-version: '3.x'
157157
- name: Runner image version
158158
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
159-
- name: Restore config.cache
160-
uses: actions/cache@v4
161-
with:
162-
path: config.cache
163-
# Include env.pythonLocation in key to avoid changes in environment when setup-python updates Python
164-
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context.outputs.config-hash }}-${{ env.pythonLocation }}
165159
- name: Install dependencies
166160
run: sudo ./.github/workflows/posix-deps-apt.sh
167161
- name: Add ccache to PATH
168162
run: echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
169-
- name: Configure ccache action
170-
uses: hendrikmuhs/ccache-action@v1.2
171-
with:
172-
save: false
173163
- name: Configure CPython
174164
run: |
175165
# Build Python with the libpython dynamic library
@@ -325,11 +315,6 @@ jobs:
325315
persist-credentials: false
326316
- name: Runner image version
327317
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
328-
- name: Restore config.cache
329-
uses: actions/cache@v4
330-
with:
331-
path: config.cache
332-
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context.outputs.config-hash }}
333318
- name: Register gcc problem matcher
334319
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
335320
- name: Install dependencies
@@ -351,10 +336,6 @@ jobs:
351336
- name: Add ccache to PATH
352337
run: |
353338
echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
354-
- name: Configure ccache action
355-
uses: hendrikmuhs/ccache-action@v1.2
356-
with:
357-
save: false
358339
- name: Configure CPython
359340
run: ./configure CFLAGS="-fdiagnostics-format=json" --config-cache --enable-slower-safety --with-pydebug --with-openssl="$OPENSSL_DIR"
360341
- name: Build CPython
@@ -451,10 +432,6 @@ jobs:
451432
- name: Add ccache to PATH
452433
run: |
453434
echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
454-
- name: Configure ccache action
455-
uses: hendrikmuhs/ccache-action@v1.2
456-
with:
457-
save: false
458435
- name: Setup directory envs for out-of-tree builds
459436
run: |
460437
echo "CPYTHON_RO_SRCDIR=$(realpath -m "${GITHUB_WORKSPACE}"/../cpython-ro-srcdir)" >> "$GITHUB_ENV"
@@ -465,11 +442,6 @@ jobs:
465442
run: sudo mount --bind -o ro "$GITHUB_WORKSPACE" "$CPYTHON_RO_SRCDIR"
466443
- name: Runner image version
467444
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
468-
- name: Restore config.cache
469-
uses: actions/cache@v4
470-
with:
471-
path: ${{ env.CPYTHON_BUILDDIR }}/config.cache
472-
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context.outputs.config-hash }}
473445
- name: Configure CPython out-of-tree
474446
working-directory: ${{ env.CPYTHON_BUILDDIR }}
475447
run: |
@@ -553,11 +525,6 @@ jobs:
553525
persist-credentials: false
554526
- name: Runner image version
555527
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
556-
- name: Restore config.cache
557-
uses: actions/cache@v4
558-
with:
559-
path: config.cache
560-
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context.outputs.config-hash }}
561528
- name: Register gcc problem matcher
562529
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
563530
- name: Install dependencies
@@ -583,11 +550,6 @@ jobs:
583550
- name: Add ccache to PATH
584551
run: |
585552
echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
586-
- name: Configure ccache action
587-
uses: hendrikmuhs/ccache-action@v1.2
588-
with:
589-
save: ${{ github.event_name == 'push' }}
590-
max-size: "200M"
591553
- name: Configure CPython
592554
run: ./configure --config-cache --with-address-sanitizer --without-pymalloc
593555
- name: Build CPython
@@ -634,11 +596,6 @@ jobs:
634596
persist-credentials: false
635597
- name: Runner image version
636598
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
637-
- name: Restore config.cache
638-
uses: actions/cache@v4
639-
with:
640-
path: config.cache
641-
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context.outputs.config-hash }}
642599
- name: Register gcc problem matcher
643600
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
644601
- name: Set build dir

.github/workflows/reusable-macos.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,6 @@ jobs:
3636
persist-credentials: false
3737
- name: Runner image version
3838
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
39-
- name: Restore config.cache
40-
uses: actions/cache@v4
41-
with:
42-
path: config.cache
43-
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ inputs.config_hash }}
4439
- name: Install Homebrew dependencies
4540
run: |
4641
brew install pkg-config openssl@3.0 xz gdbm tcl-tk@8 make

.github/workflows/reusable-san.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,6 @@ jobs:
3434
persist-credentials: false
3535
- name: Runner image version
3636
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
37-
- name: Restore config.cache
38-
uses: actions/cache@v4
39-
with:
40-
path: config.cache
41-
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ inputs.sanitizer }}-${{ inputs.config_hash }}
4237
- name: Install dependencies
4338
run: |
4439
sudo ./.github/workflows/posix-deps-apt.sh
@@ -77,11 +72,6 @@ jobs:
7772
- name: Add ccache to PATH
7873
run: |
7974
echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
80-
- name: Configure ccache action
81-
uses: hendrikmuhs/ccache-action@v1.2
82-
with:
83-
save: ${{ github.event_name == 'push' }}
84-
max-size: "200M"
8575
- name: Configure CPython
8676
run: >-
8777
./configure

.github/workflows/reusable-ubuntu.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,6 @@ jobs:
6464
- name: Add ccache to PATH
6565
run: |
6666
echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
67-
- name: Configure ccache action
68-
uses: hendrikmuhs/ccache-action@v1.2
69-
with:
70-
save: ${{ github.event_name == 'push' }}
71-
max-size: "200M"
7267
- name: Setup directory envs for out-of-tree builds
7368
run: |
7469
echo "CPYTHON_RO_SRCDIR=$(realpath -m "${GITHUB_WORKSPACE}"/../cpython-ro-srcdir)" >> "$GITHUB_ENV"
@@ -79,11 +74,6 @@ jobs:
7974
run: sudo mount --bind -o ro "$GITHUB_WORKSPACE" "$CPYTHON_RO_SRCDIR"
8075
- name: Runner image version
8176
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
82-
- name: Restore config.cache
83-
uses: actions/cache@v4
84-
with:
85-
path: ${{ env.CPYTHON_BUILDDIR }}/config.cache
86-
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ inputs.config_hash }}
8777
- name: Configure CPython out-of-tree
8878
working-directory: ${{ env.CPYTHON_BUILDDIR }}
8979
# `test_unpickle_module_race` writes to the source directory, which is

.github/workflows/reusable-wasi.yml

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,6 @@ jobs:
4242
mkdir "${WASI_SDK_PATH}" && \
4343
curl -s -S --location "https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_SDK_VERSION}/wasi-sdk-${WASI_SDK_VERSION}.0-x86_64-linux.tar.gz" | \
4444
tar --strip-components 1 --directory "${WASI_SDK_PATH}" --extract --gunzip
45-
- name: "Configure ccache action"
46-
uses: hendrikmuhs/ccache-action@v1.2
47-
with:
48-
save: ${{ github.event_name == 'push' }}
49-
max-size: "200M"
5045
- name: "Add ccache to PATH"
5146
run: echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
5247
- name: "Install Python"
@@ -55,24 +50,10 @@ jobs:
5550
python-version: '3.x'
5651
- name: "Runner image version"
5752
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
58-
- name: "Restore Python build config.cache"
59-
uses: actions/cache@v4
60-
with:
61-
path: ${{ env.CROSS_BUILD_PYTHON }}/config.cache
62-
# Include env.pythonLocation in key to avoid changes in environment when setup-python updates Python.
63-
# Include the hash of `Tools/wasm/wasi/__main__.py` as it may change the environment variables.
64-
# (Make sure to keep the key in sync with the other config.cache step below.)
65-
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ env.WASI_SDK_VERSION }}-${{ env.WASMTIME_VERSION }}-${{ inputs.config_hash }}-${{ hashFiles('Tools/wasm/wasi/__main__.py') }}-${{ env.pythonLocation }}
6653
- name: "Configure build Python"
6754
run: python3 Tools/wasm/wasi configure-build-python -- --config-cache --with-pydebug
6855
- name: "Make build Python"
6956
run: python3 Tools/wasm/wasi make-build-python
70-
- name: "Restore host config.cache"
71-
uses: actions/cache@v4
72-
with:
73-
path: ${{ env.CROSS_BUILD_WASI }}/config.cache
74-
# Should be kept in sync with the other config.cache step above.
75-
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ env.WASI_SDK_VERSION }}-${{ env.WASMTIME_VERSION }}-${{ inputs.config_hash }}-${{ hashFiles('Tools/wasm/wasi/__main__.py') }}-${{ env.pythonLocation }}
7657
- name: "Configure host"
7758
# `--with-pydebug` inferred from configure-build-python
7859
run: python3 Tools/wasm/wasi configure-host -- --config-cache

0 commit comments

Comments
 (0)