Skip to content

Commit 44a4431

Browse files
committed
CI: cache-deps: platforms need separate build steps
Otherwise Windows was failing the first time & not proceeding to retry.
1 parent 2f43451 commit 44a4431

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/cache-deps.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,12 @@ jobs:
103103
${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.HACKAGE_TIMESTAMP }}-
104104
${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-
105105
106-
- name: Build
106+
- if: runner.os != 'Windows'
107+
name: Build
107108
run: cabal v2-build --enable-tests --enable-benchmarks --only-dependencies
108109

109110
# repeating builds to workaround segfaults in windows and ghc-8.8.4
111+
# separate build steps for platforms are needed because if Windows build aborts once - it returns the error code but despite how it is on other platforms - repeated compilation may succeed.
110112
- if: runner.os == 'Windows'
111-
name: (Windows) Run build 2 additional times
112-
run: cabal v2-build --enable-tests --enable-benchmarks --only-dependencies || cabal v2-build --enable-tests --enable-benchmarks --only-dependencies
113+
name: (Windows) Restart build 3 times
114+
run: cabal v2-build --enable-tests --enable-benchmarks --only-dependencies || cabal v2-build --enable-tests --enable-benchmarks --only-dependencies || cabal v2-build --enable-tests --enable-benchmarks --only-dependencies

0 commit comments

Comments
 (0)