Skip to content

Commit 900abcb

Browse files
authored
Merge pull request #44 from haskellari/ghc-9.6
Allow GHC-9.6 bundled libs
2 parents 05278f8 + 4b7091d commit 900abcb

File tree

4 files changed

+45
-24
lines changed

4 files changed

+45
-24
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 27 additions & 16 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.15.20221225
11+
# version: 0.15.20230321
1212
#
13-
# REGENDATA ("0.15.20221225",["github","postgresql-libpq.cabal"])
13+
# REGENDATA ("0.15.20230321",["github","postgresql-libpq.cabal"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -38,14 +38,19 @@ jobs:
3838
strategy:
3939
matrix:
4040
include:
41-
- compiler: ghc-9.4.2
41+
- compiler: ghc-9.6.1
4242
compilerKind: ghc
43-
compilerVersion: 9.4.2
43+
compilerVersion: 9.6.1
4444
setup-method: ghcup
4545
allow-failure: false
46-
- compiler: ghc-9.2.4
46+
- compiler: ghc-9.4.4
4747
compilerKind: ghc
48-
compilerVersion: 9.2.4
48+
compilerVersion: 9.4.4
49+
setup-method: ghcup
50+
allow-failure: false
51+
- compiler: ghc-9.2.7
52+
compilerKind: ghc
53+
compilerVersion: 9.2.7
4954
setup-method: ghcup
5055
allow-failure: false
5156
- compiler: ghc-9.0.2
@@ -76,18 +81,18 @@ jobs:
7681
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
7782
if [ "${{ matrix.setup-method }}" = ghcup ]; then
7883
mkdir -p "$HOME/.ghcup/bin"
79-
curl -sL https://downloads.haskell.org/ghcup/0.1.18.0/x86_64-linux-ghcup-0.1.18.0 > "$HOME/.ghcup/bin/ghcup"
84+
curl -sL https://downloads.haskell.org/ghcup/0.1.19.2/x86_64-linux-ghcup-0.1.19.2 > "$HOME/.ghcup/bin/ghcup"
8085
chmod a+x "$HOME/.ghcup/bin/ghcup"
8186
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
82-
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
87+
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
8388
else
8489
apt-add-repository -y 'ppa:hvr/ghc'
8590
apt-get update
8691
apt-get install -y "$HCNAME"
8792
mkdir -p "$HOME/.ghcup/bin"
88-
curl -sL https://downloads.haskell.org/ghcup/0.1.18.0/x86_64-linux-ghcup-0.1.18.0 > "$HOME/.ghcup/bin/ghcup"
93+
curl -sL https://downloads.haskell.org/ghcup/0.1.19.2/x86_64-linux-ghcup-0.1.19.2 > "$HOME/.ghcup/bin/ghcup"
8994
chmod a+x "$HOME/.ghcup/bin/ghcup"
90-
"$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)
9196
fi
9297
env:
9398
HCKIND: ${{ matrix.compilerKind }}
@@ -105,13 +110,13 @@ jobs:
105110
echo "HC=$HC" >> "$GITHUB_ENV"
106111
echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV"
107112
echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV"
108-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
113+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
109114
else
110115
HC=$HCDIR/bin/$HCKIND
111116
echo "HC=$HC" >> "$GITHUB_ENV"
112117
echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
113118
echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
114-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
119+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
115120
fi
116121
117122
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
@@ -170,7 +175,7 @@ jobs:
170175
chmod a+x $HOME/.cabal/bin/cabal-plan
171176
cabal-plan --version
172177
- name: checkout
173-
uses: actions/checkout@v2
178+
uses: actions/checkout@v3
174179
with:
175180
path: source
176181
- name: initial cabal.project for sdist
@@ -205,8 +210,8 @@ jobs:
205210
run: |
206211
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
207212
cabal-plan
208-
- name: cache
209-
uses: actions/cache@v2
213+
- name: restore cache
214+
uses: actions/cache/restore@v3
210215
with:
211216
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
212217
path: ~/.cabal/store
@@ -230,8 +235,14 @@ jobs:
230235
${CABAL} -vnormal check
231236
- name: haddock
232237
run: |
233-
$CABAL v2-haddock $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
238+
$CABAL v2-haddock --disable-documentation $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
234239
- name: unconstrained build
235240
run: |
236241
rm -f cabal.project.local
237242
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
243+
- name: save cache
244+
uses: actions/cache/save@v3
245+
if: always()
246+
with:
247+
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
248+
path: ~/.cabal/store

.github/workflows/simple.yml

Lines changed: 9 additions & 2 deletions
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.4']
17+
ghc: ['8.10','9.0','9.2','9.4.4','9.6.1']
1818
fail-fast: false
1919
timeout-minutes:
2020
60
@@ -29,7 +29,7 @@ jobs:
2929
uses: haskell/actions/setup@v1
3030
with:
3131
ghc-version: ${{ matrix.ghc }}
32-
cabal-version: '3.8.1.0'
32+
cabal-version: '3.10.1.0'
3333

3434
- name: Set up PostgreSQL
3535
uses: ikalnytskyi/action-setup-postgres@v3
@@ -49,6 +49,13 @@ jobs:
4949
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ github.sha }}
5050
restore-keys: ${{ runner.os }}-${{ matrix.ghc }}-
5151

52+
- name: cabal.project.local
53+
if: matrix.os == 'windows-latest'
54+
run: cp cabal.project.local.win cabal.project.local
55+
56+
- name: ghc-pkg dump
57+
run: ghc-pkg list
58+
5259
- name: Build
5360
run: cabal build all --enable-tests
5461

cabal.project.local.win

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
package postgresql-libpq
2-
flags: -use-pkg-config
1+
constraints: Win32 installed
2+
3+
-- package postgresql-libpq
4+
-- flags: -use-pkg-config

postgresql-libpq.cabal

Lines changed: 5 additions & 4 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.9.5.0
4+
x-revision: 1
45
synopsis: low-level binding to libpq
56
description:
67
This is a binding to libpq: the C application
@@ -24,14 +25,14 @@ category: Database
2425
build-type: Custom
2526
extra-source-files: cbits/hs-libpq.h
2627
tested-with:
27-
GHC ==8.6.5 || ==8.8.4 || ==8.10.7 || ==9.0.2 || ==9.2.4 || ==9.4.2
28+
GHC ==8.6.5 || ==8.8.4 || ==8.10.7 || ==9.0.2 || ==9.2.7 || ==9.4.4 || ==9.6.1
2829

2930
extra-source-files: CHANGELOG.md
3031

3132
custom-setup
3233
setup-depends:
3334
, base >=4.12.0.0 && <5
34-
, Cabal >=2.4 && <3.9
35+
, Cabal >=2.4 && <3.11
3536

3637
-- If true, use pkg-config, otherwise use the pg_config based build
3738
-- configuration
@@ -67,11 +68,11 @@ library
6768
Database.PostgreSQL.LibPQ.Oid
6869

6970
build-depends:
70-
, base >=4.12.0.0 && <4.18
71+
, base >=4.12.0.0 && <4.19
7172
, bytestring >=0.10.8.2 && <0.12
7273

7374
if !os(windows)
74-
build-depends: unix >=2.7.2.2 && <2.8
75+
build-depends: unix >=2.7.2.2 && <2.9
7576

7677
if os(windows)
7778
build-depends: Win32 >=2.2.0.2 && <2.14

0 commit comments

Comments
 (0)