Skip to content

Commit 3e0978a

Browse files
encukouaisk
authored andcommitted
pythonGH-113858: GitHub Actions config: Only save ccache on pushes (pythonGH-113859)
1 parent 4faa2df commit 3e0978a

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,8 @@ jobs:
142142
run: echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
143143
- name: Configure ccache action
144144
uses: hendrikmuhs/[email protected]
145+
with:
146+
save: ${{ github.event_name == 'push' }}
145147
- name: Check Autoconf and aclocal versions
146148
run: |
147149
grep "Generated by GNU Autoconf 2.71" configure
@@ -284,6 +286,8 @@ jobs:
284286
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
285287
- name: Configure ccache action
286288
uses: hendrikmuhs/[email protected]
289+
with:
290+
save: ${{ github.event_name == 'push' }}
287291
- name: Configure CPython
288292
run: ./configure --config-cache --with-pydebug --with-openssl=$OPENSSL_DIR
289293
- name: Build CPython
@@ -327,6 +331,8 @@ jobs:
327331
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
328332
- name: Configure ccache action
329333
uses: hendrikmuhs/[email protected]
334+
with:
335+
save: ${{ github.event_name == 'push' }}
330336
- name: Setup directory envs for out-of-tree builds
331337
run: |
332338
echo "CPYTHON_RO_SRCDIR=$(realpath -m ${GITHUB_WORKSPACE}/../cpython-ro-srcdir)" >> $GITHUB_ENV
@@ -446,6 +452,8 @@ jobs:
446452
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
447453
- name: Configure ccache action
448454
uses: hendrikmuhs/[email protected]
455+
with:
456+
save: ${{ github.event_name == 'push' }}
449457
- name: Configure CPython
450458
run: ./configure --config-cache --with-address-sanitizer --without-pymalloc
451459
- name: Build CPython

.github/workflows/reusable-ubuntu.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ 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' }}
4446
- name: Setup directory envs for out-of-tree builds
4547
run: |
4648
echo "CPYTHON_RO_SRCDIR=$(realpath -m ${GITHUB_WORKSPACE}/../cpython-ro-srcdir)" >> $GITHUB_ENV

0 commit comments

Comments
 (0)