forked from qutip/qutip
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
84 lines (77 loc) · 2.58 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
sudo: required
dist: trusty
language: python
matrix:
include:
- python: 2.7
env: MKL=1 OPENMP=0
- python: 2.7
env: MKL=1 OPENMP=1
- python: 3.6
env: MKL=1 OPENMP=0
- python: 3.6
env: CC=clang CXX=clang++ MKL=1 OPENMP=0
- python: 3.6
env: MKL=0 OPENMP=0
- python: 3.6
env: MKL=1 OPENMP=1
- python: 3.6
env: MKL=0 OPENMP=1
addons:
apt:
packages:
- libatlas-dev
- libatlas-base-dev
- liblapack-dev
# command to install dependencies
install:
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
fi
- 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 info -a
- conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION
- source activate test-environment
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]] && [[ "${MKL}" == "0" ]]; then
conda install nomkl numpy scipy nose cython;
fi
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]] && [[ "${MKL}" == "1" ]]; then
conda install mkl numpy scipy nose cython;
fi
- if [[ "$TRAVIS_PYTHON_VERSION" == "3.6" ]] && [[ "${MKL}" == "0" ]]; then
conda install nomkl blas=*=openblas numpy scipy nose cython;
fi
- if [[ "$TRAVIS_PYTHON_VERSION" == "3.6" ]] && [[ "${MKL}" == "1" ]]; then
conda install mkl blas=*=mkl numpy scipy nose cython;
fi
# dnorm tests are currently unreliable. They won't be run without cvxpy
# see issue #880
# yml does not work well with multiple ifs
#- if [[ "${MKL}" == "0" ]]; then
# pip install cvxopt scs cvxpy;
# fi
- pip install coverage coveralls
# Finally, install ourselves.
- if [[ "${OPENMP}" == "1" ]]; then
python setup.py install --with-openmp;
else
python setup.py install;
fi
# change dir
before_script:
- mkdir qutip_testing
- cd qutip_testing
# command to run tests
script:
- python -m qutip.about
- nosetests --verbosity=2 --with-coverage --cover-package=qutip qutip
after_success:
- if [[ $TRAVIS_PYTHON_VERSION == '3.6' ]] && [[ $CC == 'gcc' ]] && [[ "${OPENMP}" == "1" ]]; then
coveralls;
fi