Skip to content

Commit ee8b286

Browse files
committed
Allow base-compat<1, hashable<2, bump CI to GHC 9.10.1
1 parent 6b9716c commit ee8b286

File tree

3 files changed

+45
-68
lines changed

3 files changed

+45
-68
lines changed

.github/workflows/haskell-ci.yml

+31-57
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
#
99
# For more information, see https://github.com/andreasabel/haskell-ci
1010
#
11-
# version: 0.17.20231012
11+
# version: 0.19.20240703
1212
#
13-
# REGENDATA ("0.17.20231012",["--config=cabal.haskell-ci","github","cabal.project"])
13+
# REGENDATA ("0.19.20240703",["--config=cabal.haskell-ci","github","cabal.project"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -27,24 +27,29 @@ jobs:
2727
timeout-minutes:
2828
60
2929
container:
30-
image: buildpack-deps:focal
30+
image: buildpack-deps:jammy
3131
continue-on-error: ${{ matrix.allow-failure }}
3232
strategy:
3333
matrix:
3434
include:
35-
- compiler: ghc-9.8.1
35+
- compiler: ghc-9.10.1
3636
compilerKind: ghc
37-
compilerVersion: 9.8.1
37+
compilerVersion: 9.10.1
3838
setup-method: ghcup
3939
allow-failure: false
40-
- compiler: ghc-9.6.3
40+
- compiler: ghc-9.8.2
4141
compilerKind: ghc
42-
compilerVersion: 9.6.3
42+
compilerVersion: 9.8.2
4343
setup-method: ghcup
4444
allow-failure: false
45-
- compiler: ghc-9.4.7
45+
- compiler: ghc-9.6.6
4646
compilerKind: ghc
47-
compilerVersion: 9.4.7
47+
compilerVersion: 9.6.6
48+
setup-method: ghcup
49+
allow-failure: false
50+
- compiler: ghc-9.4.8
51+
compilerKind: ghc
52+
compilerVersion: 9.4.8
4853
setup-method: ghcup
4954
allow-failure: false
5055
- compiler: ghc-9.2.8
@@ -82,39 +87,17 @@ jobs:
8287
compilerVersion: 8.2.2
8388
setup-method: ghcup
8489
allow-failure: false
85-
- compiler: ghc-8.0.2
86-
compilerKind: ghc
87-
compilerVersion: 8.0.2
88-
setup-method: ghcup
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
9590
fail-fast: false
9691
steps:
9792
- name: apt
9893
run: |
9994
apt-get update
10095
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev
101-
if [ "${{ matrix.setup-method }}" = ghcup ]; then
102-
mkdir -p "$HOME/.ghcup/bin"
103-
curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
104-
chmod a+x "$HOME/.ghcup/bin/ghcup"
105-
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml;
106-
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
107-
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
108-
else
109-
apt-add-repository -y 'ppa:hvr/ghc'
110-
apt-get update
111-
apt-get install -y "$HCNAME"
112-
mkdir -p "$HOME/.ghcup/bin"
113-
curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
114-
chmod a+x "$HOME/.ghcup/bin/ghcup"
115-
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml;
116-
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
117-
fi
96+
mkdir -p "$HOME/.ghcup/bin"
97+
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
98+
chmod a+x "$HOME/.ghcup/bin/ghcup"
99+
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
100+
"$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
118101
env:
119102
HCKIND: ${{ matrix.compilerKind }}
120103
HCNAME: ${{ matrix.compiler }}
@@ -126,22 +109,13 @@ jobs:
126109
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
127110
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
128111
HCDIR=/opt/$HCKIND/$HCVER
129-
if [ "${{ matrix.setup-method }}" = ghcup ]; then
130-
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
131-
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
132-
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
133-
echo "HC=$HC" >> "$GITHUB_ENV"
134-
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
135-
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
136-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
137-
else
138-
HC=$HCDIR/bin/$HCKIND
139-
echo "HC=$HC" >> "$GITHUB_ENV"
140-
echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
141-
echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
142-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
143-
fi
144-
112+
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
113+
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
114+
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
115+
echo "HC=$HC" >> "$GITHUB_ENV"
116+
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
117+
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
118+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
145119
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
146120
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
147121
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
@@ -226,8 +200,8 @@ jobs:
226200
touch cabal.project.local
227201
echo "packages: ${PKGDIR_github}" >> cabal.project
228202
if [ $((HCNUMVER >= 80400)) -ne 0 ] ; then echo "packages: ${PKGDIR_github_samples}" >> cabal.project ; fi
229-
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package github" >> cabal.project ; fi
230-
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
203+
echo "package github" >> cabal.project
204+
echo " ghc-options: -Werror=missing-methods" >> cabal.project
231205
if [ $((HCNUMVER >= 80400)) -ne 0 ] ; then echo "package github-samples" >> cabal.project ; fi
232206
if [ $((HCNUMVER >= 80400)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
233207
cat >> cabal.project <<EOF
@@ -237,15 +211,15 @@ jobs:
237211
optimization: False
238212
allow-newer: containers
239213
EOF
240-
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(github|github-samples)$/; }' >> cabal.project.local
214+
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(github|github-samples)$/; }' >> cabal.project.local
241215
cat cabal.project
242216
cat cabal.project.local
243217
- name: dump install plan
244218
run: |
245219
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
246220
cabal-plan
247221
- name: restore cache
248-
uses: actions/cache/restore@v3
222+
uses: actions/cache/restore@v4
249223
with:
250224
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
251225
path: ~/.cabal/store
@@ -287,7 +261,7 @@ jobs:
287261
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='containers >= 0.7' all ; fi
288262
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then $CABAL v2-test $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='containers >= 0.7' all ; fi
289263
- name: save cache
290-
uses: actions/cache/save@v3
264+
uses: actions/cache/save@v4
291265
if: always()
292266
with:
293267
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}

github.cabal

+10-8
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cabal-version: 2.4
22
name: github
33
version: 0.29
4-
x-revision: 4
4+
x-revision: 5
55
synopsis: Access to the GitHub API, v3.
66
category: Network
77
description:
@@ -31,18 +31,20 @@ copyright:
3131
Copyright 2012-2013 Mike Burns, Copyright 2013-2015 John Wiegley, Copyright 2016-2021 Oleg Grenrus
3232

3333
tested-with:
34-
GHC == 9.8.1
35-
GHC == 9.6.3
36-
GHC == 9.4.7
34+
GHC == 9.10.1
35+
GHC == 9.8.2
36+
GHC == 9.6.6
37+
GHC == 9.4.8
3738
GHC == 9.2.8
3839
GHC == 9.0.2
3940
GHC == 8.10.7
4041
GHC == 8.8.4
4142
GHC == 8.6.5
4243
GHC == 8.4.4
4344
GHC == 8.2.2
44-
GHC == 8.0.2
45-
GHC == 7.10.3
45+
-- Build failure of HsOpenSSL with GHC 8.0
46+
-- https://github.com/haskell-cryptography/HsOpenSSL/issues/97
47+
-- GHC == 8.0.2
4648

4749
extra-doc-files:
4850
README.md
@@ -200,12 +202,12 @@ library
200202
-- other packages
201203
build-depends:
202204
aeson >=1.4.0.0 && <1.6 || >=2.0.1.0 && <2.3
203-
, base-compat >=0.11.1 && <0.14
205+
, base-compat >=0.11.1 && <1
204206
, base16-bytestring >=0.1.1.6 && <1.1
205207
, binary-instances >=1 && <1.1
206208
, cryptohash-sha1 >=0.11.100.1 && <0.12
207209
, deepseq-generics >=0.2.0.0 && <0.3
208-
, hashable >=1.2.7.0 && <1.5
210+
, hashable >=1.2.7.0 && <2
209211
, http-client >=0.5.12 && <0.8
210212
, http-link-header >=1.0.3.1 && <1.3
211213
, http-types >=0.12.3 && <0.13

samples/github-samples.cabal

+4-3
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ description: Various samples of github package
1010
build-type: Simple
1111

1212
tested-with:
13-
GHC == 9.8.1
14-
GHC == 9.6.3
15-
GHC == 9.4.7
13+
GHC == 9.10.1
14+
GHC == 9.8.2
15+
GHC == 9.6.6
16+
GHC == 9.4.8
1617
GHC == 9.2.8
1718
GHC == 9.0.2
1819
GHC == 8.10.7

0 commit comments

Comments
 (0)