From 43ab2694fe113d81e1607b7d919ec56e9718aa92 Mon Sep 17 00:00:00 2001 From: Jesse Talavera Date: Thu, 23 Jan 2025 16:59:46 -0500 Subject: [PATCH] Use relative paths for caching the test dependencies - Each platform has a different value of `github.workspace`, and that was causing cache misses --- .github/workflows/main.yaml | 12 ++++++------ .github/workflows/pipeline.yaml | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 056e796e..97e301c8 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -41,9 +41,9 @@ jobs: id: check-existing-cache with: path: | - ${{ github.workspace }}/testfiles - !${{ github.workspace }}/testfiles/.git - !${{ github.workspace }}/testfiles/*.7z + testfiles + !testfiles/.git + !testfiles/*.7z restore-keys: | testfiles key: "testfiles-${{ steps.clone-test-file-repo.outputs.commit }}" @@ -61,9 +61,9 @@ jobs: if: steps.check-existing-cache.outputs.cache-hit != 'true' with: path: | - ${{ github.workspace }}/testfiles - !${{ github.workspace }}/testfiles/.git - !${{ github.workspace }}/testfiles/*.7z + testfiles + !testfiles/.git + !testfiles/*.7z key: "testfiles-${{ steps.clone-test-file-repo.outputs.commit }}" enableCrossOsArchive: true diff --git a/.github/workflows/pipeline.yaml b/.github/workflows/pipeline.yaml index 02128513..cddbe024 100644 --- a/.github/workflows/pipeline.yaml +++ b/.github/workflows/pipeline.yaml @@ -169,9 +169,9 @@ jobs: uses: actions/cache/restore@v4 with: path: | - ${{ github.workspace }}/testfiles - !${{ github.workspace }}/testfiles/.git - !${{ github.workspace }}/testfiles/*.7z + testfiles + !testfiles/.git + !testfiles/*.7z restore-keys: | testfiles key: ${{ inputs.testfiles-cache-key }}