forked from brian-team/brian2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
30 lines (30 loc) · 1.65 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
language: python
python:
- "2.6"
- "2.7"
- "3.3"
# Use miniconda to install binary versions of numpy etc. from continuum
# analytic's repository. Follows an approach described by Dan Blanchard:
# https://gist.github.com/dan-blanchard/7045057
before_install:
- if [ ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]; then wget http://repo.continuum.io/miniconda/Miniconda-2.2.2-Linux-x86_64.sh -O miniconda.sh; else wget http://repo.continuum.io/miniconda/Miniconda3-2.2.2-Linux-x86_64.sh -O miniconda.sh; fi
- chmod +x miniconda.sh
- ./miniconda.sh -b
- export PATH=/home/travis/anaconda/bin:$PATH
# 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
# command to install dependencies
install:
- conda create -n travis_conda --yes pip python=$TRAVIS_PYTHON_VERSION numpy scipy nose sphinx ipython sympy pyparsing cython
- source activate travis_conda
- pip install -q coveralls --use-mirrors
- python setup.py install --with-cython --fail-on-error
# Make sure that weave uses Anaconda's header files
- mkdir ~/.brian;echo -e "[codegen.runtime.weave]\ninclude_dirs = ['/home/travis/anaconda/envs/travis_conda/include']\n" > ~/.brian/user_preferences
# command to run tests (make sure to not run it from the source directory)
script: export SRCDIR=$(pwd); cd ~;coverage run --rcfile=$SRCDIR/.coveragerc $(which nosetests) --logging-clear-handlers --verbose --with-doctest --exe brian2
# We only report coverage for one Python version
after_success: if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then cp .coverage $SRCDIR; cd $SRCDIR; coveralls; fi
notifications:
email: false