From 6160d75889996e7f20e8aba3d92d5e61786869cf Mon Sep 17 00:00:00 2001 From: Shauren Date: Thu, 27 Nov 2025 00:10:51 +0100 Subject: [PATCH] CI/GitHub: Keep ccache size as small as possible by evicting entries not accessed by current build instead --- .github/workflows/linux-build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/linux-build.yml b/.github/workflows/linux-build.yml index 15a9f960d0d..4cbc29e0e60 100644 --- a/.github/workflows/linux-build.yml +++ b/.github/workflows/linux-build.yml @@ -29,6 +29,7 @@ jobs: id: strings shell: bash run: | + echo "build-start=$EPOCHSECONDS" >> "$GITHUB_OUTPUT" echo "build-output-dir=${{ github.workspace }}/bin" >> "$GITHUB_OUTPUT" echo "ccache-key-prefix=ubuntu-${{ matrix.cc }}-${{ github.base_ref || github.ref_name }}" >> "$GITHUB_OUTPUT" - name: Dependencies @@ -65,6 +66,7 @@ jobs: ccache -z cmake --build ${{ steps.strings.outputs.build-output-dir }} ccache -s + ccache --evict-older-than $(($EPOCHSECONDS - ${{ steps.strings.outputs.build-start }}))s - name: Unit tests run: | cmake --build ${{ steps.strings.outputs.build-output-dir }} --target test