forked from sympy/sympy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
298 lines (283 loc) · 8.33 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
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
language: python
stages:
- quality
- baseline
- test
- allowed_failures
env:
matrix:
- SPLIT="1/2" TEST_SYMPY="true"
- SPLIT="2/2" TEST_SYMPY="true"
- TEST_DOCTESTS="true" FASTCACHE="false" TEST_SETUP="true" TEST_EXAMPLES="true"
global:
- secure: "YIEZal9EBTL+fg2YmoZoS8Bvt3eAVUOZjb38CtqpzR2CCSXWoUk35KG23m2NknlY1iKfYJyt7XWBszT/VKOQEbWQq7PIakV4vIByrWacgBxy1x3WC+rZoW7TX+JJiL+y942qIYbMoNMMB8xFpE5RDLSjSecMpFhJJXoafVTvju8="
dist: trusty
python:
- 3.5
matrix:
fast_finish: true
include:
- stage: quality
python: 3.8
dist: xenial
sudo: true
script: bin/test quality
env:
- TEST_QUALITY="true"
- python: 3.8
dist: xenial
sudo: true
env:
- TEST_FLAKE8="true"
- stage: baseline
python: 3.8
dist: xenial
sudo: true
env:
- TEST_DOCTESTS="true" FASTCACHE="false" TEST_SETUP="true" TEST_EXAMPLES="true"
- python: 3.8
dist: xenial
sudo: true
env:
- SPLIT="1/2" TEST_SYMPY="true"
- python: 3.8
dist: xenial
sudo: true
env:
- SPLIT="2/2" TEST_SYMPY="true"
- python: 3.7
dist: xenial
# At the time of writing this is Python 3.7 but it will become 3.8 when
# all of the dependencies are supported on 3.8.
env:
- TEST_ASCII="true"
- TEST_OPT_DEPENDENCY="matchpy numpy scipy gmpy2 matplotlib theano llvmlite autowrap cython wurlitzer python-symengine=0.5.1 tensorflow numexpr ipython antlr-python-runtime>=4.7,<4.8 antlr>=4.7,<4.8 cloudpickle pyglet pycosat lfortran python-clang lxml"
- TEST_SAGE="true"
- SYMPY_STRICT_COMPILER_CHECKS=1
addons:
apt:
packages:
# for theano
- libatlas-dev
- libatlas-base-dev
- liblapack-dev
- gfortran
- python-scipy
- stage: test
python: 2.7
dist: xenial
sudo: true
env:
- TEST_PY2_IMPORT="true"
- python: 3.7
dist: xenial
env:
- TEST_DOCTESTS="true" FASTCACHE="false" TEST_SETUP="true" TEST_EXAMPLES="true"
- python: 3.7
dist: xenial
env:
- SPLIT="1/2" TEST_SYMPY="true"
- python: 3.7
dist: xenial
env:
- SPLIT="2/2" TEST_SYMPY="true"
# Tensorflow 1 support
- python: 3.6
env:
- TEST_OPT_DEPENDENCY="tensorflow<2 python=3"
- TEST_TENSORFLOW_1=true
- python: 3.8
dist: xenial
env:
- TEST_SPHINX="true"
- FASTCACHE="false"
addons:
apt:
packages:
- graphviz
- inkscape
- texlive
- texlive-xetex
- texlive-fonts-recommended
- texlive-latex-extra
- latexmk
- lmodern
- librsvg2-bin
- imagemagick
- docbook2x
- python: 3.8
dist: xenial
env:
- TEST_SLOW="true"
- SPLIT="1/2"
- python: 3.8
dist: xenial
env:
- TEST_SLOW="true"
- SPLIT="2/2"
# Code coverage tests
- python: 3.6
dist: xenial
env:
- TEST_SYMPY="true"
- TEST_COVERAGE="true"
- SPLIT="1/4"
- python: 3.6
dist: xenial
env:
- TEST_SYMPY="true"
- TEST_COVERAGE="true"
- SPLIT="2/4"
- python: 3.6
dist: xenial
env:
- TEST_SYMPY="true"
- TEST_COVERAGE="true"
- SPLIT="3/4"
- python: 3.6
dist: xenial
env:
- TEST_SYMPY="true"
- TEST_COVERAGE="true"
- SPLIT="4/4"
# PyPy randomly fails because of some PyPy bugs
# (Fatal RPython error: AssertionError)
- python: "pypy"
env:
- TEST_DOCTESTS="true" TEST_EXAMPLES="true"
- FASTCACHE="false"
addons:
apt:
sources:
- pypy
packages:
- pypy3
- python: "pypy"
env:
- TEST_SYMPY="true"
- SPLIT="1/2"
- FASTCACHE="false"
addons:
apt:
sources:
- pypy
packages:
- pypy3
- python: "pypy"
env:
- TEST_SYMPY="true"
- SPLIT="2/2"
- FASTCACHE="false"
addons:
apt:
sources:
- pypy
packages:
- pypy3
- stage: allowed_failures
python: 3.6
dist: xenial
env:
- BENCHMARK="true"
allow_failures:
- env:
- BENCHMARK="true"
before_install:
- set -e
- python -c "import fcntl; fcntl.fcntl(1, fcntl.F_SETFL, 0)"
- if [[ "${FASTCACHE}" != "false" ]]; then
pip install fastcache;
fi
- if [[ "${TEST_COVERAGE}" == "true" ]]; then
pip install coverage;
coverage debug sys;
fi
- if [[ "${TEST_FLAKE8}" == "true" ]]; then
pip install flake8;
fi
- if [ "$TRAVIS_PYTHON_VERSION" == "3.8" ]; then
pip uninstall -y Cython;
fi
- |
if [[ -n "${TEST_OPT_DEPENDENCY}" ]]; then
# We do this conditionally because it saves us some downloading if the
# version is the same.
deactivate; # Deactivate the Travis virtualenv
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -q -O miniconda.sh;
bash miniconda.sh -b -p $HOME/miniconda;
export PATH="$HOME/miniconda/bin:$PATH";
hash -r;
conda config --set always_yes yes --set changeps1 no;
conda update -q conda;
conda config --prepend channels conda-forge --prepend channels symengine/label/dev;
conda info -a;
conda create -q -n test-environment ${TEST_OPT_DEPENDENCY};
source activate test-environment;
export CPATH=$CONDA_PREFIX/include;
export LIBRARY_PATH=$CONDA_PREFIX/lib;
export LD_LIBRARY_PATH=$CONDA_PREFIX/lib;
conda clean --all;
if [[ "$TEST_SAGE" == "true" ]]; then
# Use a separate environment because sage downgrades matplotlib
conda create -c conda-forge/label/cf201901 -n sage sagelib mpmath "ipython>=5.5.0,<6";
conda clean --all;
fi
elif [ "$TRAVIS_PYTHON_VERSION" != "pypy" ]; then
pip list | grep "numpy" && pip uninstall -y numpy;
fi
- if [[ "${TEST_SPHINX}" == "true" ]]; then
pip install "sphinx" "docutils" doctr matplotlib sphinx-math-dollar;
fi
- if [[ "${BENCHMARK}" == "true" ]]; then
pip install asv;
git submodule add https://github.com/sympy/sympy_benchmarks.git;
fi
install:
# If a command fails, fail the build.
- set -e
- if [ "$TRAVIS_PYTHON_VERSION" = "pypy" ];
then virtualenv -p /usr/bin/pypy3 ~/.venv;
. ~/.venv/bin/activate;
fi
# Once https://github.com/fredrik-johansson/mpmath/pull/403 is in a released
# version of mpmath remove this line.
- pip install mpmath
# -We:invalid makes invalid escape sequences error in Python 3.6. See
# -#12028.
# SyntaxWarning flag for catching errors in Python3.8
# Issue - #16973. -We:invalid can be dropped from 3.8 onwards, but
# it needs to be there for earlier versions.
#
# This would fail due to invalid Python 2.7 syntax so we disable it while
# testing import under Python 2.
- |
if [[ -z "${TEST_PY2_IMPORT}" ]]; then
if [[ "${TEST_SETUP}" == "true" ]]; then
# The install cycle below is to test installation on systems without
# setuptools.
virtualenv ~/.venv-no-setuptools;
~/.venv-no-setuptools/bin/pip install mpmath;
~/.venv-no-setuptools/bin/pip uninstall -y setuptools;
~/.venv-no-setuptools/bin/python -We:invalid setup.py -q install;
fi
python -We:invalid -We::SyntaxWarning -m compileall -f -q sympy/;
python -We:invalid setup.py -q install;
pip list --format=columns;
fi
script:
# Don't run doctr if the build fails
- set -e
- bin/test_travis.sh
- if [[ "${TEST_SPHINX}" == "true" ]]; then
doctr deploy dev --deploy-repo sympy/sympy_doc --command './generate_indexes.py';
fi
- if [[ "${TEST_COVERAGE}" == "true" ]]; then
bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports";
fi
- if [[ "${BENCHMARK}" == "true" ]]; then
asv machine --yes --config asv.conf.travis.json;
asv run --config asv.conf.travis.json;
asv compare master HEAD --config asv.conf.travis.json --factor 1.5;
fi
notifications:
email: false