Skip to content
This repository was archived by the owner on Jan 25, 2024. It is now read-only.

Commit 890a0a1

Browse files
authored
Merge pull request #2 from PostgREST/merge-upstream
Merge postgresql-libpq upstream as of 2022-12-29
2 parents cef92cb + e1eb91e commit 890a0a1

File tree

11 files changed

+593
-443
lines changed

11 files changed

+593
-443
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 18 additions & 13 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.13.20211111
11+
# version: 0.15.20220826
1212
#
13-
# REGENDATA ("0.13.20211111",["github","postgresql-libpq.cabal"])
13+
# REGENDATA ("0.15.20220826",["github","postgresql-libpq.cabal"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -23,7 +23,7 @@ on:
2323
jobs:
2424
linux:
2525
name: Haskell-CI - Linux - ${{ matrix.compiler }}
26-
runs-on: ubuntu-18.04
26+
runs-on: ubuntu-20.04
2727
timeout-minutes:
2828
60
2929
container:
@@ -38,15 +38,20 @@ jobs:
3838
strategy:
3939
matrix:
4040
include:
41-
- compiler: ghc-9.2.1
41+
- compiler: ghc-9.4.2
4242
compilerKind: ghc
43-
compilerVersion: 9.2.1
43+
compilerVersion: 9.4.2
4444
setup-method: ghcup
4545
allow-failure: false
46-
- compiler: ghc-9.0.1
46+
- compiler: ghc-9.2.4
4747
compilerKind: ghc
48-
compilerVersion: 9.0.1
49-
setup-method: hvr-ppa
48+
compilerVersion: 9.2.4
49+
setup-method: ghcup
50+
allow-failure: false
51+
- compiler: ghc-9.0.2
52+
compilerKind: ghc
53+
compilerVersion: 9.0.2
54+
setup-method: ghcup
5055
allow-failure: false
5156
- compiler: ghc-8.10.7
5257
compilerKind: ghc
@@ -116,18 +121,18 @@ jobs:
116121
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
117122
if [ "${{ matrix.setup-method }}" = ghcup ]; then
118123
mkdir -p "$HOME/.ghcup/bin"
119-
curl -sL https://downloads.haskell.org/ghcup/0.1.17.3/x86_64-linux-ghcup-0.1.17.3 > "$HOME/.ghcup/bin/ghcup"
124+
curl -sL https://downloads.haskell.org/ghcup/0.1.18.0/x86_64-linux-ghcup-0.1.18.0 > "$HOME/.ghcup/bin/ghcup"
120125
chmod a+x "$HOME/.ghcup/bin/ghcup"
121-
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER"
122-
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0
126+
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
127+
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
123128
else
124129
apt-add-repository -y 'ppa:hvr/ghc'
125130
apt-get update
126131
apt-get install -y "$HCNAME"
127132
mkdir -p "$HOME/.ghcup/bin"
128-
curl -sL https://downloads.haskell.org/ghcup/0.1.17.3/x86_64-linux-ghcup-0.1.17.3 > "$HOME/.ghcup/bin/ghcup"
133+
curl -sL https://downloads.haskell.org/ghcup/0.1.18.0/x86_64-linux-ghcup-0.1.18.0 > "$HOME/.ghcup/bin/ghcup"
129134
chmod a+x "$HOME/.ghcup/bin/ghcup"
130-
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0
135+
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
131136
fi
132137
env:
133138
HCKIND: ${{ matrix.compilerKind }}

.github/workflows/simple.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Simple
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
branches:
8+
- master
9+
10+
jobs:
11+
native:
12+
name: "Simple: GHC ${{ matrix.ghc }} on ${{ matrix.os }}"
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
matrix:
16+
os: [macos-latest, windows-latest]
17+
ghc: ['8.10','9.0','9.2','9.4.2']
18+
fail-fast: false
19+
timeout-minutes:
20+
60
21+
steps:
22+
- name: Set git to use LF
23+
run: |
24+
git config --global core.autocrlf false
25+
git config --global core.eol lf
26+
27+
- name: Set up Haskell
28+
id: setup-haskell
29+
uses: haskell/actions/setup@v1
30+
with:
31+
ghc-version: ${{ matrix.ghc }}
32+
cabal-version: '3.8.1.0'
33+
34+
- name: Set up PostgreSQL
35+
uses: ikalnytskyi/action-setup-postgres@v3
36+
id: postgres
37+
with:
38+
username: ci
39+
password: sw0rdfish
40+
database: test
41+
42+
- name: Checkout
43+
uses: actions/checkout@v3.0.2
44+
45+
- name: Cache
46+
uses: actions/cache@v2.1.3
47+
with:
48+
path: ${{ steps.setup-haskell.outputs.cabal-store }}
49+
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ github.sha }}
50+
restore-keys: ${{ runner.os }}-${{ matrix.ghc }}-
51+
52+
- name: Build
53+
run: cabal build all --enable-tests
54+
55+
- name: Test
56+
run: cabal test all --enable-tests --test-show-details=direct
57+
env:
58+
DATABASE_CONNSTRING: ${{ steps.postgres.outputs.connection-uri }}

appveyor.yml

Lines changed: 0 additions & 80 deletions
This file was deleted.

cabal.haskell-ci

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ postgresql: True
33

44
-- due build-type: Custom
55
test-output-direct: False
6+
haddock-components: libs

postgresql-libpq.cabal

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,16 @@ tested-with:
3636
|| ==8.6.5
3737
|| ==8.8.4
3838
|| ==8.10.7
39-
|| ==9.0.1
40-
|| ==9.2.1
39+
|| ==9.0.2
40+
|| ==9.2.4
41+
|| ==9.4.2
4142

4243
extra-source-files: CHANGELOG.md
4344

4445
custom-setup
4546
setup-depends:
4647
base >=4.3 && <5
47-
, Cabal >=1.10 && <3.7
48+
, Cabal >=1.10 && <3.9
4849

4950
-- If true, use pkg-config, otherwise use the pg_config based build
5051
-- configuration
@@ -61,9 +62,15 @@ library
6162
Database.PostgreSQL.LibPQ
6263
Database.PostgreSQL.LibPQ.Internal
6364

64-
other-modules: Database.PostgreSQL.LibPQ.Compat
65+
other-modules:
66+
Database.PostgreSQL.LibPQ.Compat
67+
Database.PostgreSQL.LibPQ.Enums
68+
Database.PostgreSQL.LibPQ.Marshal
69+
Database.PostgreSQL.LibPQ.Notify
70+
Database.PostgreSQL.LibPQ.Oid
71+
6572
build-depends:
66-
base >=4.3 && <4.17
73+
base >=4.3 && <4.18
6774
, bytestring >=0.9.1.0 && <0.12
6875

6976
if !os(windows)

0 commit comments

Comments
 (0)