/
.travis.yml
85 lines (85 loc) · 2.68 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
# vim ft=yaml
# Multiple lines can be made a single "virtual line" because of the way that
# Travis munges each line before executing it to print out the exit status.
# It's okay for it to be on multiple physical lines, so long as you remember:
# - There can't be any leading "-"s - All newlines will be removed, so use
# ";"s
sudo: false # To use travis container infrastructure
language: python
cache:
directories:
- $HOME/.cache/pip
env:
global:
- DEPENDS="cython numpy scipy matplotlib h5py nibabel cvxopt"
- VENV_ARGS="--python=python"
python:
- 2.6
- 3.2
- 3.3
- 3.4
matrix:
include:
- python: 2.7
env:
- COVERAGE=1
# To test minimum dependencies
- python: 2.7
env:
- COVERAGE=1
- DEPENDS="cython==0.18 numpy==1.7.1 scipy==0.9.0 nibabel==1.2.0"
- python: 2.7
env:
- DEPENDS="cython numpy scipy matplotlib h5py nibabel cvxopt scikit_learn"
# To test vtk functionality
- python: 2.7
sudo: true # This is set to true for apt-get
env:
- VTK=1
- VTK_VER="python-vtk"
- LIBGL_ALWAYS_INDIRECT=y
- VENV_ARGS="--system-site-packages --python=/usr/bin/python2.7"
- TEST_WITH_XVFB=true
- python: 2.7
sudo: true # This is set to true for apt-get
env:
- VTK=1
- VTK_VER="python-vtk6"
- LIBGL_ALWAYS_INDIRECT=y
- VENV_ARGS="--system-site-packages --python=/usr/bin/python2.7"
- TEST_WITH_XVFB=true
before_install:
- source tools/travis_tools.sh
- virtualenv $VENV_ARGS venv
- source venv/bin/activate
- python --version # just to check
- retry pip install nose;
- wheelhouse_pip_install $DEPENDS;
- if [ "${COVERAGE}" == "1" ]; then
pip install coverage;
pip install coveralls;
fi
- if [ "${VTK}" == "1" ]; then
sudo apt-get update;
sudo apt-get install -y $VTK_VER;
sudo apt-get install -y xvfb;
sudo apt-get install -y python-tk;
sudo apt-get install -y python-imaging;
retry pip install xvfbwrapper;
fi
install:
- python setup.py install
# command to run tests, e.g. python setup.py test
script:
# Change into an innocuous directory and find tests from installation
- mkdir for_testing
- cd for_testing
# No figure windows for mpl; quote to hide : from travis-ci yaml parsing
- 'echo "backend : agg" > matplotlibrc'
- if [ "${COVERAGE}" == "1" ]; then
cp ../.coveragerc .;
COVER_ARGS="--with-coverage --cover-package dipy";
fi
- nosetests --with-doctest --verbose $COVER_ARGS dipy
after_success:
- if [ "${COVERAGE}" == "1" ]; then coveralls; fi