Skip to content

Commit da32f00

Browse files
authored
Merge pull request #86 from andreasabel/primitive-0.8
Bump primitive to <0.9; bump Haskell CI to GHC 9.6.1 alpha3, 9.4.4 and 9.2.6
2 parents 8301840 + 86909df commit da32f00

2 files changed

Lines changed: 47 additions & 18 deletions

File tree

.github/workflows/haskell-ci.yml

Lines changed: 43 additions & 15 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.15.20220808
11+
# version: 0.15.20230217
1212
#
13-
# REGENDATA ("0.15.20220808",["github","io-streams.cabal"])
13+
# REGENDATA ("0.15.20230217",["github","io-streams.cabal"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -34,14 +34,19 @@ jobs:
3434
strategy:
3535
matrix:
3636
include:
37-
- compiler: ghc-9.4.1
37+
- compiler: ghc-9.6.0.20230210
3838
compilerKind: ghc
39-
compilerVersion: 9.4.1
39+
compilerVersion: 9.6.0.20230210
40+
setup-method: ghcup
41+
allow-failure: true
42+
- compiler: ghc-9.4.4
43+
compilerKind: ghc
44+
compilerVersion: 9.4.4
4045
setup-method: ghcup
4146
allow-failure: false
42-
- compiler: ghc-9.2.4
47+
- compiler: ghc-9.2.6
4348
compilerKind: ghc
44-
compilerVersion: 9.2.4
49+
compilerVersion: 9.2.6
4550
setup-method: ghcup
4651
allow-failure: false
4752
- compiler: ghc-9.0.2
@@ -109,16 +114,18 @@ jobs:
109114
mkdir -p "$HOME/.ghcup/bin"
110115
curl -sL https://downloads.haskell.org/ghcup/0.1.18.0/x86_64-linux-ghcup-0.1.18.0 > "$HOME/.ghcup/bin/ghcup"
111116
chmod a+x "$HOME/.ghcup/bin/ghcup"
117+
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml;
112118
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
113-
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
119+
"$HOME/.ghcup/bin/ghcup" install cabal 3.9.0.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
114120
else
115121
apt-add-repository -y 'ppa:hvr/ghc'
116122
apt-get update
117123
apt-get install -y "$HCNAME"
118124
mkdir -p "$HOME/.ghcup/bin"
119125
curl -sL https://downloads.haskell.org/ghcup/0.1.18.0/x86_64-linux-ghcup-0.1.18.0 > "$HOME/.ghcup/bin/ghcup"
120126
chmod a+x "$HOME/.ghcup/bin/ghcup"
121-
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
127+
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml;
128+
"$HOME/.ghcup/bin/ghcup" install cabal 3.9.0.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
122129
fi
123130
env:
124131
HCKIND: ${{ matrix.compilerKind }}
@@ -136,20 +143,20 @@ jobs:
136143
echo "HC=$HC" >> "$GITHUB_ENV"
137144
echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV"
138145
echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV"
139-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
146+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.9.0.0 -vnormal+nowrap" >> "$GITHUB_ENV"
140147
else
141148
HC=$HCDIR/bin/$HCKIND
142149
echo "HC=$HC" >> "$GITHUB_ENV"
143150
echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
144151
echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
145-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
152+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.9.0.0 -vnormal+nowrap" >> "$GITHUB_ENV"
146153
fi
147154
148155
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
149156
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
150157
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
151158
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
152-
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
159+
if [ $((HCNUMVER >= 90600)) -ne 0 ] ; then echo "HEADHACKAGE=true" >> "$GITHUB_ENV" ; else echo "HEADHACKAGE=false" >> "$GITHUB_ENV" ; fi
153160
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
154161
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
155162
env:
@@ -178,6 +185,18 @@ jobs:
178185
repository hackage.haskell.org
179186
url: http://hackage.haskell.org/
180187
EOF
188+
if $HEADHACKAGE; then
189+
cat >> $CABAL_CONFIG <<EOF
190+
repository head.hackage.ghc.haskell.org
191+
url: https://ghc.gitlab.haskell.org/head.hackage/
192+
secure: True
193+
root-keys: 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d
194+
26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329
195+
f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89
196+
key-threshold: 3
197+
active-repositories: hackage.haskell.org, head.hackage.ghc.haskell.org:override
198+
EOF
199+
fi
181200
cat >> $CABAL_CONFIG <<EOF
182201
program-default-options
183202
ghc-options: $GHCJOBS +RTS -M3G -RTS
@@ -201,7 +220,7 @@ jobs:
201220
chmod a+x $HOME/.cabal/bin/cabal-plan
202221
cabal-plan --version
203222
- name: checkout
204-
uses: actions/checkout@v2
223+
uses: actions/checkout@v3
205224
with:
206225
path: source
207226
- name: initial cabal.project for sdist
@@ -229,15 +248,18 @@ jobs:
229248
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
230249
cat >> cabal.project <<EOF
231250
EOF
251+
if $HEADHACKAGE; then
252+
echo "allow-newer: $($HCPKG list --simple-output | sed -E 's/([a-zA-Z-]+)-[0-9.]+/*:\1,/g')" >> cabal.project
253+
fi
232254
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(io-streams)$/; }' >> cabal.project.local
233255
cat cabal.project
234256
cat cabal.project.local
235257
- name: dump install plan
236258
run: |
237259
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
238260
cabal-plan
239-
- name: cache
240-
uses: actions/cache@v2
261+
- name: restore cache
262+
uses: actions/cache/restore@v3
241263
with:
242264
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
243265
path: ~/.cabal/store
@@ -261,8 +283,14 @@ jobs:
261283
${CABAL} -vnormal check
262284
- name: haddock
263285
run: |
264-
$CABAL v2-haddock --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
286+
$CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
265287
- name: unconstrained build
266288
run: |
267289
rm -f cabal.project.local
268290
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
291+
- name: save cache
292+
uses: actions/cache/save@v3
293+
if: always()
294+
with:
295+
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
296+
path: ~/.cabal/store

io-streams.cabal

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ Maintainer: Gregory Collins <greg@gregorycollins.net>
88
Cabal-version: >= 1.10
99
Synopsis: Simple, composable, and easy-to-use stream I/O
1010
Tested-With:
11-
GHC == 9.4.1
12-
GHC == 9.2.4
11+
GHc == 9.6.0
12+
GHC == 9.4.4
13+
GHC == 9.2.6
1314
GHC == 9.0.2
1415
GHC == 8.10.7
1516
GHC == 8.8.4
@@ -141,7 +142,7 @@ Library
141142
Build-depends: base >= 4 && <5,
142143
attoparsec >= 0.10 && <0.15,
143144
bytestring >= 0.9 && <0.12,
144-
primitive >= 0.2 && <0.8,
145+
primitive >= 0.2 && <0.9,
145146
process >= 1.1 && <1.7,
146147
text >=0.10 && <1.3 || >= 2.0 && <2.1,
147148
time >= 1.2 && <1.13,

0 commit comments

Comments
 (0)