File tree 1 file changed +11
-2
lines changed
1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -57,14 +57,14 @@ jobs:
57
57
58
58
# Restore dist-newstyle
59
59
- name : Cache dist-newstyle
60
+ id : dist-cache-restore
60
61
uses : actions/cache@v4
61
62
with :
62
63
path : |
63
64
dist-newstyle
64
65
key : dist-${{ matrix.os }}-${{ matrix.ghc }}-${{ hashFiles('**/*.cabal', '**/cabal.project', '**/cabal.project.local') }}
65
66
restore-keys : |
66
67
dist-${{ matrix.os }}-${{ matrix.ghc }}-
67
- save-always : true
68
68
69
69
# Build
70
70
- name : Update package database
85
85
# Save packages
86
86
- name : Save cache for ~/.cabal/packages and ~/.cabal/store
87
87
uses : actions/cache/save@v4
88
- if : always()
88
+ if : always() && steps.deps-cache-restore.outputs.cache-hit != 'true'
89
89
with :
90
90
path : |
91
91
~/.cabal/packages
99
99
- name : Run Tests
100
100
run : cabal test
101
101
102
+ # Safe dist
103
+ - name : Save cache dist-newstyle
104
+ uses : actions/cache/save@v4
105
+ if : always() && steps.dist-cache-restore.outputs.cache-hit != 'true'
106
+ with :
107
+ path : |
108
+ dist-newstyle
109
+ key : ${{ steps.dist-cache-restore.outputs.cache-primary-key }}
110
+
You can’t perform that action at this time.
0 commit comments