Skip to content

Commit 3199ebd

Browse files
authored
Merge pull request #11 from haskellari/prepare-release
Allow Win32-2.10
2 parents 6eb5968 + df6489f commit 3199ebd

File tree

8 files changed

+119
-11
lines changed

8 files changed

+119
-11
lines changed

.travis.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This Travis job script has been generated by a script via
22
#
3-
# haskell-ci '--branches' 'master' 'postgresql-libpq.cabal'
3+
# haskell-ci '--config=cabal.haskell-ci' 'postgresql-libpq.cabal'
44
#
55
# To regenerate the script (for example after adjusting tested-with) run
66
#
@@ -20,6 +20,10 @@ git:
2020
branches:
2121
only:
2222
- master
23+
services:
24+
- postgresql
25+
addons:
26+
postgresql: "10"
2327
cache:
2428
directories:
2529
- $HOME/.cabal/packages
@@ -38,39 +42,51 @@ jobs:
3842
include:
3943
- compiler: ghc-8.10.2
4044
addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.10.2","cabal-install-3.4"]}}
45+
env: DATABASE_CONNSTRING=travis
4146
os: linux
4247
- compiler: ghc-8.8.4
4348
addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.8.4","cabal-install-3.4"]}}
49+
env: DATABASE_CONNSTRING=travis
4450
os: linux
4551
- compiler: ghc-8.6.5
4652
addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.6.5","cabal-install-3.4"]}}
53+
env: DATABASE_CONNSTRING=travis
4754
os: linux
4855
- compiler: ghc-8.4.4
4956
addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.4.4","cabal-install-3.4"]}}
57+
env: DATABASE_CONNSTRING=travis
5058
os: linux
5159
- compiler: ghc-8.2.2
5260
addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.2.2","cabal-install-3.4"]}}
61+
env: DATABASE_CONNSTRING=travis
5362
os: linux
5463
- compiler: ghc-8.0.2
5564
addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.0.2","cabal-install-3.4"]}}
65+
env: DATABASE_CONNSTRING=travis
5666
os: linux
5767
- compiler: ghc-7.10.3
5868
addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-7.10.3","cabal-install-3.4"]}}
69+
env: DATABASE_CONNSTRING=travis
5970
os: linux
6071
- compiler: ghc-7.8.4
6172
addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-7.8.4","cabal-install-3.4"]}}
73+
env: DATABASE_CONNSTRING=travis
6274
os: linux
6375
- compiler: ghc-7.6.3
6476
addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-7.6.3","cabal-install-3.4"]}}
77+
env: DATABASE_CONNSTRING=travis
6578
os: linux
6679
- compiler: ghc-7.4.2
6780
addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-7.4.2","cabal-install-3.4"]}}
81+
env: DATABASE_CONNSTRING=travis
6882
os: linux
6983
- compiler: ghc-7.2.2
7084
addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-7.2.2","cabal-install-3.4"]}}
85+
env: DATABASE_CONNSTRING=travis
7186
os: linux
7287
- compiler: ghc-7.0.4
7388
addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-7.0.4","cabal-install-3.4"]}}
89+
env: DATABASE_CONNSTRING=travis
7490
os: linux
7591
before_install:
7692
- HC=$(echo "/opt/$CC/bin/ghc" | sed 's/-/\//')
@@ -169,5 +185,5 @@ script:
169185
- rm -f cabal.project.local
170186
- ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks all
171187

172-
# REGENDATA ("0.11.20200918",["--branches","master","postgresql-libpq.cabal"])
188+
# REGENDATA ("0.11.20200918",["--config=cabal.haskell-ci","postgresql-libpq.cabal"])
173189
# EOF

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
-------
33

44
- Support `bytestring-0.11`
5+
- Allow `Win32-2.10.0.0`
56
- Make `PQconsumeInput` FFI call `safe`
67

78
0.9.4.2

appveyor.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
clone_folder: "c:\\WORK"
2+
3+
branches:
4+
only:
5+
- master
6+
7+
services:
8+
- postgresql96
9+
10+
environment:
11+
global:
12+
CABOPTS: "--store-dir=C:\\SR --http-transport=plain-http"
13+
PGUSER: postgres
14+
PGPASSWORD: Password12!
15+
PGPORT: "5432"
16+
DATABASE_CONNSTRING: appveyor
17+
matrix:
18+
# 64 bit builds
19+
- GHCVER: "8.8.1"
20+
CHOCOPTS:
21+
- GHCVER: "8.6.5"
22+
CHOCOPTS:
23+
- GHCVER: "8.4.4"
24+
CHOCOPTS:
25+
- GHCVER: "8.2.2"
26+
CHOCOPTS:
27+
- GHCVER: "8.0.2"
28+
CHOCOPTS:
29+
- GHCVER: "7.10.3.2"
30+
CHOCOPTS:
31+
32+
# Fails to link
33+
#
34+
# - GHCVER: "7.8.4.1"
35+
# CHOCOPTS:
36+
37+
# 32 bit builds
38+
39+
# Linker errors...
40+
41+
# - GHCVER: "8.6.5"
42+
# CHOCOPTS: --forcex86
43+
# - GHCVER: "8.4.4"
44+
# CHOCOPTS: --forcex86
45+
# - GHCVER: "8.2.2"
46+
# CHOCOPTS: --forcex86
47+
48+
# older segfault?
49+
50+
cache:
51+
- "C:\\SR"
52+
53+
install:
54+
- "choco install -y ghc --version %GHCVER% %CHOCOPTS%"
55+
- "choco install -y cabal %CHOCOPTS%"
56+
- "refreshenv"
57+
- "set PATH=C:\\ghc\\ghc-%GHCVER%:C:\\msys64\\mingw64\\bin;C:\\msys64\\usr\\bin;%PATH%"
58+
- "cabal --version"
59+
- "ghc --version"
60+
61+
- set PATH=C:\Progra~1\PostgreSQL\9.6\bin\;%PATH%
62+
63+
build: off
64+
65+
test_script:
66+
- "cabal %CABOPTS% update -v"
67+
- createdb TestDb
68+
- IF EXIST configure.ac bash -c "autoreconf -i"
69+
- "move cabal.project.local.win cabal.project.local"
70+
- "cabal %CABOPTS% v2-build -j1 all"
71+
# - "cabal %CABOPTS% v2-test -j1 all"
72+
- "cabal %CABOPTS% v2-run smoke"

cabal.haskell-ci

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
branches: master
2+
postgresql: True
3+
4+
env: 7.0.4:DATABASE_CONNSTRING=travis
5+
env: 7.2.2:DATABASE_CONNSTRING=travis
6+
env: 7.4.2:DATABASE_CONNSTRING=travis
7+
env: 7.6.3:DATABASE_CONNSTRING=travis
8+
env: 7.8.4:DATABASE_CONNSTRING=travis
9+
env: 7.10.3:DATABASE_CONNSTRING=travis
10+
env: 8.0.2:DATABASE_CONNSTRING=travis
11+
env: 8.2.2:DATABASE_CONNSTRING=travis
12+
env: 8.4.4:DATABASE_CONNSTRING=travis
13+
env: 8.6.5:DATABASE_CONNSTRING=travis
14+
env: 8.8.4:DATABASE_CONNSTRING=travis
15+
env: 8.10.2:DATABASE_CONNSTRING=travis

cabal.project

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
packages: .

cabal.project.local.win

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

postgresql-libpq.cabal

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ description:
99
backend server and to receive the results of
1010
these queries.
1111

12-
homepage: https://github.com/phadej/postgresql-libpq
12+
homepage: https://github.com/haskellari/postgresql-libpq
13+
bug-reports: https://github.com/haskellari/postgresql-libpq/issues
1314
license: BSD3
1415
license-file: LICENSE
1516
author: Grant Monroe, Leon P Smith, Joey Adams
@@ -66,7 +67,7 @@ library
6667
build-depends: unix >=2.4.2.0 && <2.8
6768

6869
if os(windows)
69-
build-depends: Win32 >=2.2.0.2 && <2.7
70+
build-depends: Win32 >=2.2.0.2 && <2.11
7071

7172
ghc-options: -Wall
7273

@@ -104,9 +105,4 @@ test-suite smoke
104105

105106
source-repository head
106107
type: git
107-
location: https://github.com/phadej/postgresql-libpq
108-
109-
source-repository this
110-
type: git
111-
location: https://github.com/phadej/postgresql-libpq
112-
tag: v0.9.4.0
108+
location: https://github.com/haskellari/postgresql-libpq

test/Smoke.hs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@ main = do
1010
env <- getEnvironment
1111
case lookup "DATABASE_CONNSTRING" env of
1212
Nothing -> putStrLn "Set DATABASE_CONNSTRING environment variable"
13-
Just s -> smoke (BS8.pack s)
13+
Just s -> smoke (BS8.pack (special s))
14+
where
15+
-- https://www.appveyor.com/docs/services-databases/
16+
special "appveyor" = "dbname='TestDb' user='postgres' password='Password12!'"
17+
special "travis" = ""
18+
special s = s
1419

1520
smoke :: BS8.ByteString -> IO ()
1621
smoke connstring = do

0 commit comments

Comments
 (0)