|
45 | 45 | - cron: "25 2/8 * * *"
|
46 | 46 |
|
47 | 47 | env:
|
48 |
| - cabalBuild: "v2-build all --enable-tests --enable-benchmarks --keep-going" |
| 48 | + cabalBuild: "v2-build all --keep-going" |
49 | 49 |
|
50 | 50 | jobs:
|
51 | 51 |
|
@@ -145,11 +145,13 @@ jobs:
|
145 | 145 | - name: Form the package list ('cabal.project.freeze')
|
146 | 146 | continue-on-error: true
|
147 | 147 | run: |
|
148 |
| - cabal v2-freeze |
149 |
| - echo '' |
150 |
| - echo 'Output:' |
151 |
| - echo '' |
152 |
| - cat 'cabal.project.freeze' |
| 148 | + cabal v2-freeze && \ |
| 149 | + echo '' && \ |
| 150 | + echo 'Output:' && \ |
| 151 | + echo '' && \ |
| 152 | + cat 'cabal.project.freeze' && \ |
| 153 | + echo '' || \ |
| 154 | + echo 'WARNING: Could not produce the `freeze`. |
153 | 155 |
|
154 | 156 | # 2021-12-02: NOTE: Cabal Hackage source tree storage does not depend on OS or GHC really,
|
155 | 157 | # but can depend on `base`.
|
@@ -180,27 +182,34 @@ jobs:
|
180 | 182 | ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-
|
181 | 183 | ${{ env.cache-name }}-${{ runner.os }}-
|
182 | 184 |
|
183 |
| - - if: steps.compiled-deps.outputs.cache-hit != 'true' |
| 185 | + - if: steps.compiled-deps.outputs.cache-hit != 'true' && runner.os == 'Linux' && matrix.ghc == '8.10.7' |
| 186 | + name: Download sources for bench |
| 187 | + # Downloaded separately, to match the tested work/PR workflow guarantees |
184 | 188 | run: |
|
185 |
| - cabal update |
| 189 | + cabal $cabalBuild --only-download --enable-benchmarks |
186 | 190 |
|
187 | 191 | - if: steps.compiled-deps.outputs.cache-hit != 'true'
|
188 |
| - name: Download all sources |
| 192 | + name: Download the rest of the sources |
| 193 | + # Downloaded separately, to match the tested work/PR workflow guarantees |
189 | 194 | run: |
|
190 |
| - cabal $cabalBuild --only-download |
| 195 | + cabal $cabalBuild --only-download --enable-tests |
191 | 196 |
|
192 | 197 | # repeating builds to workaround segfaults in windows and ghc-8.8.4
|
193 | 198 | # This build agenda in not to have successful code,
|
194 |
| - # but to cache what can be cached, so step is fault tolerant & would always succseed. |
195 |
| - # 2021-12-11: NOTE: Building all targets, since |
196 |
| - # current Cabal does not allow `all --enable-tests --enable-benchmarks --only-dependencies` |
197 |
| - - if: steps.compiled-deps.outputs.cache-hit != 'true' |
198 |
| - name: Build all targets; try 3 times |
| 199 | + # but to cache what can be cached, so step is fault tolerant & would always succeed. |
| 200 | + # 2021-12-11: NOTE: Need to building all targets (build the project also), since |
| 201 | + # current Cabal does not allow `all --enable-tests --enable-benchmarks --only-dependencies` combination |
| 202 | + |
| 203 | + - if: steps.compiled-deps.outputs.cache-hit != 'true' && runner.os == 'Linux' && matrix.ghc == '8.10.7' |
| 204 | + name: (For Bench workflow) Build benchmark targets |
199 | 205 | continue-on-error: true
|
| 206 | + # Downloaded separately, to match the tested work/PR workflow guarantees |
200 | 207 | run: |
|
201 |
| - cabal $cabalBuild || cabal $cabalBuild || cabal $cabalBuild |
| 208 | + cabal $cabalBuild --enable-benchmarks || cabal $cabalBuild --enable-benchmarks || cabal $cabalBuild --enable-benchmarks |
202 | 209 |
|
203 |
| - # Despite the `continue-on-error: true` directive - CI does not ignore the return code of the last step |
204 |
| - - name: Workaround to CI platform |
| 210 | + - if: steps.compiled-deps.outputs.cache-hit != 'true' |
| 211 | + name: Build targets; try 3 times |
| 212 | + continue-on-error: true |
| 213 | + # Done separately, matching the tested work/PR workflow guarantees |
205 | 214 | run: |
|
206 |
| - true |
| 215 | + cabal $cabalBuild --enable-test || cabal $cabalBuild --enable-test || cabal $cabalBuild --enable-test |
0 commit comments