forked from pyproj4/pyproj
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
128 lines (115 loc) · 3.93 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
language: python
sudo: false
cache:
directories:
- $PROJ_BASE_DIR
- $HOME/.cache/pip
env:
global:
- PROJ_BASE_DIR=$HOME/proj_install
- CYTHON_COVERAGE=True
- PROJSOURCE=6.2.0
# Following generated with
- WHEELHOUSE_UPLOADER_USERNAME=travis-worker
# Following generated by
# travis encrypt -r jswhit/pyproj WHEELHOUSE_UPLOADER_SECRET=<api key>
- secure: "IoTBjr6e/eBQWtGleP1X36SpocljQxsmJZ+EcVGhJ4v3GZaECLLklKtrWf8DyygFNPFIZ5Tri/C5rPTbuioG6gWtrL8QPgXOK9MI1QZqmfx/kNi0tmH0g9BxL0jlhP8SInZFsfO4m8qJkYJwh3DqBudQhmbDabnMbX2h7hKKTSA="
# Doctr deploy key for pyproj4/pyproj
- secure: "V9hQpdQmIOlk/Wvy0NIntlwSI1OvJ12cTrNPBIvwOy86kyPSk4qFj2YMixvcViM235iiCehN+Ray7FIeeHkPVZe9S+zFgVDxFf/RcgBt7tuhLrOoD1AH6pk9/h+z1owZYAboseLU05wv2+T+am0gCz40kES8As7v6bP+xsw69rw="
matrix:
include:
- language: cpp
os: osx
env:
- PYTHON=3.6.8
- PROJSOURCE=6.2.0
- python: 3.5
env:
- PROJSOURCE=6.2.0
- python: 3.6
env:
- PROJSOURCE=6.2.0
- python: 3.7
dist: xenial
env:
- PROJSOURCE=6.2.0
- DOC=true
- python: "nightly"
env:
- PROJSOURCE=git
allow_failures:
- python: "nightly"
env:
- PROJSOURCE=git
before_install:
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew update
brew install sqlite3 wget openssl readline
# from https://pythonhosted.org/CodeChat/.travis.yml.html
brew outdated pyenv || brew upgrade pyenv
# virtualenv doesn't work without pyenv knowledge. venv in Python 3.3
# doesn't provide Pip by default. So, use `pyenv-virtualenv <https://github.com/yyuu/pyenv-virtualenv/blob/master/README.md>`_.
brew install pyenv-virtualenv
pyenv install $PYTHON
# I would expect something like ``pyenv init; pyenv local $PYTHON`` or
# ``pyenv shell $PYTHON`` would work, but ``pyenv init`` doesn't seem to
# modify the Bash environment. ??? So, I hand-set the variables instead.
export PYENV_VERSION=$PYTHON
export PATH="/Users/travis/.pyenv/shims:${PATH}"
pyenv-virtualenv venv
source venv/bin/activate
# A manual check that the correct version of Python is running.
python --version
else
sudo apt-get install -qq sqlite3 libsqlite3-dev
fi
- |
if [[ "$TRAVIS_OS_NAME" == "osx" && -n "$PYPROJ_OMP" ]]; then
# install OpenMP not present by default on osx
brew install libomp
# enable OpenMP support for Apple-clang
export CC=/usr/bin/clang
export CXX=/usr/bin/clang++
export CPPFLAGS="$CPPFLAGS -Xpreprocessor -fopenmp"
export CFLAGS="$CFLAGS -I/usr/local/opt/libomp/include"
export CXXFLAGS="$CXXFLAGS -I/usr/local/opt/libomp/include"
export LDFLAGS="$LDFLAGS -L/usr/local/opt/libomp/lib -lomp"
export DYLD_LIBRARY_PATH=/usr/local/opt/libomp/lib
# avoid error due to multiple OpenMP libraries loaded simultaneously
export KMP_DUPLICATE_LIB_OK=TRUE
fi
- echo "PROJSOURCE is $PROJSOURCE"
# Download external PROJ.4 version and compile if not existing already
- export PROJ_DIR=$PROJ_BASE_DIR/proj-${PROJSOURCE:0:5}
- |
if [ "$PROJSOURCE" = "git" ] || [[ "$PROJSOURCE" != "git" && ! -d "$PROJ_DIR" ]]; then
ci/travis/proj-dl-and-compile "$PROJSOURCE"
fi
- export PROJ_LIB=$PROJ_DIR/share/proj
install:
# coverage report requires a local install
- pip install 'pip>=10.0.1'
- make install-dev
- pip install coveralls
script:
- python -c "import pyproj; pyproj.Proj('epsg:4269')"
- make test-coverage
# Building and uploading docs with doctr
- set -e
- |
if [ "$DOC" ]; then
make install-docs
make docs
pip install doctr
if [[ -z "$TRAVIS_TAG" ]]; then
DEPLOY_DIR=latest;
else
DEPLOY_DIR="$TRAVIS_TAG";
fi
doctr deploy --build-tags --built-docs docs/_build/html $DEPLOY_DIR
fi
after_success:
- coveralls
notifications:
email: false