@@ -8,9 +8,9 @@
88#
99# For more information, see https://github.com/haskell-CI/haskell-ci
1010#
11−# version: 0.15.20220808
11+# version: 0.19.20241223
1212#
13−# REGENDATA ("0.15.20220808",["github","cabal.project"])
13+# REGENDATA ("0.19.20241223",["github","cabal.project"])
1414#
1515name: Haskell-CI
1616on:
@@ -27,97 +27,86 @@ 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.4.1
35+ - compiler: ghc-9.12.1
3636 compilerKind: ghc
37− compilerVersion: 9.4.1
37+ compilerVersion: 9.12.1
3838 setup-method: ghcup
3939 allow-failure: false
40− - compiler: ghc-9.2.4
40+ - compiler: ghc-9.10.1
4141 compilerKind: ghc
42− compilerVersion: 9.2.4
42+ compilerVersion: 9.10.1
4343 setup-method: ghcup
4444 allow-failure: false
45− - compiler: ghc-9.0.2
45+ - compiler: ghc-9.8.4
4646 compilerKind: ghc
47− compilerVersion: 9.0.2
47+ compilerVersion: 9.8.4
4848 setup-method: ghcup
4949 allow-failure: false
50− - compiler: ghc-8.10.7
50+ - compiler: ghc-9.6.6
5151 compilerKind: ghc
52− compilerVersion: 8.10.7
52+ compilerVersion: 9.6.6
5353 setup-method: ghcup
5454 allow-failure: false
55− - compiler: ghc-8.8.4
56− compilerKind: ghc
57− compilerVersion: 8.8.4
58− setup-method: hvr-ppa
59− allow-failure: false
60− - compiler: ghc-8.6.4
55+ - compiler: ghc-9.4.8
6156 compilerKind: ghc
62− compilerVersion: 8.6.4
63− setup-method: hvr-ppa
64− allow-failure: false
65− - compiler: ghc-8.4.4
66− compilerKind: ghc
67− compilerVersion: 8.4.4
68− setup-method: hvr-ppa
69− allow-failure: false
70− - compiler: ghc-8.2.2
71− compilerKind: ghc
72− compilerVersion: 8.2.2
73− setup-method: hvr-ppa
57+ compilerVersion: 9.4.8
58+ setup-method: ghcup
7459 allow-failure: false
75− - compiler: ghc-8.0.2
60+ - compiler: ghc-9.2.8
7661 compilerKind: ghc
77− compilerVersion: 8.0.2
78− setup-method: hvr-ppa
62+ compilerVersion: 9.2.8
63+ setup-method: ghcup
7964 allow-failure: false
80− - compiler: ghc-7.10.3
65+ - compiler: ghc-9.0.2
8166 compilerKind: ghc
82− compilerVersion: 7.10.3
83− setup-method: hvr-ppa
67+ compilerVersion: 9.0.2
68+ setup-method: ghcup
8469 allow-failure: false
85− - compiler: ghc-7.8.4
70+ - compiler: ghc-8.10.7
8671 compilerKind: ghc
87− compilerVersion: 7.8.4
88− setup-method: hvr-ppa
72+ compilerVersion: 8.10.7
73+ setup-method: ghcup
8974 allow-failure: false
90− - compiler: ghc-7.6.3
75+ - compiler: ghc-8.8.4
9176 compilerKind: ghc
92− compilerVersion: 7.6.3
93− setup-method: hvr-ppa
77+ compilerVersion: 8.8.4
78+ setup-method: ghcup
9479 allow-failure: false
95− - compiler: ghc-7.4.2
80+ - compiler: ghc-8.6.5
9681 compilerKind: ghc
97− compilerVersion: 7.4.2
98− setup-method: hvr-ppa
82+ compilerVersion: 8.6.5
83+ setup-method: ghcup
9984 allow-failure: false
10085 fail-fast: false
10186 steps:
102− - name: apt
87+ - name: apt-get install
10388 run: |
10489 apt-get update
10590 apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
106− if [ "${{ matrix.setup-method }}" = ghcup ]; then
107− mkdir -p "$HOME/.ghcup/bin"
108− curl -sL https://downloads.haskell.org/ghcup/0.1.18.0/x86_64-linux-ghcup-0.1.18.0 > "$HOME/.ghcup/bin/ghcup"
109− chmod a+x "$HOME/.ghcup/bin/ghcup"
110− "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
111− "$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
112− else
113− apt-add-repository -y 'ppa:hvr/ghc'
114− apt-get update
115− apt-get install -y "$HCNAME"
116− mkdir -p "$HOME/.ghcup/bin"
117− curl -sL https://downloads.haskell.org/ghcup/0.1.18.0/x86_64-linux-ghcup-0.1.18.0 > "$HOME/.ghcup/bin/ghcup"
118− chmod a+x "$HOME/.ghcup/bin/ghcup"
119− "$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
120− 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"
121110 env:
122111 HCKIND: ${{ matrix.compilerKind }}
123112 HCNAME: ${{ matrix.compiler }}
@@ -128,28 +117,12 @@ jobs:
128117 echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
129118 echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
130119 echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
131− HCDIR=/opt/$HCKIND/$HCVER
132− if [ "${{ matrix.setup-method }}" = ghcup ]; then
133− HC=$HOME/.ghcup/bin/$HCKIND-$HCVER
134− echo "HC=$HC" >> "$GITHUB_ENV"
135− echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV"
136− echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV"
137− echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
138− else
139− HC=$HCDIR/bin/$HCKIND
140− echo "HC=$HC" >> "$GITHUB_ENV"
141− echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
142− echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
143− echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
144− fi
145−
146120 HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
147121 echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
148122 echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
149123 echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
150124 echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
151125 echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
152− echo "GHCJSARITH=0" >> "$GITHUB_ENV"
153126 env:
154127 HCKIND: ${{ matrix.compilerKind }}
155128 HCNAME: ${{ matrix.compiler }}
@@ -192,21 +165,21 @@ jobs:
192165 - name: install cabal-plan
193166 run: |
194167 mkdir -p $HOME/.cabal/bin
195− curl -sL https://github.com/haskell-hvr/cabal-plan/releases/download/v0.6.2.0/cabal-plan-0.6.2.0-x86_64-linux.xz > cabal-plan.xz
196− echo 'de73600b1836d3f55e32d80385acc055fd97f60eaa0ab68a755302685f5d81bc cabal-plan.xz' | sha256sum -c -
168+ curl -sL https://github.com/haskell-hvr/cabal-plan/releases/download/v0.7.3.0/cabal-plan-0.7.3.0-x86_64-linux.xz > cabal-plan.xz
169+ echo 'f62ccb2971567a5f638f2005ad3173dba14693a45154c1508645c52289714cb2 cabal-plan.xz' | sha256sum -c -
197170 xz -d < cabal-plan.xz > $HOME/.cabal/bin/cabal-plan
198171 rm -f cabal-plan.xz
199172 chmod a+x $HOME/.cabal/bin/cabal-plan
200173 cabal-plan --version
201174 - name: checkout
202− uses: actions/checkout@v2
175+ uses: actions/checkout@v4
203176 with:
204177 path: source
205178 - name: initial cabal.project for sdist
206179 run: |
207180 touch cabal.project
208181 echo "packages: $GITHUB_WORKSPACE/source/uuid-types" >> cabal.project
209− if [ $((HCNUMVER < 90200)) -ne 0 ] ; then echo "packages: $GITHUB_WORKSPACE/source/uuid" >> cabal.project ; fi
182+ echo "packages: $GITHUB_WORKSPACE/source/uuid" >> cabal.project
210183 cat cabal.project
211184 - name: sdist
212185 run: |
@@ -226,22 +199,22 @@ jobs:
226199 touch cabal.project
227200 touch cabal.project.local
228201 echo "packages: ${PKGDIR_uuid_types}" >> cabal.project
229− if [ $((HCNUMVER < 90200)) -ne 0 ] ; then echo "packages: ${PKGDIR_uuid}" >> cabal.project ; fi
230− if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package uuid-types" >> cabal.project ; fi
231− if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
232− if [ $((HCNUMVER >= 80200 && HCNUMVER < 90200)) -ne 0 ] ; then echo "package uuid" >> cabal.project ; fi
233− if [ $((HCNUMVER >= 80200 && HCNUMVER < 90200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
202+ echo "packages: ${PKGDIR_uuid}" >> cabal.project
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
234207 cat >> cabal.project <<EOF
235208 EOF
236− $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
237210 cat cabal.project
238211 cat cabal.project.local
239212 - name: dump install plan
240213 run: |
241214 $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
242215 cabal-plan
243− - name: cache
244− uses: actions/cache@v2
216+ - name: restore cache
217+ uses: actions/cache/restore@v4
245218 with:
246219 key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
247220 path: ~/.cabal/store
@@ -263,11 +236,11 @@ jobs:
263236 run: |
264237 cd ${PKGDIR_uuid_types} || false
265238 ${CABAL} -vnormal check
266− if [ $((HCNUMVER < 90200)) -ne 0 ] ; then cd ${PKGDIR_uuid} || false ; fi
267− if [ $((HCNUMVER < 90200)) -ne 0 ] ; then ${CABAL} -vnormal check ; fi
239+ cd ${PKGDIR_uuid} || false
240+ ${CABAL} -vnormal check
268241 - name: haddock
269242 run: |
270− $CABAL v2-haddock --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
243+ $CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
271244 - name: unconstrained build
272245 run: |
273246 rm -f cabal.project.local
@@ -277,9 +250,13 @@ jobs:
277250 rm -f cabal.project.local
278251 - name: constraint set random-1.2
279252 run: |
280− if [ $((HCNUMVER >= 71000)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.2.*' --dependencies-only -j2 all ; fi
281− if [ $((HCNUMVER >= 71000)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.2.*' all ; fi
282− - name: constraint set random-1.1
283− run: |
284− $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.1.*' --dependencies-only -j2 all
285− $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.1.*' all
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
257+ - name: save cache
258+ if: always()
259+ uses: actions/cache/save@v4
260+ with:
261+ key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
262+ path: ~/.cabal/store