Skip to content

Commit 5cc1250

Browse files
committed
Support GHC-9.10
1 parent 3ac2949 commit 5cc1250

File tree

4 files changed

+40
-56
lines changed

4 files changed

+40
-56
lines changed

.github/workflows/haskell-ci.yml

+30-45
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.17.20231110
11+
# version: 0.19.20240708
1212
#
13-
# REGENDATA ("0.17.20231110",["github","cabal.project"])
13+
# REGENDATA ("0.19.20240708",["github","cabal.project"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -27,7 +27,7 @@ jobs:
2727
timeout-minutes:
2828
60
2929
container:
30-
image: buildpack-deps:bionic
30+
image: buildpack-deps:jammy
3131
services:
3232
postgres:
3333
image: postgres:14
@@ -38,14 +38,19 @@ jobs:
3838
strategy:
3939
matrix:
4040
include:
41-
- compiler: ghc-9.8.1
41+
- compiler: ghc-9.10.1
4242
compilerKind: ghc
43-
compilerVersion: 9.8.1
43+
compilerVersion: 9.10.1
4444
setup-method: ghcup
4545
allow-failure: false
46-
- compiler: ghc-9.6.3
46+
- compiler: ghc-9.8.2
4747
compilerKind: ghc
48-
compilerVersion: 9.6.3
48+
compilerVersion: 9.8.2
49+
setup-method: ghcup
50+
allow-failure: false
51+
- compiler: ghc-9.6.6
52+
compilerKind: ghc
53+
compilerVersion: 9.6.6
4954
setup-method: ghcup
5055
allow-failure: false
5156
- compiler: ghc-9.4.8
@@ -71,34 +76,24 @@ jobs:
7176
- compiler: ghc-8.8.4
7277
compilerKind: ghc
7378
compilerVersion: 8.8.4
74-
setup-method: hvr-ppa
79+
setup-method: ghcup
7580
allow-failure: false
7681
- compiler: ghc-8.6.5
7782
compilerKind: ghc
7883
compilerVersion: 8.6.5
79-
setup-method: hvr-ppa
84+
setup-method: ghcup
8085
allow-failure: false
8186
fail-fast: false
8287
steps:
8388
- name: apt
8489
run: |
8590
apt-get update
8691
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
87-
if [ "${{ matrix.setup-method }}" = ghcup ]; then
88-
mkdir -p "$HOME/.ghcup/bin"
89-
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
90-
chmod a+x "$HOME/.ghcup/bin/ghcup"
91-
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
92-
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
93-
else
94-
apt-add-repository -y 'ppa:hvr/ghc'
95-
apt-get update
96-
apt-get install -y "$HCNAME"
97-
mkdir -p "$HOME/.ghcup/bin"
98-
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
99-
chmod a+x "$HOME/.ghcup/bin/ghcup"
100-
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
101-
fi
92+
mkdir -p "$HOME/.ghcup/bin"
93+
curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup"
94+
chmod a+x "$HOME/.ghcup/bin/ghcup"
95+
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
96+
"$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
10297
env:
10398
HCKIND: ${{ matrix.compilerKind }}
10499
HCNAME: ${{ matrix.compiler }}
@@ -110,22 +105,13 @@ jobs:
110105
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
111106
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
112107
HCDIR=/opt/$HCKIND/$HCVER
113-
if [ "${{ matrix.setup-method }}" = ghcup ]; then
114-
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
115-
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
116-
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
117-
echo "HC=$HC" >> "$GITHUB_ENV"
118-
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
119-
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
120-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
121-
else
122-
HC=$HCDIR/bin/$HCKIND
123-
echo "HC=$HC" >> "$GITHUB_ENV"
124-
echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
125-
echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
126-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
127-
fi
128-
108+
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
109+
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
110+
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
111+
echo "HC=$HC" >> "$GITHUB_ENV"
112+
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
113+
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
114+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
129115
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
130116
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
131117
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
@@ -182,7 +168,7 @@ jobs:
182168
chmod a+x $HOME/.cabal/bin/cabal-plan
183169
cabal-plan --version
184170
- name: checkout
185-
uses: actions/checkout@v3
171+
uses: actions/checkout@v4
186172
with:
187173
path: source
188174
- name: initial cabal.project for sdist
@@ -209,17 +195,16 @@ jobs:
209195
echo "package postgresql-simple" >> cabal.project
210196
echo " ghc-options: -Werror=missing-methods" >> cabal.project
211197
cat >> cabal.project <<EOF
212-
allow-newer: cryptohash-md5-0.11.100.1:base
213198
EOF
214-
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(postgresql-simple)$/; }' >> cabal.project.local
199+
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(postgresql-simple)$/; }' >> cabal.project.local
215200
cat cabal.project
216201
cat cabal.project.local
217202
- name: dump install plan
218203
run: |
219204
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
220205
cabal-plan
221206
- name: restore cache
222-
uses: actions/cache/restore@v3
207+
uses: actions/cache/restore@v4
223208
with:
224209
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
225210
path: ~/.cabal/store
@@ -249,7 +234,7 @@ jobs:
249234
rm -f cabal.project.local
250235
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
251236
- name: save cache
252-
uses: actions/cache/save@v3
237+
uses: actions/cache/save@v4
253238
if: always()
254239
with:
255240
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}

.github/workflows/simple.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
strategy:
1515
matrix:
1616
os: [macos-latest, windows-latest]
17-
ghc: ['8.10','9.0','9.2','9.4.8','9.6.3','9.8.1']
17+
ghc: ['9.4.8','9.6.6','9.8.2','9.10.1']
1818
fail-fast: false
1919
timeout-minutes:
2020
60
@@ -32,7 +32,7 @@ jobs:
3232
cabal-version: '3.10.2.0'
3333

3434
- name: Set up PostgreSQL
35-
uses: ikalnytskyi/action-setup-postgres@v3
35+
uses: ikalnytskyi/action-setup-postgres@v6
3636
id: postgres
3737
with:
3838
username: ci

cabal.project

-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
11
packages: .
22
tests: true
3-
4-
allow-newer: cryptohash-md5-0.11.100.1:base

postgresql-simple.cabal

+8-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cabal-version: 1.12
22
name: postgresql-simple
33
version: 0.7.0.0
4-
x-revision: 1
4+
x-revision: 2
55
synopsis: Mid-Level PostgreSQL client library
66
description:
77
Mid-Level PostgreSQL client library, forked from mysql-simple.
@@ -30,8 +30,9 @@ tested-with:
3030
|| ==9.0.2
3131
|| ==9.2.8
3232
|| ==9.4.8
33-
|| ==9.6.3
34-
|| ==9.8.1
33+
|| ==9.6.6
34+
|| ==9.8.2
35+
|| ==9.10.1
3536

3637
library
3738
default-language: Haskell2010
@@ -77,10 +78,10 @@ library
7778

7879
-- GHC bundled libs
7980
build-depends:
80-
base >=4.12.0.0 && <4.20
81+
base >=4.12.0.0 && <4.21
8182
, bytestring >=0.10.8.2 && <0.13
82-
, containers >=0.6.0.1 && <0.7
83-
, template-haskell >=2.14.0.0 && <2.22
83+
, containers >=0.6.0.1 && <0.8
84+
, template-haskell >=2.14.0.0 && <2.23
8485
, text >=1.2.3.0 && <1.3 || >=2.0 && <2.2
8586
, time-compat >=1.9.5 && <1.12
8687
, transformers >=0.5.6.2 && <0.7
@@ -90,7 +91,7 @@ library
9091
aeson >=2.1.2.1 && <2.3
9192
, attoparsec >=0.14.4 && <0.15
9293
, case-insensitive >=1.2.1.0 && <1.3
93-
, hashable >=1.4.3.0 && <1.5
94+
, hashable >=1.4.3.0 && <1.6
9495
, Only >=0.1 && <0.1.1
9596
, postgresql-libpq >=0.10.0.0 && <0.11
9697
, scientific >=0.3.7.0 && <0.4

0 commit comments

Comments
 (0)