forked from PyMVPA/PyMVPA
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
75 lines (75 loc) · 3.79 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# vim ft=yaml
# travis-ci.org definition for PyMVPA build (based on nipype configuration
# which in turn was based on nipy)
#
# We pretend to be java because we need can't use the python support in
# travis-ci; it uses virtualenvs, they do not have numpy, scipy, matplotlib,
# and it is impractical to build them
language: java
dist: trusty
cache:
- apt
env:
global:
- PY=python PYSUF='' PYPI=0 COVERAGE="coverage run --rcfile=.travis_coveragerc"
# - PYTHON=python3 PYSUF=3 : python3-numpy not currently available
matrix:
- PYTHON=$PY DOCTESTS=--with-doctest PYPI=1
- PYTHON="$PY -O" DOCTESTS=--with-doctest
# Doctests are unguarded against absent externals, so no --with-doctest for them
- PYTHONPATH=mvpa2/tests/badexternals
# Some DEBUG targets are excluded since either their output could
# not be redirected or they augment output in the doctests
- MVPA_DEBUG=ENFORCE_CA_ENABLED DOCTESTS=--with-doctest
# So we get duecredit report printed out, and identical to original run so we could compare
# time impact
- PYTHON=$PY DOCTESTS=--with-doctest DUECREDIT_ENABLE=yes
before_install:
# to prevent IPv6 being used for APT
- sudo bash -c "echo 'Acquire::ForceIPv4 \"true\";' > /etc/apt/apt.conf.d/99force-ipv4"
# The ultimate one-liner setup for NeuroDebian repository
- bash <(wget -q -O- http://neuro.debian.net/_files/neurodebian-travis.sh)
# - sudo apt-get install $PYTHON-dev
- travis_retry sudo apt-get install swig $PY-numpy $PY-scipy $PY-matplotlib $PY-h5py $PY-nose $PY-nibabel $PY-mock
# Optional Python modules
# Note: it looks like the line could be truncated, thus spreading them through multiple lines
- travis_retry sudo apt-get install $PY-psutil $PY-sklearn
- travis_retry sudo pip install -e git://github.com/mdp-toolkit/mdp-toolkit#egg=MDP
- travis_retry sudo apt-get install liblapack-dev $PY-statsmodels $PY-reportlab ipython
- travis_retry sudo apt-get install $PY-pywt $PY-lxml $PY-pprocess $PY-nipy $PY-joblib
- travis_retry sudo apt-get install python3-dev # for rudimentary testing of conversion
# Very optional R interfaces via rpy2
- travis_retry sudo apt-get install $PY-rpy2
- mkdir -p $PWD/R-libs
- echo "install.packages(c('energy', 'elasticnet'), '$PWD/R-libs', repos='http://cran.r-project.org')" | R --no-save
install:
- make
- if [ ! -z "$COVERAGE" ]; then pip install --user -v coveralls codecov; fi
- if [ ! -z "$DUECREDIT_ENABLE"]; then pip install --user -v duecredit; fi
script:
# Run only nonlabile tests
- export MVPA_EXTERNALS_RAISE_EXCEPTION=off MVPA_MATPLOTLIB_BACKEND=agg
- export MVPA_DEBUG_METRICS=all MVPA_DEBUG_OUTPUT=/dev/null
- export MVPA_TESTS_LABILE=no MVPA_TESTS_VERBOSITY=2 MVPA_TESTS_WTF=1
- export PATH=$HOME/.local/bin:$PATH PYTHONPATH=.:$PYTHONPATH R_LIBS=$PWD/R-libs
# Temp disable lars tests -- fails across the board but does not replicate locally
- export MVPA_EXTERNALS_HAVE_LARS=no
- export NOSETESTS=$(which nosetests)
- eval $COVERAGE $NOSETESTS -v mvpa2 $DOCTESTS -s
- make testsuite # test that all imports are available within the suite. adjust Makefile or suite.py to fix if fails
# we cannot run those in badexternals "mode"
- if [ ! -z "$COVERAGE" ] && [ "$DOCTESTS" = "--with-doctest" ]; then make coveragecmdline; fi
- make build PYTHON=python3
after_success:
- if [ ! -z "$COVERAGE" ]; then coveralls; codecov; fi
deploy:
provider: pypi
distributions: sdist
user: yarikoptic
password:
secure: mTxbioGS+sdfxnJRbAGZCxjWlaGJx+KqXPfYGESKcg6IVaSUM9D4CUhxgHHW88FYSnkmCvwuu57w7AAot9FyG6Q/1q656gluCbEJzfDJerSH1S06HqAEmjSPJvIEG/zwvPIUm3RPc+8j9XtedztM3aVWkqBHAzvUzEnsX1jJpic=
on:
tags: true
branch: master
repo: PyMVPA/PyMVPA
condition: "$PYPI == 1 && $TRAVIS_TAG =~ ^upstream/.*"