88#
99# For more information, see https://github.com/andreasabel/haskell-ci
1010#
11- # version: 0.19.20240703
11+ # version: 0.19.20241219
1212#
13- # REGENDATA ("0.19.20240703 ",["--config=cabal.haskell-ci","github","cabal.project"])
13+ # REGENDATA ("0.19.20241219 ",["--config=cabal.haskell-ci","github","cabal.project"])
1414#
1515name : Haskell-CI
1616on :
@@ -32,14 +32,19 @@ jobs:
3232 strategy :
3333 matrix :
3434 include :
35+ - compiler : ghc-9.12.1
36+ compilerKind : ghc
37+ compilerVersion : 9.12.1
38+ setup-method : ghcup
39+ allow-failure : false
3540 - compiler : ghc-9.10.1
3641 compilerKind : ghc
3742 compilerVersion : 9.10.1
3843 setup-method : ghcup
3944 allow-failure : false
40- - compiler : ghc-9.8.2
45+ - compiler : ghc-9.8.4
4146 compilerKind : ghc
42- compilerVersion : 9.8.2
47+ compilerVersion : 9.8.4
4348 setup-method : ghcup
4449 allow-failure : false
4550 - compiler : ghc-9.6.6
@@ -89,15 +94,30 @@ jobs:
8994 allow-failure : false
9095 fail-fast : false
9196 steps :
92- - name : apt
97+ - name : apt-get install
9398 run : |
9499 apt-get update
95100 apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev
101+ - name : Install GHCup
102+ run : |
96103 mkdir -p "$HOME/.ghcup/bin"
97- curl -sL https://downloads.haskell.org/ghcup/0.1.20 .0/x86_64-linux-ghcup-0.1.20 .0 > "$HOME/.ghcup/bin/ghcup"
104+ curl -sL https://downloads.haskell.org/ghcup/0.1.30 .0/x86_64-linux-ghcup-0.1.30 .0 > "$HOME/.ghcup/bin/ghcup"
98105 chmod a+x "$HOME/.ghcup/bin/ghcup"
106+ - name : Install cabal-install (prerelease)
107+ run : |
108+ "$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml;
109+ "$HOME/.ghcup/bin/ghcup" install cabal 3.15.0.0.2024.10.3 || (cat "$HOME"/.ghcup/logs/*.* && false)
110+ echo "CABAL=$HOME/.ghcup/bin/cabal-3.15.0.0.2024.10.3 -vnormal+nowrap" >> "$GITHUB_ENV"
111+ - name : Install GHC (GHCup)
112+ if : matrix.setup-method == 'ghcup'
113+ run : |
99114 "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
100- "$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
115+ HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
116+ HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
117+ HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
118+ echo "HC=$HC" >> "$GITHUB_ENV"
119+ echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
120+ echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
101121 env :
102122 HCKIND : ${{ matrix.compilerKind }}
103123 HCNAME : ${{ matrix.compiler }}
@@ -108,21 +128,12 @@ jobs:
108128 echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
109129 echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
110130 echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
111- HCDIR=/opt/$HCKIND/$HCVER
112- HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
113- HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
114- HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
115- echo "HC=$HC" >> "$GITHUB_ENV"
116- echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
117- echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
118- echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
119131 HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
120132 echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
121133 echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
122134 echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
123- echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
135+ if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then echo "HEADHACKAGE=true" >> "$GITHUB_ENV" ; else echo "HEADHACKAGE= false" >> "$GITHUB_ENV" ; fi
124136 echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
125- echo "GHCJSARITH=0" >> "$GITHUB_ENV"
126137 env :
127138 HCKIND : ${{ matrix.compilerKind }}
128139 HCNAME : ${{ matrix.compiler }}
@@ -149,6 +160,18 @@ jobs:
149160 repository hackage.haskell.org
150161 url: http://hackage.haskell.org/
151162 EOF
163+ if $HEADHACKAGE; then
164+ cat >> $CABAL_CONFIG <<EOF
165+ repository head.hackage.ghc.haskell.org
166+ url: https://ghc.gitlab.haskell.org/head.hackage/
167+ secure: True
168+ root-keys: 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d
169+ 26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329
170+ f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89
171+ key-threshold: 3
172+ active-repositories: hackage.haskell.org, head.hackage.ghc.haskell.org:override
173+ EOF
174+ fi
152175 cat >> $CABAL_CONFIG <<EOF
153176 program-default-options
154177 ghc-options: $GHCJOBS +RTS -M3G -RTS
@@ -209,8 +232,10 @@ jobs:
209232 constraints: github-samples +openssl
210233 constraints: operational -buildExamples
211234 optimization: False
212- allow-newer: containers
213235 EOF
236+ if $HEADHACKAGE; then
237+ echo "allow-newer: $($HCPKG list --simple-output | sed -E 's/([a-zA-Z-]+)-[0-9.]+/*:\1,/g')" >> cabal.project
238+ fi
214239 $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(github|github-samples)$/; }' >> cabal.project.local
215240 cat cabal.project
216241 cat cabal.project.local
@@ -250,19 +275,9 @@ jobs:
250275 run : |
251276 rm -f cabal.project.local
252277 $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
253- - name : prepare for constraint sets
254- run : |
255- rm -f cabal.project.local
256- - name : constraint set containers-0.7
257- run : |
258- if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='containers >= 0.7' all --dry-run ; fi
259- if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then cabal-plan topo | sort ; fi
260- if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='containers >= 0.7' --dependencies-only -j2 all ; fi
261- if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='containers >= 0.7' all ; fi
262- if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then $CABAL v2-test $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='containers >= 0.7' all ; fi
263278 - name : save cache
264- uses : actions/cache/save@v4
265279 if : always()
280+ uses : actions/cache/save@v4
266281 with :
267282 key : ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
268283 path : ~/.cabal/store
0 commit comments