-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
142 lines (137 loc) · 4.42 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
# 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
addons:
apt:
packages:
- libhdf5-serial-dev
env:
global:
- DEPENDS="cython numpy scipy matplotlib h5py nibabel cvxpy"
- VENV_ARGS="--python=python"
- INSTALL_TYPE="setup"
- EXTRA_WHEELS="https://5cf40426d9f06eb7461d-6fe47d9331aba7cd62fc36c7196769e4.ssl.cf2.rackcdn.com"
- PRE_WHEELS="https://7933911d6844c6c53a7d-47bd50c35cd79bd838daf386af554a83.ssl.cf2.rackcdn.com"
- EXTRA_PIP_FLAGS="--timeout=60 --find-links=$EXTRA_WHEELS"
python:
- 3.4
- 3.5
- 3.6
# - "3.7" # TODO: Re-enable after https://github.com/travis-ci/travis-ci/issues/9815 is fixed
matrix:
include:
# TODO: Disable the local workaround
- python: 3.7
dist: xenial
sudo: true
- python: 2.7
# To test minimum dependencies
- python: 2.7
env:
# Check these values against requirements.txt and dipy/info.py
- DEPENDS="cython==0.25.1 numpy==1.7.1 scipy==0.9.0 nibabel==2.3.0 h5py==2.4.0"
- python: 2.7
env:
- DEPENDS="$DEPENDS scikit_learn"
- python: 3.5
env:
- COVERAGE=1
- DEPENDS="$DEPENDS scikit_learn"
# To test vtk functionality
- python: 2.7
sudo: true # This is set to true for apt-get
env:
- COVERAGE=1
- VTK=1
- VTK_VER="python-vtk"
- LIBGL_ALWAYS_INDIRECT=y
- VENV_ARGS="--system-site-packages --python=/usr/bin/python2.7"
- TEST_WITH_XVFB=true
- DEPENDS="$DEPENDS scikit_learn"
- python: 2.7
env:
- INSTALL_TYPE=sdist
- python: 2.7
env:
- INSTALL_TYPE=pip
# Dependency checking should get all needed dependencies
- DEPENDS=""
- python: 2.7
env:
- INSTALL_TYPE=wheel
- python: 2.7
env:
- INSTALL_TYPE=requirements
- DEPENDS=""
- python: 3.5
# Check against latest available pre-release version of all packages
env:
- USE_PRE=1
allow_failures:
- python: 3.5
env:
- USE_PRE=1
before_install:
- PIPI="pip install $EXTRA_PIP_FLAGS"
- if [ -n "$USE_PRE" ]; then
PIPI="$PIPI --find-links=$PRE_WHEELS --pre";
fi
- pip install --upgrade virtualenv
- virtualenv $VENV_ARGS venv
- source venv/bin/activate
- python --version # just to check
# Needed for Python 3.5 wheel fetching
- $PIPI --upgrade pip setuptools
- $PIPI nose;
- $PIPI numpy;
- if [ -n "$DEPENDS" ]; then $PIPI $DEPENDS; fi
- if [ "${COVERAGE}" == "1" ]; then pip install coverage coveralls codecov; 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;
$PIPI xvfbwrapper;
fi
install:
- |
if [ "$INSTALL_TYPE" == "setup" ]; then
python setup.py install
elif [ "$INSTALL_TYPE" == "pip" ]; then
$PIPI .
elif [ "$INSTALL_TYPE" == "sdist" ]; then
python setup_egg.py egg_info # check egg_info while we're here
python setup_egg.py sdist
$PIPI dist/*.tar.gz
elif [ "$INSTALL_TYPE" == "wheel" ]; then
pip install wheel
python setup_egg.py bdist_wheel
$PIPI dist/*.whl
elif [ "$INSTALL_TYPE" == "requirements" ]; then
$PIPI -r requirements.txt
python setup.py install
fi
# 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 .;
cp ../.codecov.yml .;
COVER_ARGS="--with-coverage --cover-package dipy";
fi
- nosetests --with-doctest --verbose $COVER_ARGS dipy
after_success:
- if [ "${COVERAGE}" == "1" ]; then coveralls; codecov; fi