From f480d706354b718ab4975bacf46be54d3d248e75 Mon Sep 17 00:00:00 2001 From: Ryan Scott Date: Tue, 18 Apr 2023 09:17:22 -0400 Subject: [PATCH] CI: Always save cache, even on failure --- .github/workflows/ci.yaml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a2d376b..a7933dd 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -26,8 +26,8 @@ jobs: with: ghc-version: ${{ matrix.ghc-ver }} cabal-version: ${{ matrix.cabal }} - - name: Cache - uses: actions/cache@v1 + - uses: actions/cache/restore@v3 + name: Restore cabal store cache with: path: /home/runner/.cabal/store/ghc-${{ matrix.ghc-ver }} # Prefer previous SHA hash if it is still cached @@ -50,3 +50,10 @@ jobs: - name: macaw-loader-ppc run: | cabal build pkg:macaw-loader-ppc + - uses: actions/cache/save@v3 + name: Save cabal store cache + if: always() + with: + path: /home/runner/.cabal/store/ghc-${{ matrix.ghc-ver }} + # Prefer previous SHA hash if it is still cached + key: linux-${{ matrix.ghc-ver }}-${{ hashFiles('cabal.project.freeze') }}-${{ github.sha }}