Skip to content

Commit f2164d9

Browse files
committed
Allow base-4.20
1 parent 19c60bc commit f2164d9

File tree

3 files changed

+41
-52
lines changed

3 files changed

+41
-52
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 30 additions & 44 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.17.20231110
11+
# version: 0.19.20240708
1212
#
13-
# REGENDATA ("0.17.20231110",["github","postgresql-libpq.cabal"])
13+
# REGENDATA ("0.19.20240708",["github","postgresql-libpq.cabal"])
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.5
52+
compilerKind: ghc
53+
compilerVersion: 9.6.5
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
@@ -210,15 +196,15 @@ jobs:
210196
echo " ghc-options: -Werror=missing-methods" >> cabal.project
211197
cat >> cabal.project <<EOF
212198
EOF
213-
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(postgresql-libpq)$/; }' >> cabal.project.local
199+
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(postgresql-libpq)$/; }' >> cabal.project.local
214200
cat cabal.project
215201
cat cabal.project.local
216202
- name: dump install plan
217203
run: |
218204
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
219205
cabal-plan
220206
- name: restore cache
221-
uses: actions/cache/restore@v3
207+
uses: actions/cache/restore@v4
222208
with:
223209
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
224210
path: ~/.cabal/store
@@ -248,7 +234,7 @@ jobs:
248234
rm -f cabal.project.local
249235
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
250236
- name: save cache
251-
uses: actions/cache/save@v3
237+
uses: actions/cache/save@v4
252238
if: always()
253239
with:
254240
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}

.github/workflows/simple.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ 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+
# Older GHCs need LLVM on macos-latest (ARM)
18+
ghc: ['9.2','9.4.8','9.6.6','9.8.2','9.10.1']
1819
fail-fast: false
1920
timeout-minutes:
2021
60
@@ -26,24 +27,24 @@ jobs:
2627
2728
- name: Set up Haskell
2829
id: setup-haskell
29-
uses: haskell/actions/setup@v2
30+
uses: haskell-actions/setup@v2
3031
with:
3132
ghc-version: ${{ matrix.ghc }}
3233
cabal-version: '3.10.2.0'
3334

3435
- name: Set up PostgreSQL
35-
uses: ikalnytskyi/action-setup-postgres@v3
36+
uses: ikalnytskyi/action-setup-postgres@v6
3637
id: postgres
3738
with:
3839
username: ci
3940
password: sw0rdfish
4041
database: test
4142

4243
- name: Checkout
43-
uses: actions/checkout@v3.0.2
44+
uses: actions/checkout@v4
4445

4546
- name: Cache
46-
uses: actions/cache@v2.1.3
47+
uses: actions/cache@v4
4748
with:
4849
path: ${{ steps.setup-haskell.outputs.cabal-store }}
4950
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ github.sha }}

postgresql-libpq.cabal

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
cabal-version: 2.4
22
name: postgresql-libpq
33
version: 0.10.1.0
4+
x-revision: 1
45
synopsis: low-level binding to libpq
56
description:
67
This is a binding to libpq: the C application
@@ -32,13 +33,14 @@ tested-with:
3233
|| ==9.4.8
3334
|| ==9.6.5
3435
|| ==9.8.2
36+
|| ==9.10.1
3537

3638
extra-source-files: CHANGELOG.md
3739

3840
custom-setup
3941
setup-depends:
4042
, base >=4.12.0.0 && <5
41-
, Cabal >=2.4 && <3.11
43+
, Cabal >=2.4 && <3.13
4244

4345
-- If true, use pkg-config, otherwise use the pg_config based build
4446
-- configuration
@@ -75,14 +77,14 @@ library
7577
Database.PostgreSQL.LibPQ.Ptr
7678

7779
build-depends:
78-
, base >=4.12.0.0 && <4.20
80+
, base >=4.12.0.0 && <4.21
7981
, bytestring >=0.10.8.2 && <0.13
8082

8183
if !os(windows)
8284
build-depends: unix >=2.7.2.2 && <2.9
8385

8486
if os(windows)
85-
build-depends: Win32 >=2.2.0.2 && <2.14
87+
build-depends: Win32 >=2.2.0.2 && <2.15
8688

8789
if flag(use-pkg-config)
8890
pkgconfig-depends: libpq >=10.22

0 commit comments

Comments
 (0)