2014-05-08 17:38:29 +08:00
|
|
|
language: c
|
2017-10-24 20:56:56 +08:00
|
|
|
sudo: required
|
2014-05-08 17:38:29 +08:00
|
|
|
|
2018-09-04 23:25:03 +08:00
|
|
|
env:
|
2019-01-03 02:01:30 +08:00
|
|
|
global:
|
|
|
|
- PGUSER=postgres
|
|
|
|
- PGDATABASE=postgres
|
|
|
|
- PGOPTIONS='-c client_min_messages=NOTICE'
|
|
|
|
|
2019-10-23 00:35:51 +08:00
|
|
|
jobs:
|
|
|
|
include:
|
2019-10-23 23:18:50 +08:00
|
|
|
- env: POSTGRESQL_VERSION="9.6" POSTGIS_VERSION="2.5"
|
2019-12-26 22:54:42 +08:00
|
|
|
dist: xenial
|
2019-10-23 23:18:50 +08:00
|
|
|
- env: POSTGRESQL_VERSION="10" POSTGIS_VERSION="2.5"
|
2019-12-26 22:54:42 +08:00
|
|
|
dist: xenial
|
2019-10-23 23:18:50 +08:00
|
|
|
- env: POSTGRESQL_VERSION="11" POSTGIS_VERSION="2.5"
|
2019-12-26 22:54:42 +08:00
|
|
|
dist: xenial
|
2019-10-23 23:18:50 +08:00
|
|
|
- env: POSTGRESQL_VERSION="12" POSTGIS_VERSION="2.5"
|
2019-12-26 22:54:42 +08:00
|
|
|
dist: bionic
|
2019-10-23 23:18:50 +08:00
|
|
|
- env: POSTGRESQL_VERSION="12" POSTGIS_VERSION="3"
|
2019-12-26 22:54:42 +08:00
|
|
|
dist: bionic
|
2014-05-08 17:52:02 +08:00
|
|
|
|
2019-10-22 18:12:45 +08:00
|
|
|
script:
|
2019-01-03 02:01:30 +08:00
|
|
|
- sudo apt-get install -y --allow-unauthenticated --no-install-recommends --no-install-suggests postgresql-$POSTGRESQL_VERSION postgresql-client-$POSTGRESQL_VERSION postgresql-server-dev-$POSTGRESQL_VERSION postgresql-common
|
2019-05-31 22:18:47 +08:00
|
|
|
- if [[ $POSTGRESQL_VERSION == '9.6' ]]; then sudo apt-get install -y postgresql-contrib-9.6; fi;
|
2019-10-22 18:12:45 +08:00
|
|
|
- sudo apt-get install -y --allow-unauthenticated postgresql-$POSTGRESQL_VERSION-postgis-$POSTGIS_VERSION postgresql-$POSTGRESQL_VERSION-postgis-$POSTGIS_VERSION-scripts postgis
|
2019-10-22 21:49:31 +08:00
|
|
|
# For pre12, install plpython2. For PG12 install plpython3
|
2019-10-23 02:06:20 +08:00
|
|
|
- if [[ $POSTGRESQL_VERSION != '12' ]]; then sudo apt-get install -y postgresql-plpython-$POSTGRESQL_VERSION python python-redis; else sudo apt-get install -y postgresql-plpython3-12 python3 python3-redis; fi;
|
2019-01-03 02:01:30 +08:00
|
|
|
- sudo pg_dropcluster --stop $POSTGRESQL_VERSION main
|
2020-03-26 23:37:18 +08:00
|
|
|
- sudo rm -rf /etc/postgresql/$POSTGRESQL_VERSION /var/lib/postgresql/$POSTGRESQL_VERSION /var/ramfs/postgresql/$POSTGRESQL_VERSION
|
2020-03-26 23:49:53 +08:00
|
|
|
- sudo pg_createcluster -u postgres $POSTGRESQL_VERSION main --start -- --auth-local trust --auth-host password
|
2020-03-26 23:37:18 +08:00
|
|
|
- export PGPORT=$(pg_lsclusters | grep $POSTGRESQL_VERSION | awk '{print $3}')
|
2014-05-08 18:02:38 +08:00
|
|
|
- make
|
|
|
|
- sudo make install
|
2019-01-03 02:01:30 +08:00
|
|
|
- make installcheck
|
|
|
|
|
|
|
|
after_failure:
|
|
|
|
- pg_lsclusters
|
|
|
|
- cat regression.out
|
|
|
|
- cat regression.diffs
|
2020-03-26 23:37:18 +08:00
|
|
|
- echo $PGPORT
|
2020-03-26 23:49:53 +08:00
|
|
|
- cat /var/log/postgresql/postgresql-$POSTGRESQL_VERSION-main.log
|