Skip to content

Commit

Permalink
More mmap-workaround-workarounds
Browse files Browse the repository at this point in the history
There were more things that didn't like GHCRTS=-xm...
 * more packages with custom setups, hidden in the CI cache
 * packages using happy, also hidden in the CI cache
 * a call to cabal v2-test clash-cosim, only ran on "external" PRs
  • Loading branch information
leonschoorl committed Sep 12, 2023
1 parent fd4c41a commit c0476f1
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
25 changes: 20 additions & 5 deletions .ci/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,27 @@ if [[ "$GHC_HEAD" != "yes" ]]; then
mv cabal.project.local.disabled cabal.project.local
[[ ! -f cabal.project.freeze.disabled ]] || mv cabal.project.freeze.disabled cabal.project.freeze
fi
set -u

cabal v2-build clash-prelude --write-ghc-environment-files=always
# Undo mmap crash workaround for clash-cosim, see PR #2572.
# It uses a custom setup, which can't be linked with -rtsopts
GHCRTS="" cabal v2-build clash-cosim --write-ghc-environment-files=always
# Any package with a custom setup or using happy can only be built with GHCRTS=""
# see PR #2572.
if [[ "$GHCRTS" != "" ]]; then
CANT_BUILD_WITH_RTSOPTS="ghc-paths haskell-src-exts pretty-show singletons"
cabal v2-build --only-dependencies $CANT_BUILD_WITH_RTSOPTS
GHCRTS="" cabal v2-build $CANT_BUILD_WITH_RTSOPTS

# singletons-base only used on ghc >= 9.0
GHC_MAJOR_VERSION=$(ghc --numeric-version | awk -F . '{print $1}')
if [[ "$GHC_MAJOR_VERSION" -gt "8" ]]; then
cabal v2-build --only-dependencies singletons-base
GHCRTS="" cabal v2-build singletons-base
fi

cabal v2-build clash-prelude

cabal v2-build --only-dependencies clash-cosim
GHCRTS="" cabal v2-build clash-cosim
fi
set -u

# Build with default constraints
cabal v2-build all --write-ghc-environment-files=always
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ jobs:
cabal v2-test clash-prelude
cabal v2-test clash-lib
cabal v2-test clash-cores
cabal v2-test clash-cosim
GHCRTS="" cabal v2-test clash-cosim
- name: Testsuite (VHDL)
if: github.ref != 'refs/heads/master'
Expand Down

0 comments on commit c0476f1

Please sign in to comment.