forked from vighneshbirodkar/scikit-image
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
112 lines (96 loc) · 4.07 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
# vim ft=yaml
# After changing this file, check it on:
# http://lint.travis-ci.org/
language: python
# Tthe Travis python is set to 3.2 for all builds, since we use the default python for the 3.2 build and the anaconda python otherwise
python:
- 3.2
env:
- ENV="python=2.6 numpy=1.6 cython=0.19.2"
- ENV="python=2.7 numpy cython"
- ENV="python=3.2"
- ENV="python=3.3 numpy cython"
- ENV="python=3.4 numpy cython"
virtualenv:
system_site_packages: true
before_install:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- sudo apt-get update
# Python 3.2 is not supported by Miniconda, so we use the package manager for that run.
# NumPy has a bug in python 3 that is only fixed in the latest version,
# hence the below wget of numpy/_import_tools.py from github.
- if [[ $ENV == python=3.2 ]]; then
sudo apt-get install python3-numpy;
wget https://raw.githubusercontent.com/numpy/numpy/master/numpy/_import_tools.py -O /home/travis/virtualenv/python3.2_with_system_site_packages/lib/python3.2/site-packages/numpy/_import_tools.py;
sudo apt-get install python3-scipy;
travis_retry pip install cython flake8 six;
else
wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh;
bash miniconda.sh -b -p $HOME/miniconda;
export PATH="$HOME/miniconda/bin:$PATH";
hash -r;
conda config --set always_yes yes;
conda update conda;
conda info -a;
travis_retry conda create -n test $ENV six scipy pip flake8 nose;
source activate test;
fi
- travis_retry pip install coveralls pillow
- python check_bento_build.py
install:
- tools/header.py "Dependency versions"
- tools/build_versions.py
- export PYTHONWARNINGS=all
- python setup.py build_ext --inplace
script:
# Run all tests with minimum dependencies
- nosetests --exe -v skimage
# Run pep8 and flake tests
- flake8 --exit-zero --exclude=test_*,six.py skimage doc/examples viewer_examples
# Install optional dependencies to get full test coverage
# Notes:
# - pyfits and imread do NOT support py3.2
# - Use the png headers included in anaconda (from matplotlib install)
# TODO: Remove the libm removal when anaconda fixes their libraries
# The solution was suggested here
# https://groups.google.com/a/continuum.io/forum/#!topic/anaconda/-DLG2ZdTkw0
- if [[ $ENV == python=3.2 ]]; then
sudo apt-get install -qq python3-pyqt4;
travis_retry pip install -q matplotlib;
travis_retry pip install -q networkx;
else
travis_retry conda install -q matplotlib pyqt networkx;
sudo cp ~/miniconda/envs/test/include/png* /usr/include;
rm ~/miniconda/envs/test/lib/libm-2.5.so;
rm ~/miniconda/envs/test/lib/libm.*;
sudo apt-get install -qq libtiff4-dev libwebp-dev xcftools;
travis_retry pip install -q imread;
travis_retry pip install -q pyfits;
fi
- sudo apt-get install -qq libfreeimage3
# TODO: update when SimpleITK become available on py34 or hopefully pip
- if [[ $ENV != python=3.4* ]]; then
travis_retry easy_install -q SimpleITK;
fi
# Matplotlib settings
- export MPL_DIR=$HOME/.config/matplotlib
- mkdir -p $MPL_DIR
- touch $MPL_DIR/matplotlibrc
- "echo 'backend : Agg' > $MPL_DIR/matplotlibrc"
- "echo 'backend.qt4 : PyQt4' >> $MPL_DIR/matplotlibrc"
# Run all doc examples
- export PYTHONPATH=$(pwd):$PYTHONPATH
- for f in doc/examples/*.py; do python "$f"; if [ $? -ne 0 ]; then exit 1; fi done
- for f in doc/examples/applications/*.py; do python "$f"; if [ $? -ne 0 ]; then exit 1; fi done
# run tests again with optional dependencies to get more coverage
# measure coverage on py3.3
- if [[ $ENV == python=3.3* ]]; then
nosetests --exe -v --with-doctest --with-cov --cover-package skimage;
else
nosetests --exe -v --with-doctest skimage;
fi
after_success:
- if [[ $ENV == python=3.3* ]]; then
coveralls;
fi