forked from qutip/qutip
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
71 lines (66 loc) · 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
sudo: required
dist: trusty
language: python
matrix:
include:
- python: 2.7
env: OPENMP=0
- python: 2.7
env: OPENMP=1
- python: 3.6
env: OPENMP=0
- python: 3.6
env: CC=clang CXX=clang++ OPENMP=0
- python: 3.6
env: NOMKL=1 OPENMP=0
- python: 3.6
env: 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 [[ "${NOMKL}" == "1" ]]; then
conda install nomkl numpy scipy nose cython;
else
conda install mkl numpy scipy nose cython;
fi
- pip install coverage coveralls
# Also get optional dependencies (CVXPY, which depends on CVXOPT and SCS).
- pip install cvxopt==1.1.8
- pip install scs
- pip install cvxpy
# 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