66#
77# haskell-ci regenerate
88#
9- # For more information, see https://github.com/andreasabel /haskell-ci
9+ # For more information, see https://github.com/haskell-CI /haskell-ci
1010#
11- # version: 0.19.20241021
11+ # version: 0.19.20250216
1212#
13- # REGENDATA ("0.19.20241021 ",["github","microaeson.cabal"])
13+ # REGENDATA ("0.19.20250216 ",["github","microaeson.cabal"])
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 :
@@ -32,19 +32,19 @@ jobs:
3232 strategy :
3333 matrix :
3434 include :
35- - compiler : ghc-9.12.20241014
35+ - compiler : ghc-9.12.1
3636 compilerKind : ghc
37- compilerVersion : 9.12.20241014
37+ compilerVersion : 9.12.1
3838 setup-method : ghcup
3939 allow-failure : false
4040 - compiler : ghc-9.10.1
4141 compilerKind : ghc
4242 compilerVersion : 9.10.1
4343 setup-method : ghcup
4444 allow-failure : false
45- - compiler : ghc-9.8.2
45+ - compiler : ghc-9.8.4
4646 compilerKind : ghc
47- compilerVersion : 9.8.2
47+ compilerVersion : 9.8.4
4848 setup-method : ghcup
4949 allow-failure : false
5050 - compiler : ghc-9.6.6
@@ -99,16 +99,29 @@ jobs:
9999 allow-failure : false
100100 fail-fast : false
101101 steps :
102- - name : apt
102+ - name : apt-get install
103103 run : |
104104 apt-get update
105105 apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev
106+ - name : Install GHCup
107+ run : |
106108 mkdir -p "$HOME/.ghcup/bin"
107109 curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup"
108110 chmod a+x "$HOME/.ghcup/bin/ghcup"
109- "$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml;
110- "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
111+ - name : Install cabal-install
112+ run : |
111113 "$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
114+ echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
115+ - name : Install GHC (GHCup)
116+ if : matrix.setup-method == 'ghcup'
117+ run : |
118+ "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
119+ HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
120+ HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
121+ HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
122+ echo "HC=$HC" >> "$GITHUB_ENV"
123+ echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
124+ echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
112125 env :
113126 HCKIND : ${{ matrix.compilerKind }}
114127 HCNAME : ${{ matrix.compiler }}
@@ -119,21 +132,12 @@ jobs:
119132 echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
120133 echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
121134 echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
122- HCDIR=/opt/$HCKIND/$HCVER
123- HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
124- HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
125- HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
126- echo "HC=$HC" >> "$GITHUB_ENV"
127- echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
128- echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
129- echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
130135 HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
131136 echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
132137 echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
133138 echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
134- if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then echo "HEADHACKAGE=true" >> "$GITHUB_ENV" ; else echo "HEADHACKAGE= false" >> "$GITHUB_ENV" ; fi
139+ echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
135140 echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
136- echo "GHCJSARITH=0" >> "$GITHUB_ENV"
137141 env :
138142 HCKIND : ${{ matrix.compilerKind }}
139143 HCNAME : ${{ matrix.compiler }}
@@ -160,18 +164,6 @@ jobs:
160164 repository hackage.haskell.org
161165 url: http://hackage.haskell.org/
162166 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
175167 cat >> $CABAL_CONFIG <<EOF
176168 program-default-options
177169 ghc-options: $GHCJOBS +RTS -M3G -RTS
@@ -222,10 +214,8 @@ jobs:
222214 if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package microaeson" >> cabal.project ; fi
223215 if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
224216 cat >> cabal.project <<EOF
217+ allow-newer: containers
225218 EOF
226- if $HEADHACKAGE; then
227- echo "allow-newer: $($HCPKG list --simple-output | sed -E 's/([a-zA-Z-]+)-[0-9.]+/*:\1,/g')" >> cabal.project
228- fi
229219 $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(microaeson)$/; }' >> cabal.project.local
230220 cat cabal.project
231221 cat cabal.project.local
@@ -263,9 +253,19 @@ jobs:
263253 run : |
264254 rm -f cabal.project.local
265255 $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
256+ - name : prepare for constraint sets
257+ run : |
258+ rm -f cabal.project.local
259+ - name : constraint set containers-0.8
260+ run : |
261+ if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='containers ^>= 0.8' all --dry-run ; fi
262+ if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then cabal-plan topo | sort ; fi
263+ if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='containers ^>= 0.8' --dependencies-only -j2 all ; fi
264+ if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='containers ^>= 0.8' all ; fi
265+ if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then $CABAL v2-test $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='containers ^>= 0.8' all ; fi
266266 - name : save cache
267- uses : actions/cache/save@v4
268267 if : always()
268+ uses : actions/cache/save@v4
269269 with :
270270 key : ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
271271 path : ~/.cabal/store
0 commit comments