forked from statsmodels/statsmodels
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
178 lines (168 loc) · 5.31 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
172
173
174
175
176
177
178
# Travis script that uses miniconda in place of the system installed python
# versions. Allows substantial flexibility for choosing versions of
# required packages and is simpler to use to test up-to-date scientific Python
# stack
dist: xenial
sudo: required
language: python
git:
depth: 10000
env:
# Default values for common packages, override as needed
global:
- OPTIONAL=
- COVERAGE=false
- USEMPL=true
- MATPLOTLIB=
- DOCBUILD=false
- LINT=false
- MKL_NUM_THREADS=1 # Enforce single thread
- NUMEXPR_NUM_THREADS=1
- OMP_NUM_THREADS=1
- OPENBLAS_NUM_THREADS=1
- PYTHONHASHSEED=0 # Ensure tests are correctly gathered by xdist
- BLAS="mkl blas=*=mkl" # Use Intel MKL by default
- BUILD_INIT=tools/ci/travis_conda.sh
- DEPEND_ALWAYS="pyyaml joblib pip colorama"
- # Doctr deploy key for statsmodels/statsmodels.github.io
- secure: "AzwB23FWdilHKVcEJnj57AsoY5yKTWT8cQKzsH2ih9i08wIXvZXP/Ui8XRDygV9tDKfqGVltC7HpBBDE3C4ngeMlis4uuKWlkp0O1757YQe+OdDnimuDZhrh3ILEk7xW3ab5YizjLeyv3iiBW7cNS5z8W3Yu8HeJPkr6Ck30gAA="
- SM_CYTHON_COVERAGE=false # Run takes > 1 hour and so not feasible
matrix:
fast_finish: true
include:
# Python 2.7 + partially updated numpy, mpl; cutting edge scipy, pandas
- python: 2.7
env:
- PYTHON=2.7
- NUMPY=1.13
- MATPLOTLIB=2.0
- COVERAGE=true
# Python 2.7 + baseline packages
- python: 2.7
env:
- PYTHON=2.7
- NUMPY=1.12
- BLAS= # Do not specify blas in this config due to conflict
- SCIPY=0.19
- PANDAS=0.20
- USEMPL=false
- LINT=true
# Python 3.4 + baseline packages
- python: 3.4
env:
- PYTHON=3.4
- NUMPY=1.11
- SCIPY=0.18
- PANDAS=0.19
- MATPLOTLIB=1.5
# Python 3.7 + cutting edge packages
- python: 3.7
env:
- PYTHON=3.7
- COVERAGE=true
# Documentation build (on Python 3.6 + cutting edge packages)
- python: 3.6
env:
- PYTHON=3.7
- DOCBUILD=true
# Python 3.6 + legacy blas
- python: 3.6
env:
- PYTHON=3.6
- NUMPY=1.14
- BLAS="nomkl blas=*=openblas"
# Python 3.5 + partially updated packages
- python: 3.5
env:
- PYTHON=3.5
- NUMPY=1.13
- SCIPY=1.0
- PANDAS=0.22
- MATPLOTLIB=2.0
- LINT=true
# Latest pre-release packages
- python: 3.7
env:
- PIP_PRE=true
- BUILD_INIT=tools/ci/travis_pip.sh
- os: osx
language: generic
env:
- PYTHON=3.6.6
- NUMPY=1.14
- BUILD_INIT=tools/ci/travis_pip.sh
- os: osx
language: generic
env:
- PYTHON=3.7
allow_failures:
# pre-testing is a little fragile. Make it an FYI.
- python: 3.7
env:
- PIP_PRE=true
- BUILD_INIT=tools/ci/travis_pip.sh
- os: osx
language: generic
env:
- PYTHON=3.6.6
- NUMPY=1.14
- BUILD_INIT=tools/ci/travis_pip.sh
- os: osx
language: generic
env:
- PYTHON=3.7
notifications:
email:
on_success: always
before_install:
# Skip if commit message contains [skip travis] or [travis skip]
- COMMIT_MESSAGE=$(git show -s $TRAVIS_COMMIT_RANGE | awk 'BEGIN{count=0}{if ($1=="Author:") count++; if (count==1) print $0}')
- if [[ $TRAVIS_PULL_REQUEST == false ]]; then COMMIT_MESSAGE=${TRAVIS_COMMIT_MESSAGE}; fi
- if echo "$COMMIT_MESSAGE" | grep -E '\[(skip travis|travis skip)\]'; then exit 0 ; fi
# Show information about CPU running job to understand BLAS issues
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo lshw -class processor; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then sysctl -a | grep machdep.cpu; fi
# Fix for headless TravisCI
- "export DISPLAY=:99.0"
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then ( sh -e /etc/init.d/xvfb start )& fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then ( sudo Xvfb :99 -ac -screen 0 1024x768x8; echo ok )& fi
# Avoid noise from matplotlib
- mkdir -p $HOME/.config/matplotlib
- SRCDIR=$PWD
# Source recipe to install packages
- source $BUILD_INIT
- pip install pytest pip pytest-randomly nose
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then pip install pytest-xdist; fi;
- |
if [ ${COVERAGE} = true ]; then
pip install codecov coverage coveralls pytest-cov
export COVERAGE_OPTS="--cov=statsmodels --cov-report="
echo "Cython coverage:" ${SM_CYTHON_COVERAGE}
else
export COVERAGE_OPTS=""
fi
- pip install flake8
- export SRCDIR=$PWD
# Install packages
install:
- python setup.py develop
before_script:
- if [ ${DOCBUILD} = true ]; then source tools/ci/docbuild_install.sh; fi;
script:
# Show versions
- python -c 'import statsmodels.api as sm; sm.show_versions();'
# docbuild and exit, if required
- if [ ${DOCBUILD} = true ]; then cd ${SRCDIR}/docs; source ${SRCDIR}/tools/ci/docbuild.sh; exit 0; fi;
# Run tests
- |
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
export XDIST_OPTS="-n2"
else
export XDIST_OPTS=""
fi
- echo pytest -r a ${COVERAGE_OPTS} statsmodels --skip-examples ${XDIST_OPTS}
- pytest -r a ${COVERAGE_OPTS} statsmodels --skip-examples ${XDIST_OPTS}
- ./lint.sh
after_success:
- if [ ${COVERAGE} = true ]; then coveralls; fi
- if [ ${COVERAGE} = true ]; then codecov; fi