Skip to content

Commit 74485c0

Browse files
encukouhugovk
andauthored
[3.12] gh-113858: GH Actions: Make ccache smaller (GH-113859, GH-113945) (GH-114082)
This backports 3 PRs: - #113859 Only save ccache on pushes - #113945 Cut down ccache size - Only save the ccache in the main reusable builds, not on builds that don't use special build options: - Generated files check - OpenSSL tests - Hypothesis tests - Halve the max cache size, to 200M - #114113 Fixup for the above Co-authored-by: Hugo van Kemenade <[email protected]>
1 parent 4888db1 commit 74485c0

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

.github/workflows/build.yml

+9
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,8 @@ jobs:
169169
run: echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
170170
- name: Configure ccache action
171171
uses: hendrikmuhs/[email protected]
172+
with:
173+
save: false
172174
- name: Check Autoconf and aclocal versions
173175
run: |
174176
grep "Generated by GNU Autoconf 2.71" configure
@@ -283,6 +285,8 @@ jobs:
283285
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
284286
- name: Configure ccache action
285287
uses: hendrikmuhs/[email protected]
288+
with:
289+
save: false
286290
- name: Configure CPython
287291
run: ./configure --config-cache --with-pydebug --with-openssl=$OPENSSL_DIR
288292
- name: Build CPython
@@ -326,6 +330,8 @@ jobs:
326330
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
327331
- name: Configure ccache action
328332
uses: hendrikmuhs/[email protected]
333+
with:
334+
save: false
329335
- name: Setup directory envs for out-of-tree builds
330336
run: |
331337
echo "CPYTHON_RO_SRCDIR=$(realpath -m ${GITHUB_WORKSPACE}/../cpython-ro-srcdir)" >> $GITHUB_ENV
@@ -445,6 +451,9 @@ jobs:
445451
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
446452
- name: Configure ccache action
447453
uses: hendrikmuhs/[email protected]
454+
with:
455+
save: ${{ github.event_name == 'push' }}
456+
max-size: "200M"
448457
- name: Configure CPython
449458
run: ./configure --config-cache --with-address-sanitizer --without-pymalloc
450459
- name: Build CPython

.github/workflows/reusable-ubuntu.yml

+3
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ jobs:
4141
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
4242
- name: Configure ccache action
4343
uses: hendrikmuhs/[email protected]
44+
with:
45+
save: ${{ github.event_name == 'push' }}
46+
max-size: "200M"
4447
- name: Setup directory envs for out-of-tree builds
4548
run: |
4649
echo "CPYTHON_RO_SRCDIR=$(realpath -m ${GITHUB_WORKSPACE}/../cpython-ro-srcdir)" >> $GITHUB_ENV

0 commit comments

Comments
 (0)