From f6d218ed36a01e8c99d68db760aadacab73b73a4 Mon Sep 17 00:00:00 2001 From: Robert Lewicki Date: Tue, 1 Nov 2022 14:27:40 +0100 Subject: [PATCH] Fix regression tests failing due to invalid cache being restored (#1104) --- .github/workflows/testing.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index a7438326..566446f1 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -60,7 +60,7 @@ jobs: uses: actions/cache@v3 with: path: test - key: ${{ hashFiles('test/fetch-test-deps.sh') }} + key: ${{ matrix.os }}-${{ hashFiles('test/fetch-test-deps.sh') }} - if: ${{ steps.test-deps-cache.outputs.cache-hit != 'true' }} name: Fetch test dependency repositories continue-on-error: true @@ -132,7 +132,10 @@ jobs: uses: actions/cache@v3 with: path: test - key: ${{ hashFiles('test/fetch-test-deps.sh') }} + # Intentionally using matrix.bits instead matrix.arch as it's fine to share a cache + # with a different job below that also runs on Windows but doesn't have arch property + # defined. + key: ${{ matrix.os }}-${{ matrix.bits }}-${{ hashFiles('test/fetch-test-deps.sh') }} - if: ${{ steps.test-deps-cache.outputs.cache-hit != 'true' }} name: Fetch test dependency repositories shell: bash @@ -226,7 +229,7 @@ jobs: uses: actions/cache@v3 with: path: test - key: ${{ hashFiles('test/fetch-test-deps.sh') }} + key: ${{ matrix.os }}-${{ matrix.bits }}-${{ hashFiles('test/fetch-test-deps.sh') }} - if: ${{ steps.test-deps-cache.outputs.cache-hit != 'true' }} name: Fetch test dependency repositories shell: bash