Skip to content

Commit eb58eb8

Browse files
committed
Cache native cabal from ~/.config
1 parent 371d804 commit eb58eb8

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

.github/workflows/wasm.yaml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,16 @@ jobs:
2424
id: ghc-wasm-cache-restore
2525
uses: actions/cache/restore@v4
2626
with:
27-
path: |
28-
~/.cabal
29-
~/.ghc-wasm
27+
path: ~/.ghc-wasm
3028
key: ghc-wasm-${{ env.CI_CACHE_KEY }}
3129

30+
- name: Try to restore cached native cabal
31+
id: native-cabal-cache-restore
32+
uses: actions/cache/restore@v4
33+
with:
34+
path: ~/.config/cabal
35+
key: native-cabal-${{ env.CI_CACHE_KEY }}
36+
3237
- name: Try to restore cached dist-newstyle
3338
id: dist-newstyle-cache-restore
3439
uses: actions/cache/restore@v4
@@ -103,15 +108,20 @@ jobs:
103108
cp $(wasm32-wasi-cabal list-bin als) ~/out
104109
105110
- name: Clean up cabal logs
106-
run: rm -rf ~/.cabal/logs ~/.ghc-wasm/.cabal/logs
111+
run: rm -rf ~/.config/cabal/logs ~/.ghc-wasm/.cabal/logs
112+
113+
- name: Cache native cabal
114+
uses: actions/cache/save@v4
115+
if: always()
116+
with:
117+
path: ~/.config/cabal
118+
key: ${{ steps.native-cabal-cache-restore.outputs.cache-primary-key }}
107119

108120
- name: Cache ghc-wasm-meta
109121
uses: actions/cache/save@v4
110122
if: always()
111123
with:
112-
path: |
113-
~/.cabal
114-
~/.ghc-wasm
124+
path: ~/.ghc-wasm
115125
key: ${{ steps.ghc-wasm-cache-restore.outputs.cache-primary-key }}
116126

117127
- name: Upload artifact

0 commit comments

Comments
 (0)