forked from Unidata/siphon
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
145 lines (134 loc) · 4.3 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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
# After changing this file, check it on:
# http://lint.travis-ci.org/
language: python
sudo: false
dist: xenial
addons:
artifacts:
target_paths: /
paths:
- $(find $WHEELDIR -newer $WHEELDIR/download_marker -name *.whl | tr [:space:] :)
apt:
packages:
- libhdf5-serial-dev
- libnetcdf-dev
python:
- 3.7
- 3.6
- 2.7
cache:
- pip
- directories:
- $HOME/local
env:
global:
- secure: "mFy/PJrAVKh9Uje1+R8cEOjY8/MDj/qqjn0+FqXCTZPmBMu7RLxTfASMB8QcHfDrJDhH3lEUqkt/uAbGsOKsDIWn/pjKqm6qyvsdw2ISoARommD5lOL3A3Q/Mti1Hz1u4J8CKa0zaGj88NmIyJ2zC8ZyrCl6qS6bTNv7E6A1AIs="
- WHEELHOUSE="https://unidata-python.s3.amazonaws.com/wheelhouse/index.html"
- WHEELDIR="wheelhouse/"
- EXTRAS="test"
- GH_PAGES_DIR="$HOME/gh-pages"
matrix:
- TASK="coverage"
- TASK="docs"
matrix:
include:
- python: "3.7-dev"
env: PRE="--pre"
- python: "3.7-dev"
env: TASK="docs" PRE="--pre"
- python: nightly
env: PRE="--pre"
allow_failures:
- python: "3.7-dev"
- python: nightly
before_install:
# Shapely dependency needed to keep from using Shapely's manylinux wheels
# which use a different geos that what we build cartopy with on Travis
- pip install --upgrade pip;
- pip install --upgrade setuptools;
- if [[ $TASK == "docs" ]]; then
if ! git describe --tags; then git fetch --depth=150; fi;
export EXTRAS="doc,examples,netcdf";
export EXTRA_PACKAGES="Cython pillow sphinx_rtd_theme==0.2.5b1.post1 shapely<1.5.17.post1";
ls $HOME/local/lib/;
if [[ ! -f $HOME/local/lib/libproj.so ]]; then
wget http://download.osgeo.org/proj/proj-4.9.3.tar.gz;
tar xf proj-4.9.3.tar.gz;
pushd proj-4.9.3;
./configure --prefix=$HOME/local;
make;
sed -i "" -e s/-I// proj.pc;
make install;
popd;
fi;
export PKG_CONFIG_PATH="$HOME/local/lib/pkgconfig";
export LD_LIBRARY_PATH="$HOME/local/lib";
pkg-config --modversion proj;
else
export TEST_OPTS="--flake8";
if [[ $TRAVIS_PYTHON_VERSION != 2.7 ]]; then
export EXTRA_PACKAGES="$EXTRA_PACKAGES flake8-bugbear";
fi;
if [[ $TASK == "coverage" ]]; then
export TEST_OPTS="$TEST_OPTS --cov=siphon";
pip install pytest-cov;
fi;
fi;
- mkdir $WHEELDIR;
- pip download -d $WHEELDIR ".[$EXTRAS]" $EXTRA_PACKAGES -f $WHEELHOUSE $PRE $VERSIONS;
- touch $WHEELDIR/download_marker && ls -lrt $WHEELDIR;
- if [[ $EXTRA_PACKAGES != "" ]]; then
travis_wait pip wheel -w $WHEELDIR $EXTRA_PACKAGES -f $WHEELHOUSE $PRE $VERSIONS;
pip install $EXTRA_PACKAGES --upgrade --upgrade-strategy=eager --no-index -f file://$PWD/$WHEELDIR $VERSIONS;
fi;
- travis_wait pip wheel -w $WHEELDIR ".[$EXTRAS]" $EXTRA_PACKAGES -f $WHEELHOUSE $PRE $VERSIONS;
- rm -f $WHEELDIR/siphon*.whl;
install:
- pip install ".[$EXTRAS]" --upgrade --upgrade-strategy=eager --no-index $PRE -f file://$PWD/$WHEELDIR $VERSIONS;
script:
- if [[ $TASK == "docs" ]]; then
doc8 README.rst docs;
export DOC8_RESULT=$?;
pushd docs;
make clean html linkcheck;
export DOC_BUILD_RESULT=$?;
popd;
if [[ $DOC_BUILD_RESULT -ne 0 || $DOC8_RESULT -ne 0 ]]; then
false;
fi;
else
flake8 --version;
python setup.py test --addopts "-s $TEST_OPTS --no-print-logs";
fi
after_script:
- if [[ $TASK == "coverage" ]]; then
pip install codecov codacy-coverage;
codecov -e TRAVIS_PYTHON_VERSION;
coverage xml;
python-codacy-coverage -r coverage.xml;
fi
before_deploy:
- if [[ $TASK == "docs" ]]; then
rm -f docs/build/html/_static/jquery-*.js;
rm -f docs/build/html/_static/underscore-*.js;
rm -f docs/build/html/.buildinfo;
fi
deploy:
- provider: pypi
user: dopplershift
password:
secure: RQNuBqUGZHgE7Ux9ud93i8IHiAtjy8mibkYoCbYrY4yhobnMT6cJED33jWyEyVHdQ0GIeAl1PQ7NVl4K9OG0L/KADfVLxEqEBoTu6m2Za5ywBDJChyD3N1XlZT/ix7jEIImrjyfcNLahhH8JLpFrBtIllO7JsMgUo3RtzHwBysg=
distributions: sdist bdist_wheel
upload_docs: no
on:
repo: Unidata/siphon
python: 3.6
condition: '$TASK == "coverage"'
tags: true
- provider: script
script: ci/deploy_docs.sh
skip_cleanup: true
on:
all_branches: true
python: 3.6
condition: '$TASK == "docs"'