]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
GH-113858: GitHub Actions config: Only save ccache on pushes (GH-113859)
authorPetr Viktorin <encukou@gmail.com>
Wed, 10 Jan 2024 08:49:18 +0000 (09:49 +0100)
committerGitHub <noreply@github.com>
Wed, 10 Jan 2024 08:49:18 +0000 (09:49 +0100)
.github/workflows/build.yml
.github/workflows/reusable-ubuntu.yml

index 2168ec101cf3d9c0241045bccfd78c4e9dadae80..a3b1d7786ee9142cb237cbf370df767bb3a8f985 100644 (file)
@@ -142,6 +142,8 @@ jobs:
         run: echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
       - name: Configure ccache action
         uses: hendrikmuhs/ccache-action@v1.2
+        with:
+          save: ${{ github.event_name == 'push' }}
       - name: Check Autoconf and aclocal versions
         run: |
           grep "Generated by GNU Autoconf 2.71" configure
@@ -284,6 +286,8 @@ jobs:
         echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
     - name: Configure ccache action
       uses: hendrikmuhs/ccache-action@v1.2
+      with:
+        save: ${{ github.event_name == 'push' }}
     - name: Configure CPython
       run: ./configure --config-cache --with-pydebug --with-openssl=$OPENSSL_DIR
     - name: Build CPython
@@ -327,6 +331,8 @@ jobs:
         echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
     - name: Configure ccache action
       uses: hendrikmuhs/ccache-action@v1.2
+      with:
+        save: ${{ github.event_name == 'push' }}
     - name: Setup directory envs for out-of-tree builds
       run: |
         echo "CPYTHON_RO_SRCDIR=$(realpath -m ${GITHUB_WORKSPACE}/../cpython-ro-srcdir)" >> $GITHUB_ENV
@@ -446,6 +452,8 @@ jobs:
         echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
     - name: Configure ccache action
       uses: hendrikmuhs/ccache-action@v1.2
+      with:
+        save: ${{ github.event_name == 'push' }}
     - name: Configure CPython
       run: ./configure --config-cache --with-address-sanitizer --without-pymalloc
     - name: Build CPython
index 819b45bda7f980a1af66f971d2daf98c1ed36df3..f208064767d42f596f27696887406e94d1326a7e 100644 (file)
@@ -41,6 +41,8 @@ jobs:
         echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
     - name: Configure ccache action
       uses: hendrikmuhs/ccache-action@v1.2
+      with:
+        save: ${{ github.event_name == 'push' }}
     - name: Setup directory envs for out-of-tree builds
       run: |
         echo "CPYTHON_RO_SRCDIR=$(realpath -m ${GITHUB_WORKSPACE}/../cpython-ro-srcdir)" >> $GITHUB_ENV