Skip to content

Commit d1ec099

Browse files
committed
Release bounds, test with ghc 9.10 and 9.12
1 parent 2b7a8ae commit d1ec099

File tree

2 files changed

+42
-27
lines changed

2 files changed

+42
-27
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 35 additions & 22 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.19.20240402
11+
# version: 0.19.20250115
1212
#
13-
# REGENDATA ("0.19.20240402",["github","cabal.project.ci"])
13+
# REGENDATA ("0.19.20250115",["github","cabal.project.ci"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -23,11 +23,21 @@ jobs:
2323
timeout-minutes:
2424
60
2525
container:
26-
image: buildpack-deps:bionic
26+
image: buildpack-deps:jammy
2727
continue-on-error: ${{ matrix.allow-failure }}
2828
strategy:
2929
matrix:
3030
include:
31+
- compiler: ghc-9.12.1
32+
compilerKind: ghc
33+
compilerVersion: 9.12.1
34+
setup-method: ghcup
35+
allow-failure: false
36+
- compiler: ghc-9.10.1
37+
compilerKind: ghc
38+
compilerVersion: 9.10.1
39+
setup-method: ghcup
40+
allow-failure: false
3141
- compiler: ghc-9.8.2
3242
compilerKind: ghc
3343
compilerVersion: 9.8.2
@@ -55,18 +65,30 @@ jobs:
5565
allow-failure: false
5666
fail-fast: false
5767
steps:
58-
- name: apt
68+
- name: apt-get install
5969
run: |
6070
apt-get update
6171
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
72+
apt-get install -y libsnappy-dev
73+
- name: Install GHCup
74+
run: |
6275
mkdir -p "$HOME/.ghcup/bin"
63-
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
76+
curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup"
6477
chmod a+x "$HOME/.ghcup/bin/ghcup"
65-
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml;
78+
- name: Install cabal-install
79+
run: |
80+
"$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
81+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
82+
- name: Install GHC (GHCup)
83+
if: matrix.setup-method == 'ghcup'
84+
run: |
6685
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
67-
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
68-
apt-get update
69-
apt-get install -y libsnappy-dev
86+
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
87+
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
88+
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
89+
echo "HC=$HC" >> "$GITHUB_ENV"
90+
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
91+
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
7092
env:
7193
HCKIND: ${{ matrix.compilerKind }}
7294
HCNAME: ${{ matrix.compiler }}
@@ -77,21 +99,12 @@ jobs:
7799
echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
78100
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
79101
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
80-
HCDIR=/opt/$HCKIND/$HCVER
81-
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
82-
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
83-
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
84-
echo "HC=$HC" >> "$GITHUB_ENV"
85-
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
86-
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
87-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
88102
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
89103
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
90104
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
91105
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
92106
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
93107
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
94-
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
95108
env:
96109
HCKIND: ${{ matrix.compilerKind }}
97110
HCNAME: ${{ matrix.compiler }}
@@ -141,7 +154,7 @@ jobs:
141154
chmod a+x $HOME/.cabal/bin/cabal-plan
142155
cabal-plan --version
143156
- name: checkout
144-
uses: actions/checkout@v3
157+
uses: actions/checkout@v4
145158
with:
146159
path: source
147160
- name: initial cabal.project for sdist
@@ -178,15 +191,15 @@ jobs:
178191
benchmarks: True
179192
ghc-options: -Werror
180193
EOF
181-
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(snappy-c)$/; }' >> cabal.project.local
194+
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(snappy-c)$/; }' >> cabal.project.local
182195
cat cabal.project
183196
cat cabal.project.local
184197
- name: dump install plan
185198
run: |
186199
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
187200
cabal-plan
188201
- name: restore cache
189-
uses: actions/cache/restore@v3
202+
uses: actions/cache/restore@v4
190203
with:
191204
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
192205
path: ~/.cabal/store
@@ -216,8 +229,8 @@ jobs:
216229
rm -f cabal.project.local
217230
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
218231
- name: save cache
219-
uses: actions/cache/save@v3
220232
if: always()
233+
uses: actions/cache/save@v4
221234
with:
222235
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
223236
path: ~/.cabal/store

snappy-c.cabal

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ tested-with: GHC==8.10.7
2222
, GHC==9.4.8
2323
, GHC==9.6.4
2424
, GHC==9.8.2
25+
, GHC==9.10.1
26+
, GHC==9.12.1
2527

2628
source-repository head
2729
type: git
@@ -34,7 +36,7 @@ common lang
3436
-Wprepositive-qualified-module
3537
-Widentities
3638
build-depends:
37-
base >= 4.14 && < 4.21
39+
base >= 4.14 && < 4.22
3840
default-language:
3941
Haskell2010
4042
default-extensions:
@@ -78,7 +80,7 @@ library
7880
Codec.Compression.SnappyC.Internal.Util
7981
build-depends:
8082
, bytestring >= 0.10 && < 0.13
81-
, data-default >= 0.7 && < 0.8
83+
, data-default >= 0.7 && < 0.9
8284
, digest >= 0.0.2 && < 0.0.3
8385
, mtl >= 2.2.2 && < 2.4
8486
extra-libraries:
@@ -96,7 +98,7 @@ executable snappy-cli
9698

9799
, bytestring >= 0.10 && < 0.13
98100
, conduit >= 1.3.5 && < 1.4
99-
, data-default >= 0.7 && < 0.8
101+
, data-default >= 0.7 && < 0.9
100102
, optparse-applicative >= 0.18 && < 0.19
101103
ghc-options:
102104
-threaded
@@ -122,7 +124,7 @@ test-suite test-snappy-c
122124
, bytestring >= 0.10 && < 0.13
123125
, tasty >= 1.5 && < 1.6
124126
, tasty-hunit >= 0.10 && < 0.11
125-
, tasty-quickcheck >= 0.10 && < 0.11
127+
, tasty-quickcheck >= 0.10 && < 0.12
126128
ghc-options:
127129
-threaded
128130
-rtsopts
@@ -142,7 +144,7 @@ benchmark bench-snappy-c
142144
, bytestring >= 0.10 && < 0.13
143145
, criterion >= 1.6.3 && < 1.7
144146
, deepseq >= 1.4 && < 1.6
145-
, random >= 1.2.1 && < 1.3
147+
, random >= 1.2.1 && < 1.4
146148
, snappy-lazy >= 0.1 && < 0.2
147149
, zlib >= 0.6.3 && < 0.8
148150

0 commit comments

Comments
 (0)