Skip to content

Commit 6e347f1

Browse files
committed
Allow network-3.2; bump CI to GHC 9.10
1 parent 4f72b1d commit 6e347f1

File tree

2 files changed

+42
-62
lines changed

2 files changed

+42
-62
lines changed

.github/workflows/haskell-ci.yml

+36-56
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.20241111
1212
#
13-
# REGENDATA ("0.17.20231010",["github","openssl-streams.cabal"])
13+
# REGENDATA ("0.19.20241111",["github","openssl-streams.cabal"])
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
@@ -65,56 +70,40 @@ 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
- compiler: ghc-8.4.4
7681
compilerKind: ghc
7782
compilerVersion: 8.4.4
78-
setup-method: hvr-ppa
83+
setup-method: ghcup
7984
allow-failure: false
8085
- compiler: ghc-8.2.2
8186
compilerKind: ghc
8287
compilerVersion: 8.2.2
83-
setup-method: hvr-ppa
88+
setup-method: ghcup
8489
allow-failure: false
8590
- compiler: ghc-8.0.2
8691
compilerKind: ghc
8792
compilerVersion: 8.0.2
88-
setup-method: hvr-ppa
89-
allow-failure: false
90-
- compiler: ghc-7.10.3
91-
compilerKind: ghc
92-
compilerVersion: 7.10.3
93-
setup-method: hvr-ppa
93+
setup-method: ghcup
9494
allow-failure: false
9595
fail-fast: false
9696
steps:
9797
- name: apt
9898
run: |
9999
apt-get update
100-
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
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
100+
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev
101+
mkdir -p "$HOME/.ghcup/bin"
102+
curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup"
103+
chmod a+x "$HOME/.ghcup/bin/ghcup"
104+
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml;
105+
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
106+
"$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
118107
env:
119108
HCKIND: ${{ matrix.compilerKind }}
120109
HCNAME: ${{ matrix.compiler }}
@@ -126,22 +115,13 @@ jobs:
126115
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
127116
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
128117
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-
118+
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
119+
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
120+
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
121+
echo "HC=$HC" >> "$GITHUB_ENV"
122+
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
123+
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
124+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
145125
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
146126
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
147127
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
@@ -226,15 +206,15 @@ jobs:
226206
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
227207
cat >> cabal.project <<EOF
228208
EOF
229-
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(openssl-streams)$/; }' >> cabal.project.local
209+
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(openssl-streams)$/; }' >> cabal.project.local
230210
cat cabal.project
231211
cat cabal.project.local
232212
- name: dump install plan
233213
run: |
234214
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
235215
cabal-plan
236216
- name: restore cache
237-
uses: actions/cache/restore@v3
217+
uses: actions/cache/restore@v4
238218
with:
239219
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
240220
path: ~/.cabal/store
@@ -264,7 +244,7 @@ jobs:
264244
rm -f cabal.project.local
265245
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
266246
- name: save cache
267-
uses: actions/cache/save@v3
247+
uses: actions/cache/save@v4
268248
if: always()
269249
with:
270250
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}

openssl-streams.cabal

+6-6
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@ Extra-Source-Files: CONTRIBUTORS,
1717
test/key.pem
1818

1919
tested-with:
20-
GHC == 9.8.1
21-
GHC == 9.6.3
22-
GHC == 9.4.7
20+
GHC == 9.10.1
21+
GHC == 9.8.2
22+
GHC == 9.6.6
23+
GHC == 9.4.8
2324
GHC == 9.2.8
2425
GHC == 9.0.2
2526
GHC == 8.10.7
@@ -28,7 +29,6 @@ tested-with:
2829
GHC == 8.4.4
2930
GHC == 8.2.2
3031
GHC == 8.0.2
31-
GHC == 7.10.3
3232

3333
------------------------------------------------------------------------------
3434
Library
@@ -44,7 +44,7 @@ Library
4444
bytestring >= 0.9.2 && <0.13,
4545
HsOpenSSL >= 0.10.3 && <0.12,
4646
io-streams >= 1.0 && <1.6,
47-
network >= 2.4 && <3.2
47+
network >= 2.4 && <3.3
4848

4949

5050
------------------------------------------------------------------------------
@@ -73,4 +73,4 @@ Test-suite testsuite
7373

7474
source-repository head
7575
type: git
76-
location: git://github.com/snapframework/openssl-streams.git
76+
location: https://github.com/snapframework/openssl-streams.git

0 commit comments

Comments
 (0)