From 9caeacf912887d7993eaecb34a3a041d08c990c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Mar=C3=ADn?= Date: Thu, 2 Apr 2020 13:10:44 +0200 Subject: [PATCH] Travis: Move back to barebone travis and test with PG12 --- .travis.yml | 48 ++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 40 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4d59da3..9ae93c9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,43 @@ -language: generic +language: c sudo: required + env: - matrix: - - DOCKER_IMAGE=carto/postgresql10:latest - - DOCKER_IMAGE=carto/postgresql11:latest -services: - - docker -before_install: docker pull ${DOCKER_IMAGE} + global: + - PGUSER=postgres + - PGDATABASE=postgres + - PGOPTIONS='-c client_min_messages=NOTICE' + +jobs: + include: + - env: POSTGRESQL_VERSION="9.6" POSTGIS_VERSION="2.5" + dist: xenial + - env: POSTGRESQL_VERSION="10" POSTGIS_VERSION="2.5" + dist: xenial + - env: POSTGRESQL_VERSION="11" POSTGIS_VERSION="2.5" + dist: xenial + - env: POSTGRESQL_VERSION="12" POSTGIS_VERSION="2.5" + dist: bionic + - env: POSTGRESQL_VERSION="12" POSTGIS_VERSION="3" + dist: bionic + script: - - ./scripts/ci/docker-test.sh ${DOCKER_IMAGE} + - 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 + - if [[ $POSTGRESQL_VERSION == '9.6' ]]; then sudo apt-get install -y postgresql-contrib-9.6; fi; + - sudo apt-get install -y --allow-unauthenticated postgresql-$POSTGRESQL_VERSION-postgis-$POSTGIS_VERSION postgresql-$POSTGRESQL_VERSION-postgis-$POSTGIS_VERSION-scripts postgis + # For pre12, install plpython2. For PG12 install plpython3 + - 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; + - sudo pg_dropcluster --stop $POSTGRESQL_VERSION main + - sudo rm -rf /etc/postgresql/$POSTGRESQL_VERSION /var/lib/postgresql/$POSTGRESQL_VERSION /var/ramfs/postgresql/$POSTGRESQL_VERSION + - sudo pg_createcluster -u postgres $POSTGRESQL_VERSION main --start -- --auth-local trust --auth-host password + - export PGPORT=$(pg_lsclusters | grep $POSTGRESQL_VERSION | awk '{print $3}') + - cd src/pg/ + - make + - sudo make install + - make installcheck + +after_failure: + - pg_lsclusters + - cat test/regression.out + - cat test/regression.diffs + - echo $PGPORT + - sudo cat /var/log/postgresql/postgresql-$POSTGRESQL_VERSION-main.log