Travis: Test with Postgresql 9.5 and 10, and Postgis 2.4

This commit is contained in:
Raul Marin 2018-09-04 17:25:03 +02:00
parent 4b246d34c8
commit c0a7714f33
2 changed files with 18 additions and 35 deletions

View File

@ -1,43 +1,23 @@
language: c language: c
dist: precise dist: trusty
sudo: required sudo: required
addons: env:
postgresql: 9.5 - PGUSER=postgres PGDATABASE=postgres
env:
- POSTGRESQL_VERSION="9.5", POSTGIS_VERSION="2.4"
- POSTGRESQL_VERSION="10", POSTGIS_VERSION="2.4"
before_install: before_install:
# Add custom PPAs from cartodb - export POSTGIS_PACKAGE_VERSION=$(apt list postgis -a 2>/dev/null | grep $POSTGIS_VERSION | awk '{ print $2 }')
- sudo add-apt-repository -y ppa:cartodb/postgresql-9.5 - sudo service postgresql stop;
- sudo add-apt-repository -y ppa:cartodb/gis - 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 postgis=$POSTGIS_PACKAGE_VERSION postgresql-$POSTGRESQL_VERSION-postgis-scripts postgresql-$POSTGRESQL_VERSION-postgis-$POSTGIS_VERSION postgresql-plpython-$POSTGRESQL_VERSION
- sudo add-apt-repository -y ppa:cartodb/gis-testing - echo -e "# TYPE DATABASE USER ADDRESS METHOD \nlocal all postgres trust\nlocal all all trust\nhost all all 127.0.0.1/32 trust" | sudo tee /etc/postgresql/$POSTGRESQL_VERSION/main/pg_hba.conf
- sudo apt-get update - export PGPORT=`grep ^port /etc/postgresql/$POSTGRESQL_VERSION/main/postgresql.conf | awk '{print $3}'`
- export PGUSER=postgres
# Force instalation of libgeos-3.5.0 (presumably needed because of existing version of postgis) - export PGDATABASE=postgres
- sudo apt-get -y install libgeos-3.5.0=3.5.0-1cdb2 - sudo service postgresql restart $POSTGRESQL_VERSION;
# Install postgres db and build deps
- sudo /etc/init.d/postgresql stop # stop travis default instance
- sudo apt-get -y remove --purge postgresql-9.1
- sudo apt-get -y remove --purge postgresql-9.2
- sudo apt-get -y remove --purge postgresql-9.3
- sudo apt-get -y remove --purge postgresql-9.4
- sudo apt-get -y remove --purge postgresql-9.5
- sudo rm -rf /var/lib/postgresql/
- sudo rm -rf /var/log/postgresql/
- sudo rm -rf /etc/postgresql/
- sudo apt-get -y remove --purge postgis-2.2
- sudo apt-get -y autoremove
- sudo apt-get -y install postgresql-9.5=9.5.2-3cdb3
- sudo apt-get -y install postgresql-server-dev-9.5=9.5.2-3cdb3
- sudo apt-get -y install postgresql-plpython-9.5=9.5.2-3cdb3
- sudo apt-get -y install postgresql-9.5-postgis-scripts=2.2.2.0-cdb2
- sudo apt-get -y install postgresql-9.5-postgis-2.2=2.2.2.0-cdb2
# configure it to accept local connections from postgres
- echo -e "# TYPE DATABASE USER ADDRESS METHOD \nlocal all postgres trust\nlocal all all trust\nhost all all 127.0.0.1/32 trust" \
| sudo tee /etc/postgresql/9.5/main/pg_hba.conf
- sudo /etc/init.d/postgresql restart 9.5
script: script:
- make - make

View File

@ -1,3 +1,6 @@
0.24.0 (2018-XX-XX)
* Travis: Test with PostgreSQL 9.5 and 10.
0.23.2 (2018-07-19) 0.23.2 (2018-07-19)
* Fix `CDB_QueryTablesText` with parenthesized queries (#335) * Fix `CDB_QueryTablesText` with parenthesized queries (#335)