@@ -8,9 +8,9 @@
88#
99# For more information, see https://github.com/haskell-CI/haskell-ci
1010#
11−# version: 0.17.20231010
11+# version: 0.19.20241223
1212#
13−# REGENDATA ("0.17.20231010",["github","cabal.project"])
13+# REGENDATA ("0.19.20241223",["github","cabal.project"])
1414#
1515name: Haskell-CI
1616on:
@@ -27,24 +27,34 @@ jobs:
2727 timeout-minutes:
2828 60
2929 container:
30− image: buildpack-deps:bionic
30+ image: buildpack-deps:jammy
3131 continue-on-error: ${{ matrix.allow-failure }}
3232 strategy:
3333 matrix:
3434 include:
35− - compiler: ghc-9.8.1
35+ - compiler: ghc-9.12.1
3636 compilerKind: ghc
37− compilerVersion: 9.8.1
37+ compilerVersion: 9.12.1
3838 setup-method: ghcup
3939 allow-failure: false
40− - compiler: ghc-9.6.3
40+ - compiler: ghc-9.10.1
4141 compilerKind: ghc
42− compilerVersion: 9.6.3
42+ compilerVersion: 9.10.1
4343 setup-method: ghcup
4444 allow-failure: false
45− - compiler: ghc-9.4.7
45+ - compiler: ghc-9.8.4
4646 compilerKind: ghc
47− compilerVersion: 9.4.7
47+ compilerVersion: 9.8.4
48+ setup-method: ghcup
49+ allow-failure: false
50+ - compiler: ghc-9.6.6
51+ compilerKind: ghc
52+ compilerVersion: 9.6.6
53+ setup-method: ghcup
54+ allow-failure: false
55+ - compiler: ghc-9.4.8
56+ compilerKind: ghc
57+ compilerVersion: 9.4.8
4858 setup-method: ghcup
4959 allow-failure: false
5060 - compiler: ghc-9.2.8
@@ -65,69 +75,38 @@ jobs:
6575 - compiler: ghc-8.8.4
6676 compilerKind: ghc
6777 compilerVersion: 8.8.4
68− setup-method: hvr-ppa
69− allow-failure: false
70− - compiler: ghc-8.6.4
71− compilerKind: ghc
72− compilerVersion: 8.6.4
73− setup-method: hvr-ppa
74− allow-failure: false
75− - compiler: ghc-8.4.4
76− compilerKind: ghc
77− compilerVersion: 8.4.4
78− setup-method: hvr-ppa
79− allow-failure: false
80− - compiler: ghc-8.2.2
81− compilerKind: ghc
82− compilerVersion: 8.2.2
83− setup-method: hvr-ppa
84− allow-failure: false
85− - compiler: ghc-8.0.2
86− compilerKind: ghc
87− compilerVersion: 8.0.2
88− setup-method: hvr-ppa
89− allow-failure: false
90− - compiler: ghc-7.10.3
91− compilerKind: ghc
92− compilerVersion: 7.10.3
93− setup-method: hvr-ppa
94− allow-failure: false
95− - compiler: ghc-7.8.4
96− compilerKind: ghc
97− compilerVersion: 7.8.4
98− setup-method: hvr-ppa
99− allow-failure: false
100− - compiler: ghc-7.6.3
101− compilerKind: ghc
102− compilerVersion: 7.6.3
103− setup-method: hvr-ppa
78+ setup-method: ghcup
10479 allow-failure: false
105− - compiler: ghc-7.4.2
80+ - compiler: ghc-8.6.5
10681 compilerKind: ghc
107− compilerVersion: 7.4.2
108− setup-method: hvr-ppa
82+ compilerVersion: 8.6.5
83+ setup-method: ghcup
10984 allow-failure: false
11085 fail-fast: false
11186 steps:
112− - name: apt
87+ - name: apt-get install
11388 run: |
11489 apt-get update
11590 apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
116− if [ "${{ matrix.setup-method }}" = ghcup ]; then
117− mkdir -p "$HOME/.ghcup/bin"
118− curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
119− chmod a+x "$HOME/.ghcup/bin/ghcup"
120− "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
121− "$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
122− else
123− apt-add-repository -y 'ppa:hvr/ghc'
124− apt-get update
125− apt-get install -y "$HCNAME"
126− mkdir -p "$HOME/.ghcup/bin"
127− curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
128− chmod a+x "$HOME/.ghcup/bin/ghcup"
129− "$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
130− fi
91+ - name: Install GHCup
92+ run: |
93+ mkdir -p "$HOME/.ghcup/bin"
94+ curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup"
95+ chmod a+x "$HOME/.ghcup/bin/ghcup"
96+ - name: Install cabal-install
97+ run: |
98+ "$HOME/.ghcup/bin/ghcup" install cabal 3.14.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
99+ echo "CABAL=$HOME/.ghcup/bin/cabal-3.14.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
100+ - name: Install GHC (GHCup)
101+ if: matrix.setup-method == 'ghcup'
102+ run: |
103+ "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
104+ HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
105+ HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
106+ HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
107+ echo "HC=$HC" >> "$GITHUB_ENV"
108+ echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
109+ echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
131110 env:
132111 HCKIND: ${{ matrix.compilerKind }}
133112 HCNAME: ${{ matrix.compiler }}
@@ -138,30 +117,12 @@ jobs:
138117 echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
139118 echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
140119 echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
141− HCDIR=/opt/$HCKIND/$HCVER
142− if [ "${{ matrix.setup-method }}" = ghcup ]; then
143− HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
144− HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
145− HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
146− echo "HC=$HC" >> "$GITHUB_ENV"
147− echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
148− echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
149− echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
150− else
151− HC=$HCDIR/bin/$HCKIND
152− echo "HC=$HC" >> "$GITHUB_ENV"
153− echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
154− echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
155− echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
156− fi
157−
158120 HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
159121 echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
160122 echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
161123 echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
162124 echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
163125 echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
164− echo "GHCJSARITH=0" >> "$GITHUB_ENV"
165126 env:
166127 HCKIND: ${{ matrix.compilerKind }}
167128 HCNAME: ${{ matrix.compiler }}
@@ -211,7 +172,7 @@ jobs:
211172 chmod a+x $HOME/.cabal/bin/cabal-plan
212173 cabal-plan --version
213174 - name: checkout
214− uses: actions/checkout@v3
175+ uses: actions/checkout@v4
215176 with:
216177 path: source
217178 - name: initial cabal.project for sdist
@@ -239,13 +200,13 @@ jobs:
239200 touch cabal.project.local
240201 echo "packages: ${PKGDIR_uuid_types}" >> cabal.project
241202 echo "packages: ${PKGDIR_uuid}" >> cabal.project
242− if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package uuid-types" >> cabal.project ; fi
243− if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
244− if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package uuid" >> cabal.project ; fi
245− if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
203+ echo "package uuid-types" >> cabal.project
204+ echo " ghc-options: -Werror=missing-methods" >> cabal.project
205+ echo "package uuid" >> cabal.project
206+ echo " ghc-options: -Werror=missing-methods" >> cabal.project
246207 cat >> cabal.project <<EOF
247208 EOF
248− $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(uuid|uuid-types)$/; }' >> cabal.project.local
209+ $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(uuid|uuid-types)$/; }' >> cabal.project.local
249210 cat cabal.project
250211 cat cabal.project.local
251212 - name: dump install plan
@@ -253,7 +214,7 @@ jobs:
253214 $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
254215 cabal-plan
255216 - name: restore cache
256− uses: actions/cache/restore@v3
217+ uses: actions/cache/restore@v4
257218 with:
258219 key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
259220 path: ~/.cabal/store
@@ -289,19 +250,13 @@ jobs:
289250 rm -f cabal.project.local
290251 - name: constraint set random-1.2
291252 run: |
292− if [ $((HCNUMVER >= 71000)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.2.*' all --dry-run ; fi
293− if [ $((HCNUMVER >= 71000)) -ne 0 ] ; then cabal-plan topo | sort ; fi
294− if [ $((HCNUMVER >= 71000)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.2.*' --dependencies-only -j2 all ; fi
295− if [ $((HCNUMVER >= 71000)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.2.*' all ; fi
296− - name: constraint set random-1.1
297− run: |
298− if [ $((HCNUMVER < 90800)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.1.*' all --dry-run ; fi
299− if [ $((HCNUMVER < 90800)) -ne 0 ] ; then cabal-plan topo | sort ; fi
300− if [ $((HCNUMVER < 90800)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.1.*' --dependencies-only -j2 all ; fi
301− if [ $((HCNUMVER < 90800)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.1.*' all ; fi
253+ $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.2.*' all --dry-run
254+ cabal-plan topo | sort
255+ $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.2.*' --dependencies-only -j2 all
256+ $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.2.*' all
302257 - name: save cache
303− uses: actions/cache/save@v3
304258 if: always()
259+ uses: actions/cache/save@v4
305260 with:
306261 key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
307262 path: ~/.cabal/store