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 9ff819e commit 2b8be71
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ jobs:
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 Down Expand Up @@ -134,3 +134,11 @@ jobs:

- name: Build compare-dwarfdump
run: cabal build compare-dwarfdump

- 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: ${{ env.CACHE_VERSION }}-linux-${{ matrix.ghc-ver }}-${{ hashFiles('cabal.project.freeze') }}-${{ github.sha }}

0 comments on commit 2b8be71

Please sign in to comment.