Skip to content

Commit 0fb0080

Browse files
committed
Allow ghc-prim-0.11 (GHC 9.8), adjust CI cover GHCs 7.10 - 9.8
1 parent 3373f5f commit 0fb0080

3 files changed

Lines changed: 64 additions & 88 deletions

File tree

.github/workflows/haskell-ci.yml

Lines changed: 24 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
#
77
# haskell-ci regenerate
88
#
9-
# For more information, see https://github.com/haskell-CI/haskell-ci
9+
# For more information, see https://github.com/andreasabel/haskell-ci
1010
#
11-
# version: 0.16.4
11+
# version: 0.17.20231010
1212
#
13-
# REGENDATA ("0.16.4",["github","attoparsec.cabal","--benchmarks-jobs",">=7.8"])
13+
# REGENDATA ("0.17.20231010",["github","attoparsec.cabal","--benchmarks-jobs",">=7.8"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -27,19 +27,24 @@ jobs:
2727
timeout-minutes:
2828
60
2929
container:
30-
image: buildpack-deps:bionic
30+
image: buildpack-deps:focal
3131
continue-on-error: ${{ matrix.allow-failure }}
3232
strategy:
3333
matrix:
3434
include:
35-
- compiler: ghc-9.6.2
35+
- compiler: ghc-9.8.1
3636
compilerKind: ghc
37-
compilerVersion: 9.6.2
37+
compilerVersion: 9.8.1
3838
setup-method: ghcup
3939
allow-failure: false
40-
- compiler: ghc-9.4.5
40+
- compiler: ghc-9.6.3
4141
compilerKind: ghc
42-
compilerVersion: 9.4.5
42+
compilerVersion: 9.6.3
43+
setup-method: ghcup
44+
allow-failure: false
45+
- compiler: ghc-9.4.7
46+
compilerKind: ghc
47+
compilerVersion: 9.4.7
4348
setup-method: ghcup
4449
allow-failure: false
4550
- compiler: ghc-9.2.8
@@ -87,21 +92,6 @@ jobs:
8792
compilerVersion: 7.10.3
8893
setup-method: hvr-ppa
8994
allow-failure: false
90-
- compiler: ghc-7.8.4
91-
compilerKind: ghc
92-
compilerVersion: 7.8.4
93-
setup-method: hvr-ppa
94-
allow-failure: false
95-
- compiler: ghc-7.6.3
96-
compilerKind: ghc
97-
compilerVersion: 7.6.3
98-
setup-method: hvr-ppa
99-
allow-failure: false
100-
- compiler: ghc-7.4.2
101-
compilerKind: ghc
102-
compilerVersion: 7.4.2
103-
setup-method: hvr-ppa
104-
allow-failure: false
10595
fail-fast: false
10696
steps:
10797
- name: apt
@@ -110,17 +100,19 @@ jobs:
110100
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
111101
if [ "${{ matrix.setup-method }}" = ghcup ]; then
112102
mkdir -p "$HOME/.ghcup/bin"
113-
curl -sL https://downloads.haskell.org/ghcup/0.1.19.2/x86_64-linux-ghcup-0.1.19.2 > "$HOME/.ghcup/bin/ghcup"
103+
curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
114104
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;
115106
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
116107
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
117108
else
118109
apt-add-repository -y 'ppa:hvr/ghc'
119110
apt-get update
120111
apt-get install -y "$HCNAME"
121112
mkdir -p "$HOME/.ghcup/bin"
122-
curl -sL https://downloads.haskell.org/ghcup/0.1.19.2/x86_64-linux-ghcup-0.1.19.2 > "$HOME/.ghcup/bin/ghcup"
113+
curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
123114
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;
124116
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
125117
fi
126118
env:
@@ -135,10 +127,12 @@ jobs:
135127
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
136128
HCDIR=/opt/$HCKIND/$HCVER
137129
if [ "${{ matrix.setup-method }}" = ghcup ]; then
138-
HC=$HOME/.ghcup/bin/$HCKIND-$HCVER
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#')
139133
echo "HC=$HC" >> "$GITHUB_ENV"
140-
echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV"
141-
echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV"
134+
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
135+
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
142136
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
143137
else
144138
HC=$HCDIR/bin/$HCKIND
@@ -151,7 +145,7 @@ jobs:
151145
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
152146
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
153147
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
154-
if [ $((HCNUMVER >= 70800)) -ne 0 ] ; then echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV" ; else echo "ARG_BENCH=--disable-benchmarks" >> "$GITHUB_ENV" ; fi
148+
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
155149
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
156150
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
157151
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
@@ -204,7 +198,7 @@ jobs:
204198
chmod a+x $HOME/.cabal/bin/cabal-plan
205199
cabal-plan --version
206200
- name: checkout
207-
uses: actions/checkout@v3
201+
uses: actions/checkout@v4
208202
with:
209203
path: source
210204
- name: initial cabal.project for sdist
@@ -231,7 +225,6 @@ jobs:
231225
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package attoparsec" >> cabal.project ; fi
232226
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
233227
cat >> cabal.project <<EOF
234-
allow-newer: bytestring
235228
EOF
236229
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(attoparsec)$/; }' >> cabal.project.local
237230
cat cabal.project
@@ -270,24 +263,6 @@ jobs:
270263
run: |
271264
rm -f cabal.project.local
272265
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
273-
- name: prepare for constraint sets
274-
run: |
275-
rm -f cabal.project.local
276-
- name: constraint set bytestring-0.12
277-
run: |
278-
if [ $((HCNUMVER >= 80000)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='bytestring >= 0.12' --dependencies-only -j2 all ; fi
279-
if [ $((HCNUMVER >= 80000)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='bytestring >= 0.12' all ; fi
280-
if [ $((HCNUMVER >= 80000)) -ne 0 ] ; then $CABAL v2-test $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='bytestring >= 0.12' all ; fi
281-
- name: constraint set text-2
282-
run: |
283-
if [ $((HCNUMVER >= 80400 && HCNUMVER < 90400)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='text >= 2' --dependencies-only -j2 all ; fi
284-
if [ $((HCNUMVER >= 80400 && HCNUMVER < 90400)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='text >= 2' all ; fi
285-
if [ $((HCNUMVER >= 80400 && HCNUMVER < 90400)) -ne 0 ] ; then $CABAL v2-test $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='text >= 2' all ; fi
286-
- name: constraint set text-1
287-
run: |
288-
if [ $((HCNUMVER < 80400)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='text < 2' --dependencies-only -j2 all ; fi
289-
if [ $((HCNUMVER < 80400)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='text < 2' all ; fi
290-
if [ $((HCNUMVER < 80400)) -ne 0 ] ; then $CABAL v2-test $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='text < 2' all ; fi
291266
- name: save cache
292267
uses: actions/cache/save@v3
293268
if: always()

attoparsec.cabal

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ description:
1818
file formats.
1919

2020
tested-with:
21-
GHC == 9.6.2
22-
GHC == 9.4.5
21+
GHC == 9.8.1
22+
GHC == 9.6.3
23+
GHC == 9.4.7
2324
GHC == 9.2.8
2425
GHC == 9.0.2
2526
GHC == 8.10.7
@@ -29,9 +30,9 @@ tested-with:
2930
GHC == 8.2.2
3031
GHC == 8.0.2
3132
GHC == 7.10.3
32-
GHC == 7.8.4
33-
GHC == 7.6.3
34-
GHC == 7.4.2
33+
-- GHC == 7.8.4
34+
-- GHC == 7.6.3
35+
-- GHC == 7.4.2
3536

3637
extra-source-files:
3738
benchmarks/*.txt
@@ -79,7 +80,7 @@ library
7980
scientific >= 0.3.1 && < 0.4,
8081
transformers >= 0.2 && (< 0.4 || >= 0.4.1.0) && < 0.7,
8182
text >= 1.1.1.3,
82-
ghc-prim < 0.11,
83+
ghc-prim < 0.12,
8384
attoparsec-internal
8485
if impl(ghc < 7.4)
8586
build-depends:

cabal.haskell-ci

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
11
branches: master
22

3-
constraint-set text-1
4-
constraints: text < 2
5-
ghc: < 8.4
6-
tests: True
7-
run-tests: True
8-
9-
constraint-set text-2
10-
constraints: text >= 2
11-
ghc: >= 8.4 && < 9.4
12-
tests: True
13-
run-tests: True
14-
15-
constraint-set bytestring-0.12
16-
-- bytestring-0.12 requires base >=4.9 (GHC 8.0)
17-
ghc: >= 8.0
18-
constraints: bytestring >= 0.12
19-
--
20-
-- The following is silently ignored here:
21-
--
22-
-- raw-project
23-
-- allow-newer: bytestring
24-
--
25-
tests: True
26-
run-tests: True
27-
28-
-- The following is meant to be for constraint-set bytestring-0.12 only,
29-
-- but there is currently no way to enable `allow-newer: bytestring`
30-
-- just for the constraint set.
3+
-- constraint-set text-1
4+
-- constraints: text < 2
5+
-- ghc: < 8.4
6+
-- tests: True
7+
-- run-tests: True
8+
--
9+
-- constraint-set text-2
10+
-- constraints: text >= 2
11+
-- ghc: >= 8.4 && < 9.4
12+
-- tests: True
13+
-- run-tests: True
3114
--
32-
-- Since core library `bytestring` is constrained to `installed`,
33-
-- it is not harmful to allow newer `bytestring` in the default runs
34-
-- as well---it will have no effect there.
15+
-- constraint-set bytestring-0.12
16+
-- -- bytestring-0.12 requires base >=4.9 (GHC 8.0)
17+
-- ghc: >= 8.0
18+
-- constraints: bytestring >= 0.12
19+
-- --
20+
-- -- The following is silently ignored here:
21+
-- --
22+
-- -- raw-project
23+
-- -- allow-newer: bytestring
24+
-- --
25+
-- tests: True
26+
-- run-tests: True
3527
--
36-
raw-project
37-
allow-newer: bytestring
28+
-- -- The following is meant to be for constraint-set bytestring-0.12 only,
29+
-- -- but there is currently no way to enable `allow-newer: bytestring`
30+
-- -- just for the constraint set.
31+
-- --
32+
-- -- Since core library `bytestring` is constrained to `installed`,
33+
-- -- it is not harmful to allow newer `bytestring` in the default runs
34+
-- -- as well---it will have no effect there.
35+
-- --
36+
-- raw-project
37+
-- allow-newer: bytestring

0 commit comments

Comments
 (0)