Skip to content

Commit

Permalink
Haskell-CI: use preinstalled packages
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasabel committed Mar 19, 2024
1 parent 1066cab commit daea105
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
19 changes: 10 additions & 9 deletions .github/workflows/haskell-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
#
# For more information, see https://github.com/andreasabel/haskell-ci
#
# version: 0.18.0.20240225
# version: 0.18.1.20240316
#
# REGENDATA ("0.18.0.20240225",["github","cabal.project"])
# REGENDATA ("0.18.1.20240316",["github","cabal.project"])
#
name: Haskell-CI
on:
Expand Down Expand Up @@ -86,8 +86,9 @@ jobs:
mkdir -p "$HOME/.ghcup/bin"
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
chmod a+x "$HOME/.ghcup/bin/ghcup"
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml;
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.1 || (cat "$HOME"/.ghcup/logs/*.* && false)
env:
HCKIND: ${{ matrix.compilerKind }}
HCNAME: ${{ matrix.compiler }}
Expand All @@ -105,7 +106,7 @@ jobs:
echo "HC=$HC" >> "$GITHUB_ENV"
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.1 -vnormal+nowrap" >> "$GITHUB_ENV"
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
Expand Down Expand Up @@ -290,11 +291,11 @@ jobs:
rm -f cabal.project.local
- name: constraint set containers-0.7
run: |
if [ $((HCNUMVER < 90800)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='containers >= 0.7' all --dry-run ; fi
if [ $((HCNUMVER < 90800)) -ne 0 ] ; then cabal-plan topo | sort ; fi
if [ $((HCNUMVER < 90800)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='containers >= 0.7' --dependencies-only -j2 all ; fi
if [ $((HCNUMVER < 90800)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='containers >= 0.7' all ; fi
if [ $((HCNUMVER < 90800)) -ne 0 ] ; then $CABAL v2-test $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='containers >= 0.7' all ; fi
$CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='containers >= 0.7' all --dry-run
cabal-plan topo | sort
$CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='containers >= 0.7' --dependencies-only -j2 all
$CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='containers >= 0.7' all
$CABAL v2-test $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='containers >= 0.7' all
- name: constraint set no-lukko
run: |
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='hackage-security -lukko' all --dry-run
Expand Down
8 changes: 5 additions & 3 deletions cabal.haskell-ci
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
branches: master
installed: +all

-- Andreas, 2023-07-01: We use some haddock features that are new in 8.6.
haddock: >= 8.6

-- -- Andreas, 2023-02-20: see https://github.com/haskell/hackage-security/pull/291
-- -- unconstrained build with head.hackage produces failing build plans
-- unconstrained: < 9.6
-- unconstrained: < 9.10
--
-- Andreas, 2023-07-01
-- Ryan GI Scott suggests this instead:
Expand All @@ -15,11 +16,12 @@ raw-project
base-compat >= 0.12.2

constraint-set no-lukko
ghc: >=8.4
constraints: hackage-security -lukko

constraint-set containers-0.7
ghc: >= 8.4 && < 9.8
-- Andreas, 2024-03-19: possibly we will have to turn off the constraint set
-- for the head.hackage build with GHC 9.10.0
-- ghc: < 9.10
constraints: containers >= 0.7
tests: True
run-tests: True
Expand Down

0 comments on commit daea105

Please sign in to comment.