forked from Unidata/MetPy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
171 lines (159 loc) · 5.09 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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
# After changing this file, check it on:
# http://lint.travis-ci.org/
language: python
sudo: false
addons:
artifacts:
target_paths: /
paths:
- $(find $WHEELDIR -newer $WHEELDIR/download_marker -name *.whl | tr [:space:] :)
apt:
packages: &base_build
- libblas-dev
- liblapack-dev
- gfortran
- libproj-dev
python:
- 3.6
- 2.7
cache:
- pip
- directories:
- $HOME/local
env:
global:
- secure: "MOw+6pAQ8s7XX1U9Pbgw8SIuz5MHODj6PXe6xCSIyGR14/0KFNiR9s6NEIa9i7qnp7HOq/V2M9ZFPPioQCrL8k5V4XzZfNz6kXGUT8DoSAAnAAnDWy4yMRxYMlEcjSY8l0KZ9B3szxypkLh0Qd9+pHZYvRSLt8A8UcZSVSNGDjg="
- WHEELHOUSE="https://unidata-python.s3.amazonaws.com/wheelhouse/index.html"
- WHEELDIR="wheelhouse/"
- EXTRA_INSTALLS="test,cdm"
- MPLLOCALFREETYPE="1"
- TEST_OUTPUT_CONTROL="-s"
- GH_PAGES_DIR="$HOME/gh-pages"
matrix:
- TASK="coverage"
- TASK="docs"
matrix:
include:
- python: 2.7
env:
- VERSIONS="numpy==1.9.1 matplotlib==1.4.0 scipy==0.14.0 pint==0.8"
- TASK="coverage"
- TEST_OUTPUT_CONTROL=""
- python: 3.4
env:
- python: 3.5
env:
- python: "3.6-dev"
env: PRE="--pre"
- python: nightly
env: PRE="--pre"
allow_failures:
- python: "3.6-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;
- if [[ $TASK == "docs" ]]; then
if ! git describe --tags; then git fetch --depth=150; fi;
export EXTRA_INSTALLS="cdm,doc,examples";
export EXTRA_PACKAGES="Cython pillow shapely<1.5.17.post1 sphinx_rtd_theme pytest recommonmark";
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 --mpl";
if [[ $TRAVIS_PYTHON_VERSION == 3.6 ]]; then
export EXTRA_PACKAGES="$EXTRA_PACKAGES flake8-bugbear";
fi;
if [[ $TASK == "coverage" ]]; then
export TEST_OPTS="$TEST_OPTS --cov=metpy";
export EXTRA_PACKAGES="$EXTRA_PACKAGES pytest-cov";
fi;
fi;
- mkdir $WHEELDIR;
- pip download -d $WHEELDIR ".[$EXTRA_INSTALLS]" $EXTRA_PACKAGES -f $WHEELHOUSE $PRE $VERSIONS;
- touch $WHEELDIR/download_marker && ls -lrt $WHEELDIR;
- travis_wait pip wheel -w $WHEELDIR $EXTRA_PACKAGES -f $WHEELHOUSE $PRE $VERSIONS;
- pip install $EXTRA_PACKAGES --upgrade --no-index -f file://$PWD/$WHEELDIR $VERSIONS;
- travis_wait pip wheel -w $WHEELDIR ".[$EXTRA_INSTALLS]" $EXTRA_PACKAGES -f $WHEELHOUSE $PRE $VERSIONS;
- rm -f $WHEELDIR/MetPy*.whl;
install:
- pip install ".[$EXTRA_INSTALLS]" --upgrade --no-index $PRE -f file://$PWD/$WHEELDIR $VERSIONS;
script:
- if [[ $TASK == "docs" ]]; then
export TEST_DATA_DIR=${TRAVIS_BUILD_DIR}/testdata;
pushd docs;
make clean html linkcheck;
export DOC_BUILD_RESULT=$?;
popd;
if [[ $TRAVIS_PYTHON_VERSION == 3.6 ]]; then
MPLBACKEND='agg' pytest --doctest-modules -k "not test" metpy;
export DOC_TEST_RESULT=$?;
else
export DOC_TEST_RESULT=0;
fi;
doc8 --file-encoding utf8 README.rst docs/;
if [[ $DOC_BUILD_RESULT -ne 0 || $DOC_TEST_RESULT -ne 0 || $? -ne 0 ]]; then
false;
fi;
else
flake8 --version;
python setup.py test --addopts "$TEST_OUTPUT_CONTROL $TEST_OPTS";
fi
after_script:
- if [[ $TASK == "coverage" ]]; then
pip install codecov codacy-coverage codeclimate-test-reporter;
codecov -e TRAVIS_PYTHON_VERSION;
coverage xml;
python-codacy-coverage -r coverage.xml;
codeclimate-test-reporter;
fi
before_deploy:
# Remove unused, unminified javascript from sphinx
- 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: VYbxLZZnQ1hR2WZwe6+NXLNVbxceDQzlaVM/G3PW8mYlnyWgIVJBgCcgpH22wT4IsNQqo1r9ow9HiybzwcU1VTZ9KXjYsjre/kCZob0jmuPKlDtujOLaMJFf0XzOw7Y/AFXaMakFA8ZOYJLaMXc0WMLwGT7Hw/oP/e2ztpVLxRA=
distributions: sdist bdist_wheel
upload_docs: no
on:
repo: Unidata/MetPy
python: 3.6
condition: '$TASK != "docs"'
tags: true
- provider: script
script: ci/deploy_docs.sh
skip_cleanup: true
on:
all_branches: true
python: 3.6
condition: '$TASK == "docs"'
- provider: script
script: ci/deploy_docs.sh
skip_cleanup: true
on:
tags: true
python: 3.6
condition: '$TASK == "docs"'
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/7d9db0e3c69256819df7