88#
99# For more information, see https://github.com/haskell-CI/haskell-ci
1010#
11- # version: 0.18.1
11+ # version: 0.19.20250821
1212#
13- # REGENDATA ("0.18.1 ",["github","--config=cabal.haskell-ci","cabal.project"])
13+ # REGENDATA ("0.19.20250821 ",["github","--config=cabal.haskell-ci","cabal.project"])
1414#
1515name : Haskell-CI
1616on :
2323jobs :
2424 linux :
2525 name : Haskell-CI - Linux - ${{ matrix.compiler }}
26- runs-on : ubuntu-20 .04
26+ runs-on : ubuntu-24 .04
2727 timeout-minutes :
2828 60
2929 container :
30- image : buildpack-deps:bionic
30+ image : buildpack-deps:jammy
3131 services :
3232 postgres :
3333 image : postgres:14
@@ -38,72 +38,97 @@ jobs:
3838 strategy :
3939 matrix :
4040 include :
41- - compiler : ghc-9.8.2
41+ - compiler : ghc-9.14.0.20250819
4242 compilerKind : ghc
43- compilerVersion : 9.8.2
43+ compilerVersion : 9.14.0.20250819
44+ setup-method : ghcup-prerelease
45+ allow-failure : false
46+ - compiler : ghc-9.12.2
47+ compilerKind : ghc
48+ compilerVersion : 9.12.2
4449 setup-method : ghcup
4550 allow-failure : false
46- - compiler : ghc-9.6.4
51+ - compiler : ghc-9.10.2
4752 compilerKind : ghc
48- compilerVersion : 9.6.4
53+ compilerVersion : 9.10.2
4954 setup-method : ghcup
5055 allow-failure : false
51- - compiler : ghc-9.4.8
56+ - compiler : ghc-9.8.4
5257 compilerKind : ghc
53- compilerVersion : 9.4.8
58+ compilerVersion : 9.8.4
5459 setup-method : ghcup
5560 allow-failure : false
56- - compiler : ghc-9.2.8
61+ - compiler : ghc-9.6.7
5762 compilerKind : ghc
58- compilerVersion : 9.2.8
63+ compilerVersion : 9.6.7
5964 setup-method : ghcup
6065 allow-failure : false
61- - compiler : ghc-9.0.2
66+ - compiler : ghc-9.4.8
6267 compilerKind : ghc
63- compilerVersion : 9.0.2
68+ compilerVersion : 9.4.8
6469 setup-method : ghcup
6570 allow-failure : false
66- - compiler : ghc-8.10.7
71+ - compiler : ghc-9.2.8
6772 compilerKind : ghc
68- compilerVersion : 8.10.7
73+ compilerVersion : 9.2.8
6974 setup-method : ghcup
7075 allow-failure : false
7176 fail-fast : false
7277 steps :
73- - name : apt
78+ - name : apt-get install
7479 run : |
7580 apt-get update
7681 apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
82+ - name : Install GHCup
83+ run : |
7784 mkdir -p "$HOME/.ghcup/bin"
78- curl -sL https://downloads.haskell.org/ghcup/0.1.20.0 /x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
85+ curl -sL https://downloads.haskell.org/ghcup/0.1.50.1 /x86_64-linux-ghcup-0.1.50.1 > "$HOME/.ghcup/bin/ghcup"
7986 chmod a+x "$HOME/.ghcup/bin/ghcup"
87+ - name : Install cabal-install
88+ run : |
89+ "$HOME/.ghcup/bin/ghcup" install cabal 3.16.0.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
90+ echo "CABAL=$HOME/.ghcup/bin/cabal-3.16.0.0 -vnormal+nowrap" >> "$GITHUB_ENV"
91+ - name : Install GHC (GHCup)
92+ if : matrix.setup-method == 'ghcup'
93+ run : |
8094 "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
81- "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
95+ HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
96+ HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
97+ HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
98+ echo "HC=$HC" >> "$GITHUB_ENV"
99+ echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
100+ echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
82101 env :
83102 HCKIND : ${{ matrix.compilerKind }}
84103 HCNAME : ${{ matrix.compiler }}
85104 HCVER : ${{ matrix.compilerVersion }}
86- - name : Set PATH and environment variables
105+ - name : Install GHC (GHCup prerelease)
106+ if : matrix.setup-method == 'ghcup-prerelease'
87107 run : |
88- echo "$HOME/.cabal/bin" >> $GITHUB_PATH
89- echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
90- echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
91- echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
92- HCDIR=/opt/$HCKIND/$HCVER
108+ "$HOME/.ghcup/bin/ghcup" config add-release-channel prereleases
109+ "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
93110 HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
94111 HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
95112 HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
96113 echo "HC=$HC" >> "$GITHUB_ENV"
97114 echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
98115 echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
99- echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
116+ env :
117+ HCKIND : ${{ matrix.compilerKind }}
118+ HCNAME : ${{ matrix.compiler }}
119+ HCVER : ${{ matrix.compilerVersion }}
120+ - name : Set PATH and environment variables
121+ run : |
122+ echo "$HOME/.cabal/bin" >> $GITHUB_PATH
123+ echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
124+ echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
125+ echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
100126 HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
101127 echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
102128 echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
103129 echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
104- echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
130+ if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then echo "HEADHACKAGE=true" >> "$GITHUB_ENV" ; else echo "HEADHACKAGE= false" >> "$GITHUB_ENV" ; fi
105131 echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
106- echo "GHCJSARITH=0" >> "$GITHUB_ENV"
107132 env :
108133 HCKIND : ${{ matrix.compilerKind }}
109134 HCNAME : ${{ matrix.compiler }}
@@ -130,6 +155,18 @@ jobs:
130155 repository hackage.haskell.org
131156 url: http://hackage.haskell.org/
132157 EOF
158+ if $HEADHACKAGE; then
159+ cat >> $CABAL_CONFIG <<EOF
160+ repository head.hackage.ghc.haskell.org
161+ url: https://ghc.gitlab.haskell.org/head.hackage/
162+ secure: True
163+ root-keys: 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d
164+ 26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329
165+ f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89
166+ key-threshold: 3
167+ active-repositories: hackage.haskell.org, head.hackage.ghc.haskell.org:override
168+ EOF
169+ fi
133170 cat >> $CABAL_CONFIG <<EOF
134171 program-default-options
135172 ghc-options: $GHCJOBS +RTS -M3G -RTS
@@ -144,9 +181,9 @@ jobs:
144181 run : |
145182 $CABAL v2-update -v
146183 - name : cache (tools)
147- uses : actions/cache/restore@v3
184+ uses : actions/cache/restore@v4
148185 with :
149- key : ${{ runner.os }}-${{ matrix.compiler }}-tools-9b3acae5
186+ key : ${{ runner.os }}-${{ matrix.compiler }}-tools-e93c7dce
150187 path : ~/.haskell-ci-tools
151188 - name : install cabal-plan
152189 run : |
@@ -159,16 +196,16 @@ jobs:
159196 cabal-plan --version
160197 - name : install doctest
161198 run : |
162- $ CABAL --store-dir=$HOME/.haskell-ci-tools/store v2-install $ARG_COMPILER --ignore-project -j2 doctest --constraint='doctest ^>=0.22'
163- doctest --version
199+ if [ $((HCNUMVER < 91000)) -ne 0 ] ; then $ CABAL --store-dir=$HOME/.haskell-ci-tools/store v2-install $ARG_COMPILER --ignore-project -j2 doctest --constraint='doctest ^>=0.22.0' ; fi
200+ if [ $((HCNUMVER < 91000)) -ne 0 ] ; then doctest --version ; fi
164201 - name : save cache (tools)
165- uses : actions/cache/save@v3
166202 if : always()
203+ uses : actions/cache/save@v4
167204 with :
168- key : ${{ runner.os }}-${{ matrix.compiler }}-tools-9b3acae5
205+ key : ${{ runner.os }}-${{ matrix.compiler }}-tools-e93c7dce
169206 path : ~/.haskell-ci-tools
170207 - name : checkout
171- uses : actions/checkout@v3
208+ uses : actions/checkout@v4
172209 with :
173210 path : source
174211 - name : initial cabal.project for sdist
@@ -193,18 +230,29 @@ jobs:
193230 touch cabal.project.local
194231 echo "packages: ${PKGDIR_hpqtypes_effectful}" >> cabal.project
195232 echo "package hpqtypes-effectful" >> cabal.project
196- echo " ghc-options: -Werror=missing-methods" >> cabal.project
233+ echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project
234+ if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo "package hpqtypes-effectful" >> cabal.project ; fi
235+ if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo " ghc-options: -Werror=unused-packages" >> cabal.project ; fi
236+ echo "package hpqtypes-effectful" >> cabal.project
237+ echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project
197238 cat >> cabal.project <<EOF
239+ source-repository-package
240+ type: git
241+ location: https://github.com/scrive/hpqtypes
242+ tag: 8feaea012d5182574f9fa2c2ef2ca4654e062648
198243 EOF
199- $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(hpqtypes-effectful)$/; }' >> cabal.project.local
244+ if $HEADHACKAGE; then
245+ echo "allow-newer: $($HCPKG list --simple-output | sed -E 's/([a-zA-Z-]+)-[0-9.]+/*:\1,/g')" >> cabal.project
246+ fi
247+ $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(hpqtypes-effectful)$/; }' >> cabal.project.local
200248 cat cabal.project
201249 cat cabal.project.local
202250 - name : dump install plan
203251 run : |
204252 $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
205253 cabal-plan
206254 - name : restore cache
207- uses : actions/cache/restore@v3
255+ uses : actions/cache/restore@v4
208256 with :
209257 key : ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
210258 path : ~/.cabal/store
@@ -224,8 +272,8 @@ jobs:
224272 $CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct
225273 - name : doctest
226274 run : |
227- cd ${PKGDIR_hpqtypes_effectful} || false
228- doctest -XHaskell2010 -XBangPatterns -XConstraintKinds -XDataKinds -XDeriveFunctor -XDeriveGeneric -XDerivingStrategies -XFlexibleContexts -XFlexibleInstances -XGADTs -XGeneralizedNewtypeDeriving -XLambdaCase -XMultiParamTypeClasses -XNoStarIsType -XRankNTypes -XRoleAnnotations -XScopedTypeVariables -XStandaloneDeriving -XTupleSections -XTypeApplications -XTypeFamilies -XTypeOperators src
275+ if [ $((HCNUMVER < 91000)) -ne 0 ] ; then cd ${PKGDIR_hpqtypes_effectful} || false ; fi
276+ if [ $((HCNUMVER < 91000)) -ne 0 ] ; then doctest -XHaskell2010 -XBangPatterns -XConstraintKinds -XDataKinds -XDeriveFunctor -XDeriveGeneric -XDerivingStrategies -XFlexibleContexts -XFlexibleInstances -XImportQualifiedPost - XGADTs -XGeneralizedNewtypeDeriving -XLambdaCase -XMultiParamTypeClasses -XNoStarIsType -XRankNTypes -XRoleAnnotations -XScopedTypeVariables -XStandaloneDeriving -XTupleSections -XTypeApplications -XTypeFamilies -XTypeOperators -XUndecidableInstances src ; fi
229277 - name : cabal check
230278 run : |
231279 cd ${PKGDIR_hpqtypes_effectful} || false
@@ -238,8 +286,8 @@ jobs:
238286 rm -f cabal.project.local
239287 $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
240288 - name : save cache
241- uses : actions/cache/save@v3
242289 if : always()
290+ uses : actions/cache/save@v4
243291 with :
244292 key : ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
245293 path : ~/.cabal/store
0 commit comments