Skip to content

Commit

Permalink
CI: Always save cache, even on failure
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanGlScott committed Apr 18, 2023
1 parent c08f070 commit f480d70
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}

0 comments on commit f480d70

Please sign in to comment.