Skip to content

Commit 9dfb62e

Browse files
committed
Correctly save and restore cache in GH actions
1 parent 12e3738 commit 9dfb62e

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

.github/workflows/master.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,15 @@ jobs:
7575
(cd servant-conduit && eval $DOCTEST)
7676
(cd servant-pipes && eval $DOCTEST)
7777
78+
- name: Save cache
79+
uses: actions/cache/save@v3
80+
if: always()
81+
with:
82+
path: |
83+
${{ steps.setup-haskell-cabal.outputs.cabal-store }}
84+
dist-newstyle
85+
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }}
86+
7887
# stack:
7988
# name: stack / ghc ${{ matrix.ghc }}
8089
# runs-on: ubuntu-latest
@@ -130,7 +139,7 @@ jobs:
130139
cat cabal.project
131140
nix-shell ghcjs.nix --run "cabal v2-update && cabal v2-freeze"
132141
133-
- uses: actions/cache/save@v3
142+
- uses: actions/cache/restore@v3
134143
name: Cache ~/.cabal/store and dist-newstyle
135144
with:
136145
path: |
@@ -147,3 +156,12 @@ jobs:
147156
- name: Tests
148157
run: |
149158
nix-shell ghcjs.nix --run ".github/run-ghcjs-tests.sh"
159+
160+
- name: Save cache
161+
uses: actions/cache/save@v3
162+
if: always()
163+
with:
164+
path: |
165+
~/.cabal/store
166+
dist-newstyle
167+
key: ${{ runner.os }}-ghcjs8.6-${{ hashFiles('cabal.project.freeze') }}

0 commit comments

Comments
 (0)