Skip to content

Commit 51d0709

Browse files
authored
Allow template-haskell-2.21 (#484)
Update CI: add GHC-9.6 and GHC-9.8 jobs, bump minor version of recent GHCs Looks like revision 2 https://hackage.haskell.org/package/unordered-containers-0.2.19.1/revisions/ was never merged in. I cannot find an issue or pull request.
1 parent 259dc9e commit 51d0709

File tree

2 files changed

+47
-22
lines changed

2 files changed

+47
-22
lines changed

.github/workflows/haskell-ci.yml

+42-19
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# This GitHub workflow config has been generated by a script via
22
#
3-
# haskell-ci 'github' 'unordered-containers.cabal'
3+
# haskell-ci 'github' 'cabal.project'
44
#
55
# To regenerate the script (for example after adjusting tested-with) run
66
#
77
# haskell-ci regenerate
88
#
99
# For more information, see https://github.com/haskell-CI/haskell-ci
1010
#
11-
# version: 0.15.20220808
11+
# version: 0.17.20231010
1212
#
13-
# REGENDATA ("0.15.20220808",["github","unordered-containers.cabal"])
13+
# REGENDATA ("0.17.20231010",["github","cabal.project"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -32,14 +32,24 @@ jobs:
3232
strategy:
3333
matrix:
3434
include:
35-
- compiler: ghc-9.4.1
35+
- compiler: ghc-9.8.1
3636
compilerKind: ghc
37-
compilerVersion: 9.4.1
37+
compilerVersion: 9.8.1
3838
setup-method: ghcup
3939
allow-failure: false
40-
- compiler: ghc-9.2.4
40+
- compiler: ghc-9.6.3
4141
compilerKind: ghc
42-
compilerVersion: 9.2.4
42+
compilerVersion: 9.6.3
43+
setup-method: ghcup
44+
allow-failure: false
45+
- compiler: ghc-9.4.7
46+
compilerKind: ghc
47+
compilerVersion: 9.4.7
48+
setup-method: ghcup
49+
allow-failure: false
50+
- compiler: ghc-9.2.8
51+
compilerKind: ghc
52+
compilerVersion: 9.2.8
4353
setup-method: ghcup
4454
allow-failure: false
4555
- compiler: ghc-9.0.2
@@ -79,10 +89,10 @@ jobs:
7989
apt-get update
8090
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev
8191
mkdir -p "$HOME/.ghcup/bin"
82-
curl -sL https://downloads.haskell.org/ghcup/0.1.18.0/x86_64-linux-ghcup-0.1.18.0 > "$HOME/.ghcup/bin/ghcup"
92+
curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
8393
chmod a+x "$HOME/.ghcup/bin/ghcup"
8494
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
85-
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
95+
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
8696
env:
8797
HCKIND: ${{ matrix.compilerKind }}
8898
HCNAME: ${{ matrix.compiler }}
@@ -94,11 +104,13 @@ jobs:
94104
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
95105
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
96106
HCDIR=/opt/$HCKIND/$HCVER
97-
HC=$HOME/.ghcup/bin/$HCKIND-$HCVER
107+
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
108+
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
109+
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
98110
echo "HC=$HC" >> "$GITHUB_ENV"
99-
echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV"
100-
echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV"
101-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
111+
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
112+
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
113+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
102114
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
103115
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
104116
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
@@ -148,14 +160,14 @@ jobs:
148160
- name: install cabal-plan
149161
run: |
150162
mkdir -p $HOME/.cabal/bin
151-
curl -sL https://github.com/haskell-hvr/cabal-plan/releases/download/v0.6.2.0/cabal-plan-0.6.2.0-x86_64-linux.xz > cabal-plan.xz
152-
echo 'de73600b1836d3f55e32d80385acc055fd97f60eaa0ab68a755302685f5d81bc cabal-plan.xz' | sha256sum -c -
163+
curl -sL https://github.com/haskell-hvr/cabal-plan/releases/download/v0.7.3.0/cabal-plan-0.7.3.0-x86_64-linux.xz > cabal-plan.xz
164+
echo 'f62ccb2971567a5f638f2005ad3173dba14693a45154c1508645c52289714cb2 cabal-plan.xz' | sha256sum -c -
153165
xz -d < cabal-plan.xz > $HOME/.cabal/bin/cabal-plan
154166
rm -f cabal-plan.xz
155167
chmod a+x $HOME/.cabal/bin/cabal-plan
156168
cabal-plan --version
157169
- name: checkout
158-
uses: actions/checkout@v2
170+
uses: actions/checkout@v3
159171
with:
160172
path: source
161173
- name: initial cabal.project for sdist
@@ -182,6 +194,9 @@ jobs:
182194
echo "package unordered-containers" >> cabal.project
183195
echo " ghc-options: -Werror=missing-methods" >> cabal.project
184196
cat >> cabal.project <<EOF
197+
allow-newer: nothunks:bytestring
198+
allow-newer: nothunks:text
199+
allow-newer: ChasingBottoms:base
185200
EOF
186201
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(binary|containers|unordered-containers)$/; }' >> cabal.project.local
187202
cat cabal.project
@@ -190,8 +205,8 @@ jobs:
190205
run: |
191206
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
192207
cabal-plan
193-
- name: cache
194-
uses: actions/cache@v2
208+
- name: restore cache
209+
uses: actions/cache/restore@v3
195210
with:
196211
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
197212
path: ~/.cabal/store
@@ -215,7 +230,7 @@ jobs:
215230
${CABAL} -vnormal check
216231
- name: haddock
217232
run: |
218-
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then $CABAL v2-haddock --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all ; fi
233+
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then $CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all ; fi
219234
- name: unconstrained build
220235
run: |
221236
rm -f cabal.project.local
@@ -225,6 +240,14 @@ jobs:
225240
rm -f cabal.project.local
226241
- name: constraint set debug
227242
run: |
243+
$CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='unordered-containers +debug' all --dry-run
244+
cabal-plan topo | sort
228245
$CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='unordered-containers +debug' --dependencies-only -j2 all
229246
$CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='unordered-containers +debug' all
230247
$CABAL v2-test $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='unordered-containers +debug' all
248+
- name: save cache
249+
uses: actions/cache/save@v3
250+
if: always()
251+
with:
252+
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
253+
path: ~/.cabal/store

unordered-containers.cabal

+5-3
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,10 @@ cabal-version: >=1.10
2929
extra-source-files: CHANGES.md
3030

3131
tested-with:
32-
GHC ==9.4.1
33-
|| ==9.2.4
32+
GHC ==9.8.1
33+
|| ==9.6.3
34+
|| ==9.4.7
35+
|| ==9.2.8
3436
|| ==9.0.2
3537
|| ==8.10.7
3638
|| ==8.8.4
@@ -58,7 +60,7 @@ library
5860
base >= 4.10 && < 5,
5961
deepseq >= 1.4.3,
6062
hashable >= 1.2.5 && < 1.5,
61-
template-haskell < 2.20
63+
template-haskell < 2.22
6264

6365
default-language: Haskell2010
6466

0 commit comments

Comments
 (0)