@@ -8,9 +8,9 @@
88#
99# For more information, see https://github.com/haskell-CI/haskell-ci
1010#
11−# version: 0.13.20211030
11+# version: 0.19.20241223
1212#
13−# REGENDATA ("0.13.20211030",["github","cabal.project"])
13+# REGENDATA ("0.19.20241223",["github","cabal.project"])
1414#
1515name: Haskell-CI
1616on:
@@ -23,94 +23,90 @@ on:
2323jobs:
2424 linux:
2525 name: Haskell-CI - Linux - ${{ matrix.compiler }}
26− runs-on: ubuntu-18.04
26+ runs-on: ubuntu-20.04
27+ timeout-minutes:
28+ 60
2729 container:
28− image: buildpack-deps:bionic
30+ image: buildpack-deps:jammy
2931 continue-on-error: ${{ matrix.allow-failure }}
3032 strategy:
3133 matrix:
3234 include:
33− - compiler: ghc-9.2.1
35+ - compiler: ghc-9.12.1
3436 compilerKind: ghc
35− compilerVersion: 9.2.1
37+ compilerVersion: 9.12.1
3638 setup-method: ghcup
3739 allow-failure: false
38− - compiler: ghc-9.0.1
40+ - compiler: ghc-9.10.1
3941 compilerKind: ghc
40− compilerVersion: 9.0.1
41− setup-method: hvr-ppa
42− allow-failure: false
43− - compiler: ghc-8.10.7
44− compilerKind: ghc
45− compilerVersion: 8.10.7
42+ compilerVersion: 9.10.1
4643 setup-method: ghcup
4744 allow-failure: false
48− - compiler: ghc-8.8.4
49− compilerKind: ghc
50− compilerVersion: 8.8.4
51− setup-method: hvr-ppa
52− allow-failure: false
53− - compiler: ghc-8.6.4
45+ - compiler: ghc-9.8.4
5446 compilerKind: ghc
55− compilerVersion: 8.6.4
56− setup-method: hvr-ppa
47+ compilerVersion: 9.8.4
48+ setup-method: ghcup
5749 allow-failure: false
58− - compiler: ghc-8.4.4
50+ - compiler: ghc-9.6.6
5951 compilerKind: ghc
60− compilerVersion: 8.4.4
61− setup-method: hvr-ppa
52+ compilerVersion: 9.6.6
53+ setup-method: ghcup
6254 allow-failure: false
63− - compiler: ghc-8.2.2
55+ - compiler: ghc-9.4.8
6456 compilerKind: ghc
65− compilerVersion: 8.2.2
66− setup-method: hvr-ppa
57+ compilerVersion: 9.4.8
58+ setup-method: ghcup
6759 allow-failure: false
68− - compiler: ghc-8.0.2
60+ - compiler: ghc-9.2.8
6961 compilerKind: ghc
70− compilerVersion: 8.0.2
71− setup-method: hvr-ppa
62+ compilerVersion: 9.2.8
63+ setup-method: ghcup
7264 allow-failure: false
73− - compiler: ghc-7.10.3
65+ - compiler: ghc-9.0.2
7466 compilerKind: ghc
75− compilerVersion: 7.10.3
76− setup-method: hvr-ppa
67+ compilerVersion: 9.0.2
68+ setup-method: ghcup
7769 allow-failure: false
78− - compiler: ghc-7.8.4
70+ - compiler: ghc-8.10.7
7971 compilerKind: ghc
80− compilerVersion: 7.8.4
81− setup-method: hvr-ppa
72+ compilerVersion: 8.10.7
73+ setup-method: ghcup
8274 allow-failure: false
83− - compiler: ghc-7.6.3
75+ - compiler: ghc-8.8.4
8476 compilerKind: ghc
85− compilerVersion: 7.6.3
86− setup-method: hvr-ppa
77+ compilerVersion: 8.8.4
78+ setup-method: ghcup
8779 allow-failure: false
88− - compiler: ghc-7.4.2
80+ - compiler: ghc-8.6.5
8981 compilerKind: ghc
90− compilerVersion: 7.4.2
91− setup-method: hvr-ppa
82+ compilerVersion: 8.6.5
83+ setup-method: ghcup
9284 allow-failure: false
9385 fail-fast: false
9486 steps:
95− - name: apt
87+ - name: apt-get install
9688 run: |
9789 apt-get update
9890 apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
99− if [ "${{ matrix.setup-method }}" = ghcup ]; then
100− mkdir -p "$HOME/.ghcup/bin"
101− curl -sL https://downloads.haskell.org/ghcup/0.1.17.3/x86_64-linux-ghcup-0.1.17.3 > "$HOME/.ghcup/bin/ghcup"
102− chmod a+x "$HOME/.ghcup/bin/ghcup"
103− "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER"
104− "$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0
105− else
106− apt-add-repository -y 'ppa:hvr/ghc'
107− apt-get update
108− apt-get install -y "$HCNAME"
109− mkdir -p "$HOME/.ghcup/bin"
110− curl -sL https://downloads.haskell.org/ghcup/0.1.17.3/x86_64-linux-ghcup-0.1.17.3 > "$HOME/.ghcup/bin/ghcup"
111− chmod a+x "$HOME/.ghcup/bin/ghcup"
112− "$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0
113− 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"
114110 env:
115111 HCKIND: ${{ matrix.compilerKind }}
116112 HCNAME: ${{ matrix.compiler }}
@@ -121,28 +117,12 @@ jobs:
121117 echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
122118 echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
123119 echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
124− HCDIR=/opt/$HCKIND/$HCVER
125− if [ "${{ matrix.setup-method }}" = ghcup ]; then
126− HC=$HOME/.ghcup/bin/$HCKIND-$HCVER
127− echo "HC=$HC" >> "$GITHUB_ENV"
128− echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV"
129− echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV"
130− echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
131− else
132− HC=$HCDIR/bin/$HCKIND
133− echo "HC=$HC" >> "$GITHUB_ENV"
134− echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
135− echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
136− echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
137− fi
138−
139120 HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
140121 echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
141122 echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
142123 echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
143124 echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
144125 echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
145− echo "GHCJSARITH=0" >> "$GITHUB_ENV"
146126 env:
147127 HCKIND: ${{ matrix.compilerKind }}
148128 HCNAME: ${{ matrix.compiler }}
@@ -169,6 +149,10 @@ jobs:
169149 repository hackage.haskell.org
170150 url: http://hackage.haskell.org/
171151 EOF
152+ cat >> $CABAL_CONFIG <<EOF
153+ program-default-options
154+ ghc-options: $GHCJOBS +RTS -M3G -RTS
155+ EOF
172156 cat $CABAL_CONFIG
173157 - name: versions
174158 run: |
@@ -181,21 +165,21 @@ jobs:
181165 - name: install cabal-plan
182166 run: |
183167 mkdir -p $HOME/.cabal/bin
184− 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
185− 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 -
186170 xz -d < cabal-plan.xz > $HOME/.cabal/bin/cabal-plan
187171 rm -f cabal-plan.xz
188172 chmod a+x $HOME/.cabal/bin/cabal-plan
189173 cabal-plan --version
190174 - name: checkout
191− uses: actions/checkout@v2
175+ uses: actions/checkout@v4
192176 with:
193177 path: source
194178 - name: initial cabal.project for sdist
195179 run: |
196180 touch cabal.project
197181 echo "packages: $GITHUB_WORKSPACE/source/uuid-types" >> cabal.project
198− if [ $((HCNUMVER < 90200)) -ne 0 ] ; then echo "packages: $GITHUB_WORKSPACE/source/uuid" >> cabal.project ; fi
182+ echo "packages: $GITHUB_WORKSPACE/source/uuid" >> cabal.project
199183 cat cabal.project
200184 - name: sdist
201185 run: |
@@ -215,22 +199,22 @@ jobs:
215199 touch cabal.project
216200 touch cabal.project.local
217201 echo "packages: ${PKGDIR_uuid_types}" >> cabal.project
218− if [ $((HCNUMVER < 90200)) -ne 0 ] ; then echo "packages: ${PKGDIR_uuid}" >> cabal.project ; fi
219− if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package uuid-types" >> cabal.project ; fi
220− if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
221− if [ $((HCNUMVER >= 80200 && HCNUMVER < 90200)) -ne 0 ] ; then echo "package uuid" >> cabal.project ; fi
222− 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
223207 cat >> cabal.project <<EOF
224208 EOF
225− $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
226210 cat cabal.project
227211 cat cabal.project.local
228212 - name: dump install plan
229213 run: |
230214 $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
231215 cabal-plan
232− - name: cache
233− uses: actions/cache@v2
216+ - name: restore cache
217+ uses: actions/cache/restore@v4
234218 with:
235219 key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
236220 path: ~/.cabal/store
@@ -252,11 +236,11 @@ jobs:
252236 run: |
253237 cd ${PKGDIR_uuid_types} || false
254238 ${CABAL} -vnormal check
255− if [ $((HCNUMVER < 90200)) -ne 0 ] ; then cd ${PKGDIR_uuid} || false ; fi
256− if [ $((HCNUMVER < 90200)) -ne 0 ] ; then ${CABAL} -vnormal check ; fi
239+ cd ${PKGDIR_uuid} || false
240+ ${CABAL} -vnormal check
257241 - name: haddock
258242 run: |
259− $CABAL v2-haddock $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
260244 - name: unconstrained build
261245 run: |
262246 rm -f cabal.project.local
@@ -266,9 +250,13 @@ jobs:
266250 rm -f cabal.project.local
267251 - name: constraint set random-1.2
268252 run: |
269− if [ $((HCNUMVER >= 71000)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.2.*' --dependencies-only -j2 all ; fi
270− if [ $((HCNUMVER >= 71000)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.2.*' all ; fi
271− - name: constraint set random-1.1
272− run: |
273− $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.1.*' --dependencies-only -j2 all
274− $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