From 20441c90dfca00296af5547d0106ceea5c2b35ca Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Fri, 12 Jan 2024 10:48:25 +0100 Subject: [PATCH] gh-113858: Cut down ccache size (GH-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 --- .github/workflows/build.yml | 6 +++--- .github/workflows/reusable-ubuntu.yml | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b918b829e1d509..133814c9e0b788 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -170,7 +170,7 @@ jobs: - name: Configure ccache action uses: hendrikmuhs/ccache-action@v1.2 with: - save: ${{ github.event_name == 'push' }} + save: false - name: Check Autoconf and aclocal versions run: | grep "Generated by GNU Autoconf 2.71" configure @@ -286,7 +286,7 @@ jobs: - name: Configure ccache action uses: hendrikmuhs/ccache-action@v1.2 with: - save: ${{ github.event_name == 'push' }} + save: false - name: Configure CPython run: ./configure --config-cache --with-pydebug --with-openssl=$OPENSSL_DIR - name: Build CPython @@ -331,7 +331,7 @@ jobs: - name: Configure ccache action uses: hendrikmuhs/ccache-action@v1.2 with: - save: ${{ github.event_name == 'push' }} + save: false - name: Setup directory envs for out-of-tree builds run: | echo "CPYTHON_RO_SRCDIR=$(realpath -m ${GITHUB_WORKSPACE}/../cpython-ro-srcdir)" >> $GITHUB_ENV diff --git a/.github/workflows/reusable-ubuntu.yml b/.github/workflows/reusable-ubuntu.yml index fd1d3513732368..db4ca4d4667399 100644 --- a/.github/workflows/reusable-ubuntu.yml +++ b/.github/workflows/reusable-ubuntu.yml @@ -43,6 +43,7 @@ jobs: uses: hendrikmuhs/ccache-action@v1.2 with: save: ${{ github.event_name == 'push' }} + max-size: "200M" - name: Setup directory envs for out-of-tree builds run: | echo "CPYTHON_RO_SRCDIR=$(realpath -m ${GITHUB_WORKSPACE}/../cpython-ro-srcdir)" >> $GITHUB_ENV