@@ -8,9 +8,9 @@
88#
99# For more information, see https://github.com/haskell-CI/haskell-ci
1010#
11−# version: 0.19.20241223
11+# version: 0.13.20211030
1212#
13−# REGENDATA ("0.19.20241223",["github","cabal.project"])
13+# REGENDATA ("0.13.20211030",["github","cabal.project"])
1414#
1515name: Haskell-CI
1616on:
@@ -23,90 +23,94 @@ on:
2323jobs:
2424 linux:
2525 name: Haskell-CI - Linux - ${{ matrix.compiler }}
26− runs-on: ubuntu-20.04
27− timeout-minutes:
28− 60
26+ runs-on: ubuntu-18.04
2927 container:
30− image: buildpack-deps:jammy
28+ image: buildpack-deps:bionic
3129 continue-on-error: ${{ matrix.allow-failure }}
3230 strategy:
3331 matrix:
3432 include:
35− - compiler: ghc-9.12.1
33+ - compiler: ghc-9.2.1
3634 compilerKind: ghc
37− compilerVersion: 9.12.1
35+ compilerVersion: 9.2.1
3836 setup-method: ghcup
3937 allow-failure: false
40− - compiler: ghc-9.10.1
38+ - compiler: ghc-9.0.1
4139 compilerKind: ghc
42− compilerVersion: 9.10.1
43− setup-method: ghcup
40+ compilerVersion: 9.0.1
41+ setup-method: hvr-ppa
4442 allow-failure: false
45− - compiler: ghc-9.8.4
43+ - compiler: ghc-8.10.7
4644 compilerKind: ghc
47− compilerVersion: 9.8.4
45+ compilerVersion: 8.10.7
4846 setup-method: ghcup
4947 allow-failure: false
50− - compiler: ghc-9.6.6
48+ - compiler: ghc-8.8.4
5149 compilerKind: ghc
52− compilerVersion: 9.6.6
53− setup-method: ghcup
50+ compilerVersion: 8.8.4
51+ setup-method: hvr-ppa
5452 allow-failure: false
55− - compiler: ghc-9.4.8
53+ - compiler: ghc-8.6.4
5654 compilerKind: ghc
57− compilerVersion: 9.4.8
58− setup-method: ghcup
55+ compilerVersion: 8.6.4
56+ setup-method: hvr-ppa
5957 allow-failure: false
60− - compiler: ghc-9.2.8
58+ - compiler: ghc-8.4.4
6159 compilerKind: ghc
62− compilerVersion: 9.2.8
63− setup-method: ghcup
60+ compilerVersion: 8.4.4
61+ setup-method: hvr-ppa
6462 allow-failure: false
65− - compiler: ghc-9.0.2
63+ - compiler: ghc-8.2.2
6664 compilerKind: ghc
67− compilerVersion: 9.0.2
68− setup-method: ghcup
65+ compilerVersion: 8.2.2
66+ setup-method: hvr-ppa
6967 allow-failure: false
70− - compiler: ghc-8.10.7
68+ - compiler: ghc-8.0.2
7169 compilerKind: ghc
72− compilerVersion: 8.10.7
73− setup-method: ghcup
70+ compilerVersion: 8.0.2
71+ setup-method: hvr-ppa
7472 allow-failure: false
75− - compiler: ghc-8.8.4
73+ - compiler: ghc-7.10.3
7674 compilerKind: ghc
77− compilerVersion: 8.8.4
78− setup-method: ghcup
75+ compilerVersion: 7.10.3
76+ setup-method: hvr-ppa
7977 allow-failure: false
80− - compiler: ghc-8.6.5
78+ - compiler: ghc-7.8.4
8179 compilerKind: ghc
82− compilerVersion: 8.6.5
83− setup-method: ghcup
80+ compilerVersion: 7.8.4
81+ setup-method: hvr-ppa
82+ allow-failure: false
83+ - compiler: ghc-7.6.3
84+ compilerKind: ghc
85+ compilerVersion: 7.6.3
86+ setup-method: hvr-ppa
87+ allow-failure: false
88+ - compiler: ghc-7.4.2
89+ compilerKind: ghc
90+ compilerVersion: 7.4.2
91+ setup-method: hvr-ppa
8492 allow-failure: false
8593 fail-fast: false
8694 steps:
87− - name: apt-get install
95+ - name: apt
8896 run: |
8997 apt-get update
9098 apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
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"
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
110114 env:
111115 HCKIND: ${{ matrix.compilerKind }}
112116 HCNAME: ${{ matrix.compiler }}
@@ -117,12 +121,28 @@ jobs:
117121 echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
118122 echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
119123 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+
120139 HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
121140 echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
122141 echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
123142 echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
124143 echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
125144 echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
145+ echo "GHCJSARITH=0" >> "$GITHUB_ENV"
126146 env:
127147 HCKIND: ${{ matrix.compilerKind }}
128148 HCNAME: ${{ matrix.compiler }}
@@ -149,10 +169,6 @@ jobs:
149169 repository hackage.haskell.org
150170 url: http://hackage.haskell.org/
151171 EOF
152− cat >> $CABAL_CONFIG <<EOF
153− program-default-options
154− ghc-options: $GHCJOBS +RTS -M3G -RTS
155− EOF
156172 cat $CABAL_CONFIG
157173 - name: versions
158174 run: |
@@ -165,21 +181,21 @@ jobs:
165181 - name: install cabal-plan
166182 run: |
167183 mkdir -p $HOME/.cabal/bin
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 -
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 -
170186 xz -d < cabal-plan.xz > $HOME/.cabal/bin/cabal-plan
171187 rm -f cabal-plan.xz
172188 chmod a+x $HOME/.cabal/bin/cabal-plan
173189 cabal-plan --version
174190 - name: checkout
175− uses: actions/checkout@v4
191+ uses: actions/checkout@v2
176192 with:
177193 path: source
178194 - name: initial cabal.project for sdist
179195 run: |
180196 touch cabal.project
181197 echo "packages: $GITHUB_WORKSPACE/source/uuid-types" >> cabal.project
182− echo "packages: $GITHUB_WORKSPACE/source/uuid" >> cabal.project
198+ if [ $((HCNUMVER < 90200)) -ne 0 ] ; then echo "packages: $GITHUB_WORKSPACE/source/uuid" >> cabal.project ; fi
183199 cat cabal.project
184200 - name: sdist
185201 run: |
@@ -199,22 +215,22 @@ jobs:
199215 touch cabal.project
200216 touch cabal.project.local
201217 echo "packages: ${PKGDIR_uuid_types}" >> cabal.project
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
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
207223 cat >> cabal.project <<EOF
208224 EOF
209− $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(uuid|uuid-types)$/; }' >> cabal.project.local
225+ $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(uuid|uuid-types)$/; }' >> cabal.project.local
210226 cat cabal.project
211227 cat cabal.project.local
212228 - name: dump install plan
213229 run: |
214230 $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
215231 cabal-plan
216− - name: restore cache
217− uses: actions/cache/restore@v4
232+ - name: cache
233+ uses: actions/cache@v2
218234 with:
219235 key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
220236 path: ~/.cabal/store
@@ -236,11 +252,11 @@ jobs:
236252 run: |
237253 cd ${PKGDIR_uuid_types} || false
238254 ${CABAL} -vnormal check
239− cd ${PKGDIR_uuid} || false
240− ${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
241257 - name: haddock
242258 run: |
243− $CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
259+ $CABAL v2-haddock $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
244260 - name: unconstrained build
245261 run: |
246262 rm -f cabal.project.local
@@ -250,13 +266,9 @@ jobs:
250266 rm -f cabal.project.local
251267 - name: constraint set random-1.2
252268 run: |
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
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