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

Merge postgresql-libpq upstream as of 2022-12-29 #2

Merged
merged 15 commits into from
Dec 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 18 additions & 13 deletions .github/workflows/haskell-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
#
# For more information, see https://github.com/haskell-CI/haskell-ci
#
# version: 0.13.20211111
# version: 0.15.20220826
#
# REGENDATA ("0.13.20211111",["github","postgresql-libpq.cabal"])
# REGENDATA ("0.15.20220826",["github","postgresql-libpq.cabal"])
#
name: Haskell-CI
on:
Expand All @@ -23,7 +23,7 @@ on:
jobs:
linux:
name: Haskell-CI - Linux - ${{ matrix.compiler }}
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
timeout-minutes:
60
container:
Expand All @@ -38,15 +38,20 @@ jobs:
strategy:
matrix:
include:
- compiler: ghc-9.2.1
- compiler: ghc-9.4.2
compilerKind: ghc
compilerVersion: 9.2.1
compilerVersion: 9.4.2
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.0.1
- compiler: ghc-9.2.4
compilerKind: ghc
compilerVersion: 9.0.1
setup-method: hvr-ppa
compilerVersion: 9.2.4
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.0.2
compilerKind: ghc
compilerVersion: 9.0.2
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.10.7
compilerKind: ghc
Expand Down Expand Up @@ -116,18 +121,18 @@ jobs:
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
if [ "${{ matrix.setup-method }}" = ghcup ]; then
mkdir -p "$HOME/.ghcup/bin"
curl -sL https://downloads.haskell.org/ghcup/0.1.17.3/x86_64-linux-ghcup-0.1.17.3 > "$HOME/.ghcup/bin/ghcup"
curl -sL https://downloads.haskell.org/ghcup/0.1.18.0/x86_64-linux-ghcup-0.1.18.0 > "$HOME/.ghcup/bin/ghcup"
chmod a+x "$HOME/.ghcup/bin/ghcup"
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER"
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
else
apt-add-repository -y 'ppa:hvr/ghc'
apt-get update
apt-get install -y "$HCNAME"
mkdir -p "$HOME/.ghcup/bin"
curl -sL https://downloads.haskell.org/ghcup/0.1.17.3/x86_64-linux-ghcup-0.1.17.3 > "$HOME/.ghcup/bin/ghcup"
curl -sL https://downloads.haskell.org/ghcup/0.1.18.0/x86_64-linux-ghcup-0.1.18.0 > "$HOME/.ghcup/bin/ghcup"
chmod a+x "$HOME/.ghcup/bin/ghcup"
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
fi
env:
HCKIND: ${{ matrix.compilerKind }}
Expand Down
58 changes: 58 additions & 0 deletions .github/workflows/simple.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Simple
on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
native:
name: "Simple: GHC ${{ matrix.ghc }} on ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest]
ghc: ['8.10','9.0','9.2','9.4.2']
fail-fast: false
timeout-minutes:
60
steps:
- name: Set git to use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf

- name: Set up Haskell
id: setup-haskell
uses: haskell/actions/setup@v1
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: '3.8.1.0'

- name: Set up PostgreSQL
uses: ikalnytskyi/action-setup-postgres@v3
id: postgres
with:
username: ci
password: sw0rdfish
database: test

- name: Checkout
uses: actions/checkout@v3.0.2

- name: Cache
uses: actions/cache@v2.1.3
with:
path: ${{ steps.setup-haskell.outputs.cabal-store }}
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ github.sha }}
restore-keys: ${{ runner.os }}-${{ matrix.ghc }}-

- name: Build
run: cabal build all --enable-tests

- name: Test
run: cabal test all --enable-tests --test-show-details=direct
env:
DATABASE_CONNSTRING: ${{ steps.postgres.outputs.connection-uri }}
80 changes: 0 additions & 80 deletions appveyor.yml

This file was deleted.

1 change: 1 addition & 0 deletions cabal.haskell-ci
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ postgresql: True

-- due build-type: Custom
test-output-direct: False
haddock-components: libs
17 changes: 12 additions & 5 deletions postgresql-libpq.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,16 @@ tested-with:
|| ==8.6.5
|| ==8.8.4
|| ==8.10.7
|| ==9.0.1
|| ==9.2.1
|| ==9.0.2
|| ==9.2.4
|| ==9.4.2

extra-source-files: CHANGELOG.md

custom-setup
setup-depends:
base >=4.3 && <5
, Cabal >=1.10 && <3.7
, Cabal >=1.10 && <3.9

-- If true, use pkg-config, otherwise use the pg_config based build
-- configuration
Expand All @@ -61,9 +62,15 @@ library
Database.PostgreSQL.LibPQ
Database.PostgreSQL.LibPQ.Internal

other-modules: Database.PostgreSQL.LibPQ.Compat
other-modules:
Database.PostgreSQL.LibPQ.Compat
Database.PostgreSQL.LibPQ.Enums
Database.PostgreSQL.LibPQ.Marshal
Database.PostgreSQL.LibPQ.Notify
Database.PostgreSQL.LibPQ.Oid

build-depends:
base >=4.3 && <4.17
base >=4.3 && <4.18
, bytestring >=0.9.1.0 && <0.12

if !os(windows)
Expand Down
Loading