Permalink
Fetching contributors…
Cannot retrieve contributors at this time
102 lines (99 sloc) 2.98 KB
# 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
addons:
apt:
packages:
- libblas-dev
- liblapack-dev
language: python
cache:
directories:
- $HOME/.cache/pip
env:
global:
- DEPENDS="numpy scipy sympy matplotlib nibabel"
- INSTALL_TYPE="setup"
python:
- 3.4
- 3.5
- 3.6
matrix:
include:
- python: 2.7
env:
- COVERAGE=1
# Absolute minimum dependencies
- python: 2.7
env:
# Definitive source for these in nipy/info.py
- PRE_DEPENDS="numpy==1.6.0"
- DEPENDS="scipy==0.9.0 sympy==0.7.0 nibabel==1.2.0"
# Test compiling against external lapack
- python: 3.4
env:
- NIPY_EXTERNAL_LAPACK=1
- python: 2.7
env:
- INSTALL_TYPE=sdist
- DEPENDS="numpy==1.7.1" # latest travis scipy built with 1.7.1
- python: 2.7
env:
- INSTALL_TYPE=wheel
- DEPENDS="numpy==1.7.1" # latest travis scipy built with 1.7.1
- python: 2.7
env:
- INSTALL_TYPE=requirements
- DEPENDS=
- python: 3.6
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
- pip install nose mock # always
- if [ -n "$PRE_DEPENDS" ]; then
pip install $PRE_DEPENDS;
fi
- pip install $DEPENDS
- if [ "${COVERAGE}" == "1" ]; then
pip install coverage;
pip install coveralls codecov;
fi
# command to install dependencies
# e.g. pip install -r requirements.txt # --use-mirrors
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 dist/*.tar.gz
elif [ "$INSTALL_TYPE" == "wheel" ]; then
pip install wheel
python setup_egg.py bdist_wheel
pip install dist/*.whl
elif [ "$INSTALL_TYPE" == "requirements" ]; then
pip install -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
- if [ "${COVERAGE}" == "1" ]; then
cp ../.coveragerc .;
COVER_ARGS="--with-coverage --cover-package nipy";
fi
- $PYTHON ../tools/nipnost --verbosity=3 $COVER_ARGS nipy
after_success:
- if [ "${COVERAGE}" == "1" ]; then coveralls; codecov; fi