-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
55 lines (55 loc) · 2.2 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
language: python
python:
- 2.7
- 3.5
- 3.6
env:
matrix:
- DEP_VERSIONS="oldest" # Approximately the versions available in the last LTS release of Ubuntu.
- DEP_VERSIONS="latest"
- DEP_VERSIONS="master" # Run against SymPy master.
before_install:
- sudo apt-get update
- wget https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh
- chmod +x miniconda.sh
- ./miniconda.sh -b -p $HOME/miniconda
- export PATH=/home/travis/miniconda/bin:$PATH
- conda config --set always_yes yes --set changeps1 no
- conda config --add channels pydy
- conda config --add channels conda-forge # conda-forge has top precedent
- conda update -q conda
install:
- sudo apt-get install phantomjs
- conda create -q -n test-env python=$TRAVIS_PYTHON_VERSION pip coverage nose sphinx numpydoc flake8
- source activate test-env
- if [[ $DEP_VERSIONS == "oldest" ]]; then
conda install numpy=1.11 scipy=0.17 sympy=0.7.6 cython=0.23 theano=0.8;
elif [[ $DEP_VERSIONS == "latest" ]]; then
conda install numpy scipy sympy cython theano;
elif [[ $DEP_VERSIONS == "master" ]]; then
conda install numpy scipy cython theano;
pip install https://github.com/sympy/sympy/archive/master.zip;
fi
- conda install matplotlib
before_script:
- conda info
- conda list
- pip --version
- pip freeze
script:
# The THEANO_FLAGS are necessary for compilation on Travis CI.
- THEANO_FLAGS='gcc.cxxflags="-march=core2"' nosetests -v --with-coverage --cover-package=pydy
# JS tests
- cd pydy/viz/static/js/tests && phantomjs run-jasmine.js SpecRunner.html
- cd - # It should not be combined with above command
# Check Python and Javascript syntax (trailing whitespaces/newlines, unused imports).
- (flake8 --select W1,W2,W3 --exclude booger . &&
flake8 --select F401 --exclude booger,__init__.py,conf.py . &&
flake8 --select W2,W3 --filename='*.js' examples/ pydy/viz/static/js/dyviz/) ||
(echo "Please run a linter and fix errors, e.g. pylint, flake8, pep8, etc."; false)
# Make sure the docs build.
- cd docs && make html && cd ..
# Make sure the library installs.
- python setup.py install
# Run benchmark
- python bin/benchmark_pydy_code_gen.py 1 10