forked from Unidata/MetPy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
151 lines (142 loc) · 4.57 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
# 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.5
- 2.7
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"
matrix:
- TASK="coverage"
- TASK="examples"
matrix:
include:
- python: 2.7
env:
- VERSIONS="numpy==1.9.1 matplotlib==1.4.0 scipy==0.14.0 pint==0.7"
- TEST_OUTPUT_CONTROL=""
# Docs built on 2.7 because that's what readthedocs uses
- python: 2.7
env: TASK="docs"
addons:
apt:
packages:
- *base_build
- pandoc
- python: 3.3
env:
- python: 3.4
env:
- python: "3.5-dev"
env: PRE="--pre"
- python: "3.6-dev"
env: PRE="--pre"
- python: nightly
env: PRE="--pre"
allow_failures:
- python: "3.5-dev"
- python: "3.6-dev"
- python: nightly
before_install:
- pip install --upgrade pip;
- if [[ $TASK == "docs" ]]; then
pip install -r docs/requirements.txt -f $WHEELHOUSE;
else
if [[ $TASK == "examples" ]]; then
export EXTRA_INSTALLS="cdm,examples";
export EXTRA_PACKAGES="Cython nbconvert ipykernel";
wget https://github.com/OSGeo/proj.4/archive/4.9.2.tar.gz;
tar xf 4.9.2.tar.gz;
pushd proj.4-4.9.2;
./configure --prefix=$HOME/local;
make;
sed -i "" -e s/-I// proj.pc;
make install;
export PKG_CONFIG_PATH="$HOME/local/lib/pkgconfig";
export LD_LIBRARY_PATH="$HOME/local/lib";
pkg-config --modversion proj;
popd;
else
export TEST_OPTS="--flake8 --mpl";
if [[ $TRAVIS_PYTHON_VERSION == 3.5 ]]; then
pip install flake8-bugbear;
fi;
if [[ $TASK == "coverage" ]]; then
export TEST_OPTS="$TEST_OPTS --cov=metpy";
pip install 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;
fi
install:
- if [[ $TASK != "docs" ]]; then
pip install ".[$EXTRA_INSTALLS]" --upgrade --no-index $PRE -f file://$PWD/$WHEELDIR $VERSIONS;
if [[ $TASK == "examples" ]]; then
python setup.py examples;
fi;
fi
script:
- if [[ $TASK == "docs" ]]; then
pushd docs;
make html 2>../docs.log;
popd;
doc8 README.rst docs/source;
if [ -s docs.log -o $? -ne 0 ]; then
echo Doc build produced warnings or errors:;
cat docs.log;
false;
fi;
elif [[ $TASK == "examples" ]]; then
export TEST_DATA_DIR=${TRAVIS_BUILD_DIR}/testdata;
if [[ $TRAVIS_PYTHON_VERSION == 2* ]]; then
sed -i -e "s/python3/python2/" examples/notebooks/*.ipynb;
fi;
find examples/notebooks/ -name \*.ipynb -print0 | xargs -0 -n1 jupyter nbconvert --execute --ExecutePreprocessor.timeout=200 --to=notebook --stdout >| /dev/null;
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
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.5
condition: '$TASK == "coverage"'
tags: true