Skip to content

Commit f76532e

Browse files
authored
Merge pull request #90 from andreasabel/ghc-9.10
Allow zlib-0.7 and time-1.14, bump CI to GHC 9.10.0
2 parents d50ec01 + 08e6ccc commit f76532e

File tree

2 files changed

+54
-53
lines changed

2 files changed

+54
-53
lines changed

.github/workflows/haskell-ci.yml

+48-48
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.20231010
11+
# version: 0.19.20240403
1212
#
13-
# REGENDATA ("0.17.20231010",["github","io-streams.cabal"])
13+
# REGENDATA ("0.19.20240403",["github","io-streams.cabal"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -32,19 +32,24 @@ jobs:
3232
strategy:
3333
matrix:
3434
include:
35-
- compiler: ghc-9.8.1
35+
- compiler: ghc-9.10.0.20240328
3636
compilerKind: ghc
37-
compilerVersion: 9.8.1
37+
compilerVersion: 9.10.0.20240328
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.4
4646
compilerKind: ghc
47-
compilerVersion: 9.4.7
47+
compilerVersion: 9.6.4
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
@@ -65,36 +70,25 @@ jobs:
6570
- compiler: ghc-8.8.4
6671
compilerKind: ghc
6772
compilerVersion: 8.8.4
68-
setup-method: hvr-ppa
73+
setup-method: ghcup
6974
allow-failure: false
7075
- compiler: ghc-8.6.5
7176
compilerKind: ghc
7277
compilerVersion: 8.6.5
73-
setup-method: hvr-ppa
78+
setup-method: ghcup
7479
allow-failure: false
7580
fail-fast: false
7681
steps:
7782
- name: apt
7883
run: |
7984
apt-get update
8085
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
81-
if [ "${{ matrix.setup-method }}" = ghcup ]; then
82-
mkdir -p "$HOME/.ghcup/bin"
83-
curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
84-
chmod a+x "$HOME/.ghcup/bin/ghcup"
85-
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml;
86-
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
87-
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
88-
else
89-
apt-add-repository -y 'ppa:hvr/ghc'
90-
apt-get update
91-
apt-get install -y "$HCNAME"
92-
mkdir -p "$HOME/.ghcup/bin"
93-
curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
94-
chmod a+x "$HOME/.ghcup/bin/ghcup"
95-
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml;
96-
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
97-
fi
86+
mkdir -p "$HOME/.ghcup/bin"
87+
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
88+
chmod a+x "$HOME/.ghcup/bin/ghcup"
89+
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml;
90+
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
91+
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.3.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
9892
env:
9993
HCKIND: ${{ matrix.compilerKind }}
10094
HCNAME: ${{ matrix.compiler }}
@@ -106,27 +100,18 @@ jobs:
106100
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
107101
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
108102
HCDIR=/opt/$HCKIND/$HCVER
109-
if [ "${{ matrix.setup-method }}" = ghcup ]; then
110-
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
111-
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
112-
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
113-
echo "HC=$HC" >> "$GITHUB_ENV"
114-
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
115-
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
116-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
117-
else
118-
HC=$HCDIR/bin/$HCKIND
119-
echo "HC=$HC" >> "$GITHUB_ENV"
120-
echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
121-
echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
122-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
123-
fi
124-
103+
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
104+
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
105+
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
106+
echo "HC=$HC" >> "$GITHUB_ENV"
107+
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
108+
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
109+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.3.0 -vnormal+nowrap" >> "$GITHUB_ENV"
125110
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
126111
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
127112
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
128113
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
129-
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
114+
if [ $((HCNUMVER >= 91000)) -ne 0 ] ; then echo "HEADHACKAGE=true" >> "$GITHUB_ENV" ; else echo "HEADHACKAGE=false" >> "$GITHUB_ENV" ; fi
130115
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
131116
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
132117
env:
@@ -155,6 +140,18 @@ jobs:
155140
repository hackage.haskell.org
156141
url: http://hackage.haskell.org/
157142
EOF
143+
if $HEADHACKAGE; then
144+
cat >> $CABAL_CONFIG <<EOF
145+
repository head.hackage.ghc.haskell.org
146+
url: https://ghc.gitlab.haskell.org/head.hackage/
147+
secure: True
148+
root-keys: 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d
149+
26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329
150+
f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89
151+
key-threshold: 3
152+
active-repositories: hackage.haskell.org, head.hackage.ghc.haskell.org:override
153+
EOF
154+
fi
158155
cat >> $CABAL_CONFIG <<EOF
159156
program-default-options
160157
ghc-options: $GHCJOBS +RTS -M3G -RTS
@@ -202,10 +199,13 @@ jobs:
202199
touch cabal.project
203200
touch cabal.project.local
204201
echo "packages: ${PKGDIR_io_streams}" >> cabal.project
205-
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package io-streams" >> cabal.project ; fi
206-
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
202+
echo "package io-streams" >> cabal.project
203+
echo " ghc-options: -Werror=missing-methods" >> cabal.project
207204
cat >> cabal.project <<EOF
208205
EOF
206+
if $HEADHACKAGE; then
207+
echo "allow-newer: $($HCPKG list --simple-output | sed -E 's/([a-zA-Z-]+)-[0-9.]+/*:\1,/g')" >> cabal.project
208+
fi
209209
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(io-streams)$/; }' >> cabal.project.local
210210
cat cabal.project
211211
cat cabal.project.local
@@ -214,7 +214,7 @@ jobs:
214214
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
215215
cabal-plan
216216
- name: restore cache
217-
uses: actions/cache/restore@v3
217+
uses: actions/cache/restore@v4
218218
with:
219219
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
220220
path: ~/.cabal/store
@@ -244,7 +244,7 @@ jobs:
244244
rm -f cabal.project.local
245245
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
246246
- name: save cache
247-
uses: actions/cache/save@v3
247+
uses: actions/cache/save@v4
248248
if: always()
249249
with:
250250
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}

io-streams.cabal

+6-5
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ Maintainer: Gregory Collins <[email protected]>
88
Cabal-version: >= 1.10
99
Synopsis: Simple, composable, and easy-to-use stream I/O
1010
Tested-With:
11-
GHc == 9.8.1
12-
GHc == 9.6.3
13-
GHC == 9.4.7
11+
GHc == 9.10.0
12+
GHc == 9.8.2
13+
GHc == 9.6.4
14+
GHC == 9.4.8
1415
GHC == 9.2.8
1516
GHC == 9.0.2
1617
GHC == 8.10.7
@@ -139,7 +140,7 @@ Library
139140
primitive >= 0.2 && <0.10,
140141
process >= 1.1 && <1.7,
141142
text >=0.10 && <1.3 || >= 2.0 && <2.2,
142-
time >= 1.2 && <1.13,
143+
time >= 1.2 && <1.15,
143144
transformers >= 0.2 && <0.7,
144145
vector >= 0.7 && <0.14
145146

@@ -225,7 +226,7 @@ Test-suite testsuite
225226
Other-modules: System.IO.Streams.Tests.Zlib,
226227
System.IO.Streams.Zlib
227228
Build-depends: zlib-bindings,
228-
zlib >= 0.5 && <0.7
229+
zlib >= 0.5 && <0.8
229230
cpp-options: -DENABLE_ZLIB
230231

231232
if flag(Network)

0 commit comments

Comments
 (0)