Skip to content

Commit

Permalink
Revise Travis-CI configuration to enable scipy
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
trynthink committed Nov 30, 2015
1 parent 8fc1329 commit b68990b
Showing 1 changed file with 23 additions and 5 deletions.
28 changes: 23 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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'

0 comments on commit b68990b

Please sign in to comment.