@@ -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.19.20240402
1212#
13−# REGENDATA ("0.19.20241223",["github","cabal.project"])
13+# REGENDATA ("0.19.20240402",["github","cabal.project"])
1414#
1515name: Haskell-CI
1616on:
@@ -27,29 +27,19 @@ jobs:
2727 timeout-minutes:
2828 60
2929 container:
30− image: buildpack-deps:jammy
30+ image: buildpack-deps:bionic
3131 continue-on-error: ${{ matrix.allow-failure }}
3232 strategy:
3333 matrix:
3434 include:
35− - compiler: ghc-9.12.1
35+ - compiler: ghc-9.8.2
3636 compilerKind: ghc
37− compilerVersion: 9.12.1
37+ compilerVersion: 9.8.2
3838 setup-method: ghcup
3939 allow-failure: false
40− - compiler: ghc-9.10.1
40+ - compiler: ghc-9.6.4
4141 compilerKind: ghc
42− compilerVersion: 9.10.1
43− setup-method: ghcup
44− allow-failure: false
45− - compiler: ghc-9.8.4
46− compilerKind: ghc
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
42+ compilerVersion: 9.6.4
5343 setup-method: ghcup
5444 allow-failure: false
5545 - compiler: ghc-9.4.8
@@ -75,38 +65,71 @@ jobs:
7565 - compiler: ghc-8.8.4
7666 compilerKind: ghc
7767 compilerVersion: 8.8.4
78− setup-method: ghcup
68+ setup-method: hvr-ppa
7969 allow-failure: false
80− - compiler: ghc-8.6.5
70+ - compiler: ghc-8.6.4
8171 compilerKind: ghc
82− compilerVersion: 8.6.5
83− setup-method: ghcup
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
104+ allow-failure: false
105+ - compiler: ghc-7.4.2
106+ compilerKind: ghc
107+ compilerVersion: 7.4.2
108+ setup-method: hvr-ppa
84109 allow-failure: false
85110 fail-fast: false
86111 steps:
87− - name: apt-get install
112+ - name: apt
88113 run: |
89114 apt-get update
90115 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"
116+ if [ "${{ matrix.setup-method }}" = ghcup ]; then
117+ 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"
119+ 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)
122+ "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
123+ else
124+ apt-add-repository -y 'ppa:hvr/ghc'
125+ apt-get update
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)
132+ fi
110133 env:
111134 HCKIND: ${{ matrix.compilerKind }}
112135 HCNAME: ${{ matrix.compiler }}
@@ -117,12 +140,30 @@ jobs:
117140 echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
118141 echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
119142 echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
143+ HCDIR=/opt/$HCKIND/$HCVER
144+ if [ "${{ matrix.setup-method }}" = ghcup ]; then
145+ HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
146+ HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
147+ HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
148+ echo "HC=$HC" >> "$GITHUB_ENV"
149+ echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
150+ echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
151+ echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
152+ else
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"
158+ fi
159+
120160 HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
121161 echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
122162 echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
123163 echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
124164 echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
125165 echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
166+ echo "GHCJSARITH=0" >> "$GITHUB_ENV"
126167 env:
127168 HCKIND: ${{ matrix.compilerKind }}
128169 HCNAME: ${{ matrix.compiler }}
@@ -172,7 +213,7 @@ jobs:
172213 chmod a+x $HOME/.cabal/bin/cabal-plan
173214 cabal-plan --version
174215 - name: checkout
175− uses: actions/checkout@v4
216+ uses: actions/checkout@v3
176217 with:
177218 path: source
178219 - name: initial cabal.project for sdist
@@ -200,13 +241,13 @@ jobs:
200241 touch cabal.project.local
201242 echo "packages: ${PKGDIR_uuid_types}" >> cabal.project
202243 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
244+ if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package uuid-types" >> cabal.project ; fi
245+ if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
246+ if [ $((HCNUMVER >= 80200)) -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
207248 cat >> cabal.project <<EOF
208249 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
250+ $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(uuid|uuid-types)$/; }' >> cabal.project.local
210251 cat cabal.project
211252 cat cabal.project.local
212253 - name: dump install plan
@@ -214,7 +255,7 @@ jobs:
214255 $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
215256 cabal-plan
216257 - name: restore cache
217− uses: actions/cache/restore@v4
258+ uses: actions/cache/restore@v3
218259 with:
219260 key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
220261 path: ~/.cabal/store
@@ -250,13 +291,19 @@ jobs:
250291 rm -f cabal.project.local
251292 - name: constraint set random-1.2
252293 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
294+ if [ $((HCNUMVER >= 71000)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.2.*' all --dry-run ; fi
295+ if [ $((HCNUMVER >= 71000)) -ne 0 ] ; then cabal-plan topo | sort ; fi
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
297+ if [ $((HCNUMVER >= 71000)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.2.*' all ; fi
298+ - name: constraint set random-1.1
299+ run: |
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
257304 - name: save cache
305+ uses: actions/cache/save@v3
258306 if: always()
259− uses: actions/cache/save@v4
260307 with:
261308 key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
262309 path: ~/.cabal/store