@@ -8,9 +8,9 @@
9# For more information, see https://github.com/haskell-CI/haskell-ci
9# For more information, see https://github.com/haskell-CI/haskell-ci
11−# version: 0.19.20240402
11+# version: 0.19.20240514
13−# REGENDATA ("0.19.20240402",["github","cabal.project"])
13+# REGENDATA ("0.19.20240514",["github","cabal.project"])
15name: Haskell-CI
15name: Haskell-CI
@@ -27,19 +27,24 @@ jobs:
27 timeout-minutes:
27 timeout-minutes:
29 container:
29 container:
30− image: buildpack-deps:bionic
30+ image: buildpack-deps:jammy
31 continue-on-error: ${{ matrix.allow-failure }}
31 continue-on-error: ${{ matrix.allow-failure }}
35+ - compiler: ghc-9.10.1
37+ compilerVersion: 9.10.1
35 - compiler: ghc-9.8.2
40 - compiler: ghc-9.8.2
36 compilerKind: ghc
41 compilerKind: ghc
37 compilerVersion: 9.8.2
42 compilerVersion: 9.8.2
38 setup-method: ghcup
43 setup-method: ghcup
39 allow-failure: false
44 allow-failure: false
40− - compiler: ghc-9.6.4
45+ - compiler: ghc-9.6.5
41 compilerKind: ghc
46 compilerKind: ghc
42− compilerVersion: 9.6.4
47+ compilerVersion: 9.6.5
43 setup-method: ghcup
48 setup-method: ghcup
44 allow-failure: false
49 allow-failure: false
45 - compiler: ghc-9.4.8
50 - compiler: ghc-9.4.8
@@ -65,47 +70,12 @@ jobs:
65 - compiler: ghc-8.8.4
70 - compiler: ghc-8.8.4
66 compilerKind: ghc
71 compilerKind: ghc
67 compilerVersion: 8.8.4
72 compilerVersion: 8.8.4
68− setup-method: hvr-ppa
73+ setup-method: ghcup
70− - compiler: ghc-8.6.4
72− compilerVersion: 8.6.4
73− setup-method: hvr-ppa
75− - compiler: ghc-8.4.4
77− compilerVersion: 8.4.4
78− setup-method: hvr-ppa
80− - compiler: ghc-8.2.2
82− compilerVersion: 8.2.2
83− setup-method: hvr-ppa
85− - compiler: ghc-8.0.2
87− compilerVersion: 8.0.2
88− setup-method: hvr-ppa
90− - compiler: ghc-7.10.3
92− compilerVersion: 7.10.3
93− setup-method: hvr-ppa
95− - compiler: ghc-7.8.4
97− compilerVersion: 7.8.4
98− setup-method: hvr-ppa
100− - compiler: ghc-7.6.3
102− compilerVersion: 7.6.3
103− setup-method: hvr-ppa
104 allow-failure: false
74 allow-failure: false
105− - compiler: ghc-7.4.2
75+ - compiler: ghc-8.6.5
106 compilerKind: ghc
76 compilerKind: ghc
107− compilerVersion: 7.4.2
77+ compilerVersion: 8.6.5
108− setup-method: hvr-ppa
78+ setup-method: ghcup
109 allow-failure: false
79 allow-failure: false
110 fail-fast: false
80 fail-fast: false
@@ -113,23 +83,11 @@ jobs:
114 apt-get update
84 apt-get update
115 apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
85 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"
86+ mkdir -p "$HOME/.ghcup/bin"
118− curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
87+ curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
119− chmod a+x "$HOME/.ghcup/bin/ghcup"
88+ chmod a+x "$HOME/.ghcup/bin/ghcup"
120− "$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml;
121− "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
89+ "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
122− "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
124− apt-add-repository -y 'ppa:hvr/ghc'
126− apt-get install -y "$HCNAME"
127− mkdir -p "$HOME/.ghcup/bin"
128− curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
129− chmod a+x "$HOME/.ghcup/bin/ghcup"
130− "$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml;
131− "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
90+ "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
134 HCKIND: ${{ matrix.compilerKind }}
92 HCKIND: ${{ matrix.compilerKind }}
135 HCNAME: ${{ matrix.compiler }}
93 HCNAME: ${{ matrix.compiler }}
@@ -141,22 +99,13 @@ jobs:
141 echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
99 echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
142 echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
100 echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
143 HCDIR=/opt/$HCKIND/$HCVER
101 HCDIR=/opt/$HCKIND/$HCVER
144− if [ "${{ matrix.setup-method }}" = ghcup ]; then
145− HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
102+ HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
146− HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
103+ HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
147− HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
104+ HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
148− echo "HC=$HC" >> "$GITHUB_ENV"
105+ echo "HC=$HC" >> "$GITHUB_ENV"
149− echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
106+ echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
150− echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
107+ echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
151− echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
153− HC=$HCDIR/bin/$HCKIND
154− echo "HC=$HC" >> "$GITHUB_ENV"
155− echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
156− echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
157− echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
108+ echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
160 HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
109 HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
161 echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
110 echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
162 echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
111 echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
@@ -213,14 +162,14 @@ jobs:
213 chmod a+x $HOME/.cabal/bin/cabal-plan
162 chmod a+x $HOME/.cabal/bin/cabal-plan
214 cabal-plan --version
163 cabal-plan --version
215 - name: checkout
164 - name: checkout
216− uses: actions/checkout@v3
165+ uses: actions/checkout@v4
218 path: source
167 path: source
219 - name: initial cabal.project for sdist
168 - name: initial cabal.project for sdist
221 touch cabal.project
170 touch cabal.project
222 echo "packages: $GITHUB_WORKSPACE/source/uuid-types" >> cabal.project
171 echo "packages: $GITHUB_WORKSPACE/source/uuid-types" >> cabal.project
223− echo "packages: $GITHUB_WORKSPACE/source/uuid" >> cabal.project
172+ if [ $((HCNUMVER < 91000)) -ne 0 ] ; then echo "packages: $GITHUB_WORKSPACE/source/uuid" >> cabal.project ; fi
224 cat cabal.project
173 cat cabal.project
225 - name: sdist
174 - name: sdist
@@ -240,14 +189,14 @@ jobs:
240 touch cabal.project
189 touch cabal.project
241 touch cabal.project.local
190 touch cabal.project.local
242 echo "packages: ${PKGDIR_uuid_types}" >> cabal.project
191 echo "packages: ${PKGDIR_uuid_types}" >> cabal.project
243− echo "packages: ${PKGDIR_uuid}" >> cabal.project
192+ if [ $((HCNUMVER < 91000)) -ne 0 ] ; then echo "packages: ${PKGDIR_uuid}" >> cabal.project ; fi
244− if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package uuid-types" >> cabal.project ; fi
193+ echo "package uuid-types" >> cabal.project
245− if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
194+ echo " ghc-options: -Werror=missing-methods" >> cabal.project
246− if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package uuid" >> cabal.project ; fi
195+ if [ $((HCNUMVER < 91000)) -ne 0 ] ; then echo "package uuid" >> cabal.project ; fi
247− if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
196+ if [ $((HCNUMVER < 91000)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
248 cat >> cabal.project <<EOF
197 cat >> cabal.project <<EOF
250− $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(uuid|uuid-types)$/; }' >> cabal.project.local
199+ $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(uuid|uuid-types)$/; }' >> cabal.project.local
251 cat cabal.project
200 cat cabal.project
252 cat cabal.project.local
201 cat cabal.project.local
253 - name: dump install plan
202 - name: dump install plan
@@ -255,7 +204,7 @@ jobs:
255 $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
204 $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
256 cabal-plan
205 cabal-plan
257 - name: restore cache
206 - name: restore cache
258− uses: actions/cache/restore@v3
207+ uses: actions/cache/restore@v4
260 key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
209 key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
261 path: ~/.cabal/store
210 path: ~/.cabal/store
@@ -277,8 +226,8 @@ jobs:
278 cd ${PKGDIR_uuid_types} || false
227 cd ${PKGDIR_uuid_types} || false
279 ${CABAL} -vnormal check
228 ${CABAL} -vnormal check
280− cd ${PKGDIR_uuid} || false
229+ if [ $((HCNUMVER < 91000)) -ne 0 ] ; then cd ${PKGDIR_uuid} || false ; fi
281− ${CABAL} -vnormal check
230+ if [ $((HCNUMVER < 91000)) -ne 0 ] ; then ${CABAL} -vnormal check ; fi
282 - name: haddock
231 - name: haddock
284 $CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
233 $CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
@@ -291,18 +240,12 @@ jobs:
291 rm -f cabal.project.local
240 rm -f cabal.project.local
292 - name: constraint set random-1.2
241 - name: constraint set random-1.2
294− if [ $((HCNUMVER >= 71000)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.2.*' all --dry-run ; fi
243+ $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.2.*' all --dry-run
295− if [ $((HCNUMVER >= 71000)) -ne 0 ] ; then cabal-plan topo | sort ; fi
244+ cabal-plan topo | sort
296− if [ $((HCNUMVER >= 71000)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.2.*' --dependencies-only -j2 all ; fi
245+ $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.2.*' --dependencies-only -j2 all
297− if [ $((HCNUMVER >= 71000)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.2.*' all ; fi
246+ $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.2.*' all
298− - name: constraint set random-1.1
300− if [ $((HCNUMVER < 90800)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.1.*' all --dry-run ; fi
301− if [ $((HCNUMVER < 90800)) -ne 0 ] ; then cabal-plan topo | sort ; fi
302− if [ $((HCNUMVER < 90800)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.1.*' --dependencies-only -j2 all ; fi
303− if [ $((HCNUMVER < 90800)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.1.*' all ; fi
304 - name: save cache
247 - name: save cache
305− uses: actions/cache/save@v3
248+ uses: actions/cache/save@v4
306 if: always()
249 if: always()
308 key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
251 key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}