From 3783e343a3f88e56b379b9f6afaf2aa60cad2e07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Mar=C3=ADn?= Date: Tue, 7 Apr 2020 13:17:33 +0200 Subject: [PATCH 1/3] Run PG12 tests under bionic --- .travis.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index dd13c90..c3c8159 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,3 @@ -dist: xenial language: c sudo: required @@ -8,16 +7,19 @@ env: - PGUSER=postgres - PGDATABASE=postgres - PGOPTIONS='-c client_min_messages=NOTICE' - - PGPORT=5432 - - POSTGIS_VERSION="2.5" 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 before_install: @@ -31,8 +33,8 @@ before_install: - sudo pg_dropcluster --stop $POSTGRESQL_VERSION main - sudo rm -rf /etc/postgresql/$POSTGRESQL_VERSION /var/lib/postgresql/$POSTGRESQL_VERSION - - sudo pg_createcluster -u postgres $POSTGRESQL_VERSION main -- -A trust - - sudo /etc/init.d/postgresql start $POSTGRESQL_VERSION || sudo journalctl -xe + - sudo pg_createcluster -u postgres $POSTGRESQL_VERSION main --start -- -A trust + - export PGPORT=$(pg_lsclusters | grep $POSTGRESQL_VERSION | awk '{print $3}') install: - sudo make install @@ -44,3 +46,5 @@ script: after_failure: - pg_lsclusters - cat src/pg/test/regression.diffs + - echo $PGPORT + - cat /var/log/postgresql/postgresql-$POSTGRESQL_VERSION-main.log From e162547a0954d727b9c75a014a9f55d1d37d3f5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Mar=C3=ADn?= Date: Tue, 7 Apr 2020 13:28:40 +0200 Subject: [PATCH 2/3] PG12: Test with updated python packages --- .travis.yml | 3 +-- src/py/crankshaft/setup.py | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index c3c8159..0087162 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,8 +16,6 @@ jobs: 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 @@ -30,6 +28,7 @@ before_install: # For pre12, install plpython2. For PG12 install plpython3 - if [[ $POSTGRESQL_VERSION != '12' ]]; then sudo apt-get install -y postgresql-plpython-$POSTGRESQL_VERSION python python-pip python-software-properties python-joblib python-nose python-setuptools; else sudo apt-get install -y postgresql-plpython3-12 python3 python3-pip python3-software-properties python3-joblib python3-nose python3-setuptools; fi; + - if [[ $POSTGRESQL_VERSION == '12' ]]; then echo -e "joblib==0.11\nnumpy==1.13.3\nscipy==0.19.1\npysal==1.14.3\nscikit-learn==0.19.1" > ./src/py/crankshaft/requirements.txt && sed -i -e "s/.*install_requires.*$/ install_requires=['joblib==0.11.0', 'numpy==1.13.3', 'scipy==0.19.1', 'pysal==1.14.3', 'scikit-learn==0.19.1'],/g" ./src/py/crankshaft/setup.py; fi; - sudo pg_dropcluster --stop $POSTGRESQL_VERSION main - sudo rm -rf /etc/postgresql/$POSTGRESQL_VERSION /var/lib/postgresql/$POSTGRESQL_VERSION diff --git a/src/py/crankshaft/setup.py b/src/py/crankshaft/setup.py index bde596a..d1a2175 100644 --- a/src/py/crankshaft/setup.py +++ b/src/py/crankshaft/setup.py @@ -41,6 +41,7 @@ setup( # The choice of component versions is dictated by what's # provisioned in the production servers. # IMPORTANT NOTE: please don't change this line. Instead issue a ticket to systems for evaluation. + # NOTE2: For Bionic, .travis.yml is editing this line to match dependencies install_requires=['joblib==0.9.4', 'numpy==1.11.0', 'scipy==0.17.0', 'pysal==1.14.3', 'scikit-learn==0.17.0'], requires=['pysal', 'numpy', 'sklearn'], From 78fd7881801050b05954fbbc103c1f0926f7452c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Mar=C3=ADn?= Date: Tue, 7 Apr 2020 13:57:43 +0200 Subject: [PATCH 3/3] Travis: Don't remove other PG packages --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0087162..80af1f2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,9 +21,8 @@ jobs: before_install: - - sudo service postgresql stop; - - sudo apt-get remove postgresql* -y - 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