File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -139,6 +139,7 @@ jobs:
139
139
restore-keys : ${{ env.cache-name }}-
140
140
141
141
- name : Compiled deps cache
142
+ id : compiled-deps
142
143
uses : actions/cache@v2
143
144
env :
144
145
cache-name : compiled-deps
@@ -150,9 +151,12 @@ jobs:
150
151
${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-
151
152
${{ env.cache-name }}-${{ runner.os }}-
152
153
153
- - run : cabal update
154
+ - if : ! steps.compiled-deps.outputs.cache-hit
155
+ run : |
156
+ cabal update
154
157
155
- - name : Download all sources
158
+ - if : ! steps.compiled-deps.outputs.cache-hit
159
+ name : Download all sources
156
160
run : |
157
161
cabal $cabalBuild --only-download
158
162
@@ -161,7 +165,8 @@ jobs:
161
165
# but to cache what can be cached, so step is fault tolerant & would always succseed.
162
166
# 2021-12-11: NOTE: Building all targets, since
163
167
# current Cabal does not allow `all --enable-tests --enable-benchmarks --only-dependencies`
164
- - name : Build all targets; try 3 times
168
+ - if : ! steps.compiled-deps.outputs.cache-hit
169
+ name : Build all targets; try 3 times
165
170
continue-on-error : true
166
171
run : |
167
172
cabal $cabalBuild || cabal $cabalBuild || cabal $cabalBuild
You can’t perform that action at this time.
0 commit comments