Skip to content

Commit 49fc69e

Browse files
authored
Merge pull request #253 from pblottiere/travis
Add travis jobs for multiple PostgreSQL / PostGIS versions
2 parents dda0cb9 + f55cd38 commit 49fc69e

14 files changed

Lines changed: 1970 additions & 37 deletions

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,8 @@ pgsql/pointcloud.control
1717
pgsql/pointcloud--*
1818
pgsql_postgis/pointcloud_postgis.control
1919
pgsql_postgis/pointcloud_postgis--*
20+
21+
pgsql/pc_access.bc
22+
pgsql/pc_editor.bc
23+
pgsql/pc_inout.bc
24+
pgsql/pc_pgsql.bc

.travis.yml

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,36 @@
11
language: c
2-
dist: trusty
32

4-
before_install:
5-
- sudo apt-get update
6-
- sudo apt-get install -q postgresql-server-dev-9.6 libcunit1-dev valgrind
7-
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
8-
- sudo apt-get update -qq
9-
10-
install:
11-
- sudo apt-get install -qq g++-4.8
12-
- export CXX="g++-4.8"
13-
- sh .install-lazperf.sh
14-
- npm install -g eclint@1.1.5
15-
16-
addons:
17-
postgresql: "9.6" # for "installcheck"
18-
apt:
19-
packages:
20-
- postgresql-9.6-postgis-2.4
21-
22-
# Note: Valgrind currently reports many problems when libght is enabled. So for
23-
# now, and until the problems are fixed, we just run the unit tests with libght
24-
# enabled.
3+
jobs:
4+
include:
5+
- env: POSTGRESQL_VERSION="9.6" POSTGIS_VERSION="2.5"
6+
dist: xenial
7+
- env: POSTGRESQL_VERSION="10" POSTGIS_VERSION="2.5"
8+
dist: xenial
9+
- env: POSTGRESQL_VERSION="11" POSTGIS_VERSION="2.5"
10+
dist: xenial
11+
- env: POSTGRESQL_VERSION="12" POSTGIS_VERSION="2.5"
12+
dist: bionic
13+
- env: POSTGRESQL_VERSION="12" POSTGIS_VERSION="3"
14+
dist: bionic
2515

2616
script:
17+
- sudo service postgresql stop
18+
- sudo apt-get remove postgresql* -y
19+
- sudo apt-get install -q postgresql-server-dev-$POSTGRESQL_VERSION postgresql-client-$POSTGRESQL_VERSION postgresql-$POSTGRESQL_VERSION-postgis-$POSTGIS_VERSION libcunit1-dev valgrind g++
20+
- sudo pg_dropcluster --stop $POSTGRESQL_VERSION main
21+
- sudo rm -rf /etc/postgresql/$POSTGRESQL_VERSION /var/lib/postgresql/$POSTGRESQL_VERSION
22+
- sudo pg_createcluster -u postgres $POSTGRESQL_VERSION main -- --auth-local trust --auth-host password
23+
- sudo /etc/init.d/postgresql start $POSTGRESQL_VERSION || sudo journalctl -xe
24+
- psql -c 'CREATE ROLE travis SUPERUSER LOGIN CREATEDB;' -U postgres
25+
- nvm install 8
26+
- npm install -g eclint@1.1.5
2727
- eclint check * */* */cunit/*
28+
- sh .install-lazperf.sh
2829
- ./tools/build-install.sh # test compilation without lazperf
2930
- ./tools/build-install.sh --with-lazperf=/usr/local && make check && ./tools/valgrind.sh
3031
- make installcheck || { cat pgsql/regression.diffs && false; }
3132
- (cd tools/benchmark_compression && sh compression_benchmark.sh)
33+
34+
after_failure:
35+
- cat pgsql/regression.out
36+
- cat pgsql/regression.diffs

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ After generating the configure script with ``autogen.sh``, ``./configure --help
2727

2828
Note: you can use ``--with-pgconfig`` on the ``./configure`` command line if you have multiple PostgreSQL installations on your system and want to target a specific one. For example:
2929

30-
- ``./configure --with-pgconfig=/usr/lib/postgresql/9.5/bin/pg_config``
30+
- ``./configure --with-pgconfig=/usr/lib/postgresql/12/bin/pg_config``
3131

3232
Run unit tests:
3333

config.mk.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,5 @@ LIB_A_LAZPERF = liblazperf.a
2020

2121
LAZPERF_STATUS = @LAZPERF_STATUS@
2222
LAZPERF_CPPFLAGS = @LAZPERF_CPPFLAGS@
23+
24+
PGSQL_MAJOR_VERSION = @PGSQL_MAJOR_VERSION@

configure.ac

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,8 @@ PGSQL_MAJOR_VERSION=`echo $PGSQL_FULL_VERSION | sed 's/[[^0-9]]*\([[0-9]]*\).*/\
207207
PGSQL_MINOR_VERSION=`echo $PGSQL_FULL_VERSION | sed 's/[[^0-9]]*\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
208208
PGSQL_VERSION="$PGSQL_MAJOR_VERSION$PGSQL_MINOR_VERSION"
209209

210+
AC_SUBST([PGSQL_MAJOR_VERSION])
211+
210212
PGSQL_PKGLIBDIR=`$PG_CONFIG --pkglibdir`
211213
PGSQL_LIBDIR=`$PG_CONFIG --libdir`
212214
PGSQL_SHAREDIR=`$PG_CONFIG --sharedir`

pgsql/Makefile.in

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,24 @@ DATA_built = \
3030
$(EXTENSION)--$(EXTVERSION).sql \
3131
$(UPGRADES)
3232

33-
REGRESS = pointcloud pointcloud_columns schema
33+
REGRESS =
3434

35+
ifeq ("$(PGSQL_MAJOR_VERSION)", "9")
36+
REGRESS += pointcloud_pg9
37+
else
38+
REGRESS += pointcloud
39+
endif
40+
41+
REGRESS += pointcloud_columns schema
42+
43+
ifeq ("$(PGSQL_MAJOR_VERSION)", "9")
3544
ifneq ("$(LAZPERF_STATUS)", "disabled")
36-
REGRESS += pointcloud-laz
45+
REGRESS += pointcloud_laz_pg9
46+
endif
47+
else
48+
ifneq ("$(LAZPERF_STATUS)", "disabled")
49+
REGRESS += pointcloud_laz
50+
endif
3751
endif
3852

3953
# Add in build/link flags for lib

pgsql/expected/pointcloud.out

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
set client_min_messages to ERROR;
2+
SET extra_float_digits = 0;
23
CREATE EXTENSION pointcloud;
34
SELECT PC_Version();
45
pc_version
@@ -238,10 +239,10 @@ CREATE TABLE IF NOT EXISTS pt_test (
238239
pt PCPOINT(1)
239240
);
240241
\d pt_test
241-
Table "public.pt_test"
242-
Column | Type | Modifiers
243-
--------+------------+-----------
244-
pt | pcpoint(1) |
242+
Table "public.pt_test"
243+
Column | Type | Collation | Nullable | Default
244+
--------+------------+-----------+----------+---------
245+
pt | pcpoint(1) | | |
245246

246247
DELETE FROM pt_test;
247248
INSERT INTO pt_test (pt) VALUES ('00000000020000000100000002000000030004');
@@ -305,10 +306,10 @@ CREATE TABLE IF NOT EXISTS pa_test (
305306
pa PCPATCH(1)
306307
);
307308
\d pa_test
308-
Table "public.pa_test"
309-
Column | Type | Modifiers
310-
--------+------------+-----------
311-
pa | pcpatch(1) |
309+
Table "public.pa_test"
310+
Column | Type | Collation | Nullable | Default
311+
--------+------------+-----------+----------+---------
312+
pa | pcpatch(1) | | |
312313

313314
DELETE FROM pa_test;
314315
INSERT INTO pa_test (pa) VALUES ('0000000002000000000000000200000002000000030000000500060000000200000003000000050008');
@@ -377,10 +378,10 @@ CREATE TABLE IF NOT EXISTS pa_test_dim (
377378
pa PCPATCH(3)
378379
);
379380
\d pa_test_dim
380-
Table "public.pa_test_dim"
381-
Column | Type | Modifiers
382-
--------+------------+-----------
383-
pa | pcpatch(3) |
381+
Table "public.pa_test_dim"
382+
Column | Type | Collation | Nullable | Default
383+
--------+------------+-----------+----------+---------
384+
pa | pcpatch(3) | | |
384385

385386
INSERT INTO pa_test_dim (pa) VALUES ('0000000003000000000000000200000002000000030000000500060000000200000003000000050008');
386387
INSERT INTO pa_test_dim (pa) VALUES ('000000000300000000000000020000000600000007000000050006000000090000000A00000005000A');

0 commit comments

Comments
 (0)