-
Notifications
You must be signed in to change notification settings - Fork 9
/
.travis.yml
66 lines (66 loc) · 2.32 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
branches:
only:
- master
- /^v\d+\.\d+(\.\d+)?(-\S*)?$/
language: python
sudo: required
cache:
directories:
- $GDALINST
- ~/.cache/pip
env:
global:
- PIP_WHEEL_DIR=$HOME/.cache/pip/wheels
- PIP_FIND_LINKS=file://$HOME/.cache/pip/wheels
- GDALINST=$HOME/gdalinstall
- GDALBUILD=$HOME/gdalbuild
matrix:
#- GDALVERSION="1.11.2"
- GDALVERSION="2.2.3"
addons:
apt:
packages:
- gdal-bin
- libproj-dev
- libgdal-dev
python:
#- '2.7'
- '3.6'
before_install:
- pip install -U pip
- pip install tox
- pip install wheel
- pip install coveralls>=1.1 --upgrade
- . docs/travis_gdal_install.sh
- export PATH=$GDALINST/gdal-$GDALVERSION/bin:$PATH
- export LD_LIBRARY_PATH=$GDALINST/gdal-$GDALVERSION/lib:$LD_LIBRARY_PATH
- export GDAL_DATA=$GDALINST/gdal-$GDALVERSION/share/gdal
- gdal-config --version
install:
- if [ $(gdal-config --version) == "$GDALVERSION" ]; then echo "Using gdal $GDALVERSION"; else echo "NOT using gdal $GDALVERSION as expected; aborting"; exit 1; fi
- pip install -r requirements_dev.txt --upgrade
# matplotlib is recommended to be installed by users manually now before using pygeoc
- pip install matplotlib
- GDAL_CONFIG=$GDALINST/gdal-$GDALVERSION/bin/gdal-config
- pip install --upgrade --force-reinstall gdal==$GDALVERSION
script:
- python setup.py bdist_wheel
- cd dist
- for i in `find . -name *.whl`; do python -m pip install $i --upgrade; done
- cd ..
# doctest
- python -m pytest --doctest-modules pygeoc -v
# code coverage
- python -m pytest --cov pygeoc --cov-report term-missing
# update docs, only on py3.6 & GDAL 2.2.3 matrix
- openssl aes-256-cbc -K $encrypted_945a11aa95b5_key -iv $encrypted_945a11aa95b5_iv
-in docs/travisci_rsa.enc -out docs/travisci_rsa -d
- chmod 0600 docs/travisci_rsa
- cp docs/travisci_rsa ~/.ssh/id_rsa
- if [ $GDALVERSION == 2.2.3 ] && [ $TRAVIS_PYTHON_VERSION == 3.6 ]; then echo "Update docs by Doxygen"; fi
- if [ $GDALVERSION == 2.2.3 ] && [ $TRAVIS_PYTHON_VERSION == 3.6 ]; then chmod 700 docs/publish-docs; fi
- if [ $GDALVERSION == 2.2.3 ] && [ $TRAVIS_PYTHON_VERSION == 3.6 ]; then ./docs/publish-docs; fi
after_success:
- if [ $GDALVERSION == 2.2.3 ] && [ $TRAVIS_PYTHON_VERSION == 3.6 ]; then coveralls || echo "!! intermittent coveralls failure"; fi
notifications:
email: false