Skip to content

Commit fefb67d

Browse files
committed
CI: cache-deps: build all subprojects & targets
1 parent a528f13 commit fefb67d

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

.github/workflows/cache-deps.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -108,24 +108,25 @@ jobs:
108108
${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-
109109
${{ env.cache-name }}-${{ runner.os }}-
110110
111+
- name: Download all sources
112+
run: |
113+
cabal v2-build all --only-download
114+
111115
- if: ( runner.os != 'Windows' ) && ( matrix.ghc != '8.6.5' )
112-
name: Build
116+
name: (Default) Build all targets
113117
run: |
114-
# Download dep sources for all targets.
115-
cabal v2-build --enable-tests --enable-benchmarks --only-download
116-
# Build only dep targets.
117-
cabal v2-build --enable-tests --enable-benchmarks --only-dependencies
118+
cabal v2-build all
118119
119120
# repeating builds to workaround segfaults in windows and ghc-8.8.4
120121
# 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.
121122
- if: runner.os == 'Windows' && ( matrix.ghc != '8.6.5' )
122-
name: (Windows) Restart build 3 times
123-
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
123+
name: (Windows) Build only dep targets; Restart build 3 times
124+
run: cabal v2-build all || cabal v2-build all || cabal v2-build all
124125

125126
- if: ( runner.os != 'Windows' ) && ( matrix.ghc == '8.6.5' )
126-
name: Build
127+
name: (!Windows,8.6.5) Build only dep targets
127128
run: cabal v2-build --only-dependencies
128129

129130
- if: ( runner.os == 'Windows' ) && ( matrix.ghc == '8.6.5' )
130-
name: Build
131+
name: (Windows,8.6.5)
131132
run: cabal v2-build --only-dependencies || cabal v2-build --only-dependencies || cabal v2-build --only-dependencies

0 commit comments

Comments
 (0)