crankshaft/.travis.yml

49 lines
2.3 KiB
YAML
Raw Normal View History

language: c
sudo: required
2016-08-08 22:26:35 +08:00
2016-08-11 00:12:43 +08:00
env:
global:
- PAGER=cat
2019-02-08 01:30:22 +08:00
- PGUSER=postgres
- PGDATABASE=postgres
- PGOPTIONS='-c client_min_messages=NOTICE'
2019-12-19 20:03:36 +08:00
jobs:
include:
- env: POSTGRESQL_VERSION="9.6" POSTGIS_VERSION="2.5"
2020-04-07 19:17:33 +08:00
dist: xenial
2019-12-19 20:03:36 +08:00
- env: POSTGRESQL_VERSION="10" POSTGIS_VERSION="2.5"
2020-04-07 19:17:33 +08:00
dist: xenial
2019-12-19 20:03:36 +08:00
- env: POSTGRESQL_VERSION="11" POSTGIS_VERSION="2.5"
2020-04-07 19:17:33 +08:00
dist: xenial
2019-12-19 20:03:36 +08:00
- env: POSTGRESQL_VERSION="12" POSTGIS_VERSION="3"
2020-04-07 19:17:33 +08:00
dist: bionic
2016-08-11 00:12:43 +08:00
2016-08-08 22:26:35 +08:00
before_install:
2019-02-08 01:30:22 +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
2020-04-07 19:57:43 +08:00
- if [[ $POSTGRESQL_VERSION == '9.6' ]]; then sudo apt-get install -y postgresql-contrib-9.6; fi;
2019-12-19 20:03:36 +08:00
- 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
2019-12-19 23:35:10 +08:00
- 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;
2019-12-19 20:03:36 +08:00
2019-02-08 01:30:22 +08:00
- sudo pg_dropcluster --stop $POSTGRESQL_VERSION main
- sudo rm -rf /etc/postgresql/$POSTGRESQL_VERSION /var/lib/postgresql/$POSTGRESQL_VERSION
2020-04-07 19:17:33 +08:00
- sudo pg_createcluster -u postgres $POSTGRESQL_VERSION main --start -- -A trust
- export PGPORT=$(pg_lsclusters | grep $POSTGRESQL_VERSION | awk '{print $3}')
2019-02-08 01:30:22 +08:00
2016-08-09 21:44:36 +08:00
install:
2016-08-08 22:26:35 +08:00
- sudo make install
2016-08-09 21:44:36 +08:00
script:
2019-02-08 01:30:22 +08:00
- make test
2016-08-10 21:48:45 +08:00
- ./check-compatibility.sh
2019-02-08 01:30:22 +08:00
after_failure:
- pg_lsclusters
- cat src/pg/test/regression.diffs
2020-04-07 19:17:33 +08:00
- echo $PGPORT
- cat /var/log/postgresql/postgresql-$POSTGRESQL_VERSION-main.log