Files
scikit-image/.travis.yml
T
2014-08-04 07:32:11 -05:00

111 lines
3.9 KiB
YAML

# vim ft=yaml
# After changing this file, check it on:
# http://lint.travis-ci.org/
language: python
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;
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;
conda create -n test $ENV six scipy pip flake8 nose;
source activate test;
fi
- 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;
pip install --use-mirrors -q matplotlib;
pip install -q networkx;
else
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;
pip install -q imread;
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