Permalink
Switch branches/tags
Find file
Fetching contributors…
Cannot retrieve contributors at this time
157 lines (152 sloc) 4.8 KB
# vim ft=yaml
# Multiple lines can be made a single "virtual line" because of how 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
language: python
# Run jobs on container-based infrastructure, can be overridden per job
sudo: false
cache:
directories:
- $HOME/.cache/pip
env:
global:
- DEPENDS="six numpy scipy matplotlib h5py pillow"
- PYDICOM=1
- INSTALL_TYPE="setup"
- EXTRA_WHEELS="https://5cf40426d9f06eb7461d-6fe47d9331aba7cd62fc36c7196769e4.ssl.cf2.rackcdn.com"
- PRE_WHEELS="https://7933911d6844c6c53a7d-47bd50c35cd79bd838daf386af554a83.ssl.cf2.rackcdn.com"
- EXTRA_PIP_FLAGS="--find-links=$EXTRA_WHEELS"
- PRE_PIP_FLAGS="--pre $EXTRA_PIP_FLAGS --find-links $PRE_WHEELS"
python:
- 3.4
- 3.5
- 3.6
matrix:
include:
- python: 2.7
env:
- COVERAGE=1
# Absolute minimum dependencies
- python: 2.7
env:
- DEPENDS="numpy==1.7.1" PYDICOM=0
# Absolute minimum dependencies plus oldest MPL
# Check these against:
# nibabel/info.py
# doc/source/installation.rst
# requirements.txt
- python: 2.7
env:
- DEPENDS="numpy==1.7.1 matplotlib==1.3.1" PYDICOM=0
# Minimum pydicom dependency
- python: 2.7
env:
- DEPENDS="numpy==1.7.1 pydicom==0.9.7 pillow==2.6"
# test against numpy 1.7
- python: 2.7
env:
- DEPENDS="numpy==1.7.1"
# pydicom 1.0 (currently unreleased)
- python: 2.7
env:
- PYDICOM="v1.0"
# test 2.7 against pre-release builds of everything
- python: 2.7
env:
- EXTRA_PIP_FLAGS="$PRE_PIP_FLAGS"
# test 3.5 against pre-release builds of everything
- python: 3.5
env:
- EXTRA_PIP_FLAGS="$PRE_PIP_FLAGS"
# Documentation doctests
- python: 2.7
env:
- DOC_DOC_TEST=1
- python: 2.7
env:
- INSTALL_TYPE=sdist
- python: 2.7
env:
- INSTALL_TYPE=wheel
- python: 2.7
env:
- INSTALL_TYPE=requirements
- python: 2.7
env:
- STYLE=1
- python: 3.5
env:
- STYLE=1
- python: 3.5
env:
- DOC_DOC_TEST=1
before_install:
- source tools/travis_tools.sh
- python -m pip install --upgrade pip
- pip install --upgrade virtualenv
- virtualenv --python=python venv
- source venv/bin/activate
- python --version # just to check
- pip install -U pip wheel # needed at one point
- retry pip install nose flake8 mock # always
- pip install $EXTRA_PIP_FLAGS $DEPENDS
# pydicom <= 0.9.8 doesn't install on python 3
- if [ "${TRAVIS_PYTHON_VERSION:0:1}" == "2" ]; then
if [ "$PYDICOM" == "1" ]; then
pip install pydicom;
elif [ "$PYDICOM" == "v1.0" ]; then
pip install git+https://github.com/darcymason/pydicom.git@43f278444d5cb2e4648135d3edcd430c363c6975;
fi
fi
- if [ "${COVERAGE}" == "1" ]; then
pip install coverage;
pip install coveralls;
pip install codecov;
fi
# command to install dependencies
install:
- |
if [ "$INSTALL_TYPE" == "setup" ]; then
python setup.py install
elif [ "$INSTALL_TYPE" == "sdist" ]; then
python setup_egg.py egg_info # check egg_info while we're here
python setup_egg.py sdist
pip install $EXTRA_PIP_FLAGS dist/*.tar.gz
elif [ "$INSTALL_TYPE" == "wheel" ]; then
pip install wheel
python setup_egg.py bdist_wheel
pip install $EXTRA_PIP_FLAGS dist/*.whl
elif [ "$INSTALL_TYPE" == "requirements" ]; then
pip install $EXTRA_PIP_FLAGS -r requirements.txt
python setup.py install
fi
# Point to nibabel data directory
- export NIBABEL_DATA_DIR="$PWD/nibabel-data"
# command to run tests, e.g. python setup.py test
script:
- |
if [ "${STYLE}" == "1" ]; then
# Run styles only on core nibabel code.
flake8 nibabel
else
# Change into an innocuous directory and find tests from installation
mkdir for_testing
cd for_testing
if [ "${COVERAGE}" == "1" ]; then
cp ../.coveragerc .;
COVER_ARGS="--with-coverage --cover-package nibabel";
fi
if [ "$DOC_DOC_TEST" == "1" ]; then
cd ../doc;
pip install -r ../doc-requirements.txt
make html;
make doctest;
else
nosetests --with-doctest $COVER_ARGS nibabel;
fi
fi
after_success:
- if [ "${COVERAGE}" == "1" ]; then coveralls; codecov; fi
notifications:
webhooks: http://nipy.bic.berkeley.edu:54856/travis