Skip to content

Commit 5bb6e62

Browse files
committed
Allow base-4.19
1 parent 04ab24b commit 5bb6e62

File tree

2 files changed

+37
-12
lines changed

2 files changed

+37
-12
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
#
99
# For more information, see https://github.com/haskell-CI/haskell-ci
1010
#
11-
# version: 0.16.5
11+
# version: 0.17.20230808
1212
#
13-
# REGENDATA ("0.16.5",["github","zlib.cabal"])
13+
# REGENDATA ("0.17.20230808",["github","zlib.cabal"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -28,14 +28,19 @@ jobs:
2828
strategy:
2929
matrix:
3030
include:
31+
- compiler: ghc-9.8.1-alpha1
32+
compilerKind: ghc
33+
compilerVersion: 9.8.1-alpha1
34+
setup-method: ghcup
35+
allow-failure: true
3136
- compiler: ghc-9.6.2
3237
compilerKind: ghc
3338
compilerVersion: 9.6.2
3439
setup-method: ghcup
3540
allow-failure: false
36-
- compiler: ghc-9.4.5
41+
- compiler: ghc-9.4.6
3742
compilerKind: ghc
38-
compilerVersion: 9.4.5
43+
compilerVersion: 9.4.6
3944
setup-method: ghcup
4045
allow-failure: false
4146
- compiler: ghc-9.2.8
@@ -116,8 +121,9 @@ jobs:
116121
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
117122
if [ "${{ matrix.setup-method }}" = ghcup ]; then
118123
mkdir -p "$HOME/.ghcup/bin"
119-
curl -sL https://downloads.haskell.org/ghcup/0.1.19.2/x86_64-linux-ghcup-0.1.19.2 > "$HOME/.ghcup/bin/ghcup"
124+
curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
120125
chmod a+x "$HOME/.ghcup/bin/ghcup"
126+
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml;
121127
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
122128
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
123129
apt-get update
@@ -127,8 +133,9 @@ jobs:
127133
apt-get update
128134
apt-get install -y "$HCNAME" zlib1g-dev
129135
mkdir -p "$HOME/.ghcup/bin"
130-
curl -sL https://downloads.haskell.org/ghcup/0.1.19.2/x86_64-linux-ghcup-0.1.19.2 > "$HOME/.ghcup/bin/ghcup"
136+
curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
131137
chmod a+x "$HOME/.ghcup/bin/ghcup"
138+
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml;
132139
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
133140
fi
134141
env:
@@ -143,10 +150,12 @@ jobs:
143150
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
144151
HCDIR=/opt/$HCKIND/$HCVER
145152
if [ "${{ matrix.setup-method }}" = ghcup ]; then
146-
HC=$HOME/.ghcup/bin/$HCKIND-$HCVER
153+
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
154+
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
155+
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
147156
echo "HC=$HC" >> "$GITHUB_ENV"
148-
echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV"
149-
echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV"
157+
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
158+
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
150159
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
151160
else
152161
HC=$HCDIR/bin/$HCKIND
@@ -160,7 +169,7 @@ jobs:
160169
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
161170
if [ $((HCNUMVER >= 70400)) -ne 0 ] ; then echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV" ; else echo "ARG_TESTS=--disable-tests" >> "$GITHUB_ENV" ; fi
162171
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
163-
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
172+
if [ $((HCNUMVER >= 90800)) -ne 0 ] ; then echo "HEADHACKAGE=true" >> "$GITHUB_ENV" ; else echo "HEADHACKAGE=false" >> "$GITHUB_ENV" ; fi
164173
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
165174
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
166175
env:
@@ -189,6 +198,18 @@ jobs:
189198
repository hackage.haskell.org
190199
url: http://hackage.haskell.org/
191200
EOF
201+
if $HEADHACKAGE; then
202+
cat >> $CABAL_CONFIG <<EOF
203+
repository head.hackage.ghc.haskell.org
204+
url: https://ghc.gitlab.haskell.org/head.hackage/
205+
secure: True
206+
root-keys: 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d
207+
26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329
208+
f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89
209+
key-threshold: 3
210+
active-repositories: hackage.haskell.org, head.hackage.ghc.haskell.org:override
211+
EOF
212+
fi
192213
cat >> $CABAL_CONFIG <<EOF
193214
program-default-options
194215
ghc-options: $GHCJOBS +RTS -M3G -RTS
@@ -240,6 +261,9 @@ jobs:
240261
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
241262
cat >> cabal.project <<EOF
242263
EOF
264+
if $HEADHACKAGE; then
265+
echo "allow-newer: $($HCPKG list --simple-output | sed -E 's/([a-zA-Z-]+)-[0-9.]+/*:\1,/g')" >> cabal.project
266+
fi
243267
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(zlib)$/; }' >> cabal.project.local
244268
cat cabal.project
245269
cat cabal.project.local

zlib.cabal

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@ tested-with: GHC == 7.0.4
3636
, GHC == 8.10.7
3737
, GHC == 9.0.2
3838
, GHC == 9.2.8
39-
, GHC == 9.4.5
39+
, GHC == 9.4.6
4040
, GHC == 9.6.2
41+
, GHC == 9.8.1
4142

4243
extra-source-files: changelog
4344
README.md
@@ -96,7 +97,7 @@ library
9697
if impl(ghc >= 7.6)
9798
other-extensions: CApiFFI
9899

99-
build-depends: base >= 4 && < 4.19,
100+
build-depends: base >= 4 && < 4.20,
100101
bytestring >= 0.9 && < 0.13
101102
if impl(ghc >= 7.0 && < 8.0.3)
102103
build-depends: ghc-prim

0 commit comments

Comments
 (0)