From ce564fdd74e2c56493a374117e2414c21f3f01ef Mon Sep 17 00:00:00 2001 From: David Vo Date: Tue, 7 Nov 2023 22:27:04 +1100 Subject: [PATCH] ci: Use predictable cache keys for ccache --- .github/workflows/dist.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dist.yml b/.github/workflows/dist.yml index 80ef3033..bcea5c31 100644 --- a/.github/workflows/dist.yml +++ b/.github/workflows/dist.yml @@ -103,8 +103,11 @@ jobs: if: steps.ccache.outputs.variant == 'ccache' uses: hendrikmuhs/ccache-action@v1.2.10 with: - key: ${{ matrix.os }}-${{ matrix.python_version }} - variant: ccache + key: ${{ matrix.os }}-${{ matrix.python_version }}-${{ hashFiles('**/pyproject.toml') }} + restore-keys: | + ${{ matrix.os }}-${{ matrix.python_version }} + append-timestamp: false + variant: ccache - name: Setup sccache if: steps.ccache.outputs.variant == 'sccache' @@ -188,8 +191,11 @@ jobs: - name: Setup ccache uses: hendrikmuhs/ccache-action@v1.2 with: - key: ${{ matrix.os.container }} - variant: ccache + key: ${{ matrix.os.container }}-${{ hashFiles('**/pyproject.toml') }} + restore-keys: | + ${{ matrix.os.container }} + append-timestamp: false + variant: ccache - name: Install setuptools + wheel run: |