Skip to content

CI: caching: fix early termination expression check & cabal.project replacement #2520

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Dec 22, 2021
12 changes: 8 additions & 4 deletions .github/workflows/caching.yml
Original file line number Diff line number Diff line change
@@ -100,7 +100,11 @@ jobs:
- if: matrix.ghc == '9.0.1'
name: (GHC 9.0.1) Use modified `cabal.project`
run: |
cp cabal-ghc901.project cabal.project
# File has some protections preventing regular `rm`.
# (most probably sticky bit is set on $HOME)
# `&&` insures `rm -f` return is positive.
# Many platforms also have `alias cp='cp -i'`.
rm -f -v cabal.project && cp -v cabal-ghc901.project cabal.project
- if: runner.os == 'Windows' && matrix.ghc == '8.8.4'
name: (Windows,GHC 8.8) Modify `cabal.project` to workaround segfaults
run: |
@@ -154,11 +158,11 @@ jobs:
${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-
${{ env.cache-name }}-${{ runner.os }}-

- if: (! steps.compiled-deps.outputs.cache-hit)
- if: steps.compiled-deps.outputs.cache-hit != 'true'
run: |
cabal update

- if: (! steps.compiled-deps.outputs.cache-hit)
- if: steps.compiled-deps.outputs.cache-hit != 'true'
name: Download all sources
run: |
cabal $cabalBuild --only-download
@@ -168,7 +172,7 @@ jobs:
# but to cache what can be cached, so step is fault tolerant & would always succseed.
# 2021-12-11: NOTE: Building all targets, since
# current Cabal does not allow `all --enable-tests --enable-benchmarks --only-dependencies`
- if: (! steps.compiled-deps.outputs.cache-hit)
- if: steps.compiled-deps.outputs.cache-hit != 'true'
name: Build all targets; try 3 times
continue-on-error: true
run: |
6 changes: 5 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -95,7 +95,11 @@ jobs:
- if: matrix.ghc == '9.0.1'
name: (GHC 9.0.1) Use modified `cabal.project`
run: |
cp cabal-ghc901.project cabal.project
# File has some protections preventing regular `rm`.
# (most probably sticky bit is set on $HOME)
# `&&` insures `rm -f` return is positive.
# Many platforms aslo have `alias cp='cp -i'`.
rm -f -v cabal.project && cp -v cabal-ghc901.project cabal.project
- if: runner.os == 'Windows' && matrix.ghc == '8.8.4'
name: (Windows,GHC 8.8) Modify `cabal.project` to workaround segfaults
run: |
2 changes: 1 addition & 1 deletion cabal-ghc901.project
Original file line number Diff line number Diff line change
@@ -37,7 +37,7 @@ package *

write-ghc-environment-files: never

index-state: 2021-11-29T12:30:08Z
index-state: 2021-11-29T12:30:10Z

constraints:
-- These plugins don't work on GHC9 yet
2 changes: 1 addition & 1 deletion cabal-ghc921.project
Original file line number Diff line number Diff line change
@@ -36,7 +36,7 @@ package *

write-ghc-environment-files: never

index-state: 2021-11-29T12:30:08Z
index-state: 2021-11-29T12:30:10Z

constraints:
-- These plugins doesn't work on GHC92 yet
2 changes: 1 addition & 1 deletion cabal.project
Original file line number Diff line number Diff line change
@@ -40,7 +40,7 @@ package *

write-ghc-environment-files: never

index-state: 2021-11-29T12:30:08Z
index-state: 2021-11-29T12:30:10Z

constraints:
hyphenation +embed