From b68990bf32fac3a0ad9806a38a8b3775ce4b72f7 Mon Sep 17 00:00:00 2001 From: Chioke Harris Date: Mon, 30 Nov 2015 16:12:00 -0500 Subject: [PATCH] Revise Travis-CI configuration to enable scipy The default Travis-CI system image does not include scipy, so including it in requirements.txt will yield a build error. The current workaround employs miniconda to install both numpy and scipy, as referenced in travis-ci/travis-ci#2650. An alternate approach is proposed in travis-ci/travis-ci#2638. --- .travis.yml | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9a329763..85a35330 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,29 @@ +# Based on https://gist.github.com/dan-blanchard/7045057 and modifications in +# https://github.com/Jorge-C/ordination/blob/master/.travis.yml +# See also: https://github.com/travis-ci/travis-ci/issues/2650 + language: python python: - - "3.2" - - "3.3" - "3.4" - "3.5" -# command to install dependencies -install: "pip3 install -r requirements.txt" -# command to run tests + +# Download and set up anaconda +before_install: + - wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh + - chmod +x miniconda.sh + - ./miniconda.sh -b + - export PATH=/home/travis/anaconda/bin:$PATH + # Update conda itself + - conda update --yes conda + # The next couple lines fix a crash with multiprocessing on Travis and are not specific to using Miniconda + - sudo rm -rf /dev/shm + - sudo ln -s /run/shm /dev/shm + +# Install packages +install: + - conda install --yes python=$TRAVIS_PYTHON_VERSION numpy scipy + - python setup.py install + +# Run test(s) script: - python3 -m unittest discover -p '*_test.py'