-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy path.travis.yml
90 lines (84 loc) · 3.4 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
language: python
sudo: false
env:
# - PYTHON=2.7 TEST_LOCATION=src
- PYTHON=3.5 TEST_LOCATION=src
before_install:
- openssl aes-256-cbc -K $encrypted_73bd2a498087_key -iv $encrypted_73bd2a498087_iv
-in .s3cfg.enc -out $HOME/.s3cfg -d
- python -c "import os.path as op; assert op.exists(op.join(op.expanduser('~'), '.s3cfg'))"
- wget -q http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh
- chmod +x miniconda.sh
- "./miniconda.sh -b -p /home/travis/miniconda"
- export PATH=/home/travis/miniconda/bin:$PATH
- conda update --yes --quiet conda
- export DISPLAY=:99.0
- "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile
--background --exec /usr/bin/Xvfb -- :99 -screen 0 1400x900x24 -ac +extension GLX
+render -noreset"
- conda create -n get-hcp-env --yes pip python=2.7
- source activate get-hcp-env
- conda install scipy --yes --quiet
- pip install -q s3cmd mne
- python setup.py develop
- export MNE_HCP_N_RUNS=3
- mkdir $HOME/mne-hcp-data
- s3cmd get s3://mne-hcp-testing-data/mne-hcp-testing.tar.gz $HOME/mne-hcp-data/
- (cd $HOME/mne-hcp-data/ && tar -xvzf mne-hcp-testing.tar.gz)
- find $HOME/mne-hcp-data/mne-hcp-testing/105923 -name "*" > output.txt
- cat output.txt | wc -l
- head output.txt
# get fsaverage
- pushd ~
- wget --quiet http://faculty.washington.edu/larsoner/fsaverage_min.zip
- mkdir subjects
- cd subjects
- unzip ../fsaverage_min.zip
- cd ..
- export SUBJECTS_DIR="${PWD}/subjects"
- popd
install:
- conda create -n testenv --yes pip python=$PYTHON
- source activate testenv
- ENSURE_PACKAGES="numpy$NUMPY scipy$SCIPY matplotlib$MPL libpng$LIBPNG scikit-learn$SKLEARN"
- conda install --yes --quiet $ENSURE_PACKAGES nose coverage
- if [ "${PYTHON}" == "3.5" ]; then
conda install --yes --quiet $ENSURE_PACKAGES ipython;
else
conda install --yes --quiet $ENSURE_PACKAGES ipython==1.1.0;
pip install nitime faulthandler;
if [ "${NUMPY}" != "=1.8" ]; then
conda install --yes --quiet $ENSURE_PACKAGES mayavi$MAYAVI;
pip install pysurfer;
fi;
fi;
- pip install -q codecov nose-timer mne nibabel
- NP_VERSION=`python -c 'import numpy; print(numpy.__version__)'`
- if [ -n "$NUMPY" ] && [ "${NUMPY:(-3)}" != "${NP_VERSION::3}" ]; then echo "Incorrect
numpy version $NP_VERSION"; exit 1; fi;
- SP_VERSION=`python -c 'import scipy; print(scipy.__version__)'`
- if [ -n "$SCIPY" ] && [ "${SCIPY:(-4)}" != "${SP_VERSION::4}" ]; then echo "Incorrect
scipy version $SP_VERSION"; exit 1; fi;
- MPL_VERSION=`python -c 'import matplotlib; print(matplotlib.__version__)'`
- if [ -n "$MPL" ] && [ "${MPL:(-3)}" != "${MPL_VERSION::3}" ]; then echo "Incorrect
matplotlib version $MPL_VERSION"; exit 1; fi;
- export MNE_LOGGING_LEVEL=warning
- python setup.py build
- python setup.py install
- SRC_DIR=$(pwd)
- cd ~
- HCP_DIR=$(python -c 'import hcp;print(hcp.__path__[0])')
- if [ "${TEST_LOCATION}" == "install" ]; then
ln -s ${SRC_DIR}/setup.cfg ${HCP_DIR}/../setup.cfg;
ln -s ${SRC_DIR}/.coveragerc ${HCP_DIR}/../.coveragerc; cd ${MNE_DIR}/../;
COVERAGE=;
else cd ${SRC_DIR};
COVERAGE=--with-coverage; fi;
- export MNE_HCP_N_RUNS=1
script:
- nosetests --with-timer --timer-top-n 30 --verbosity=2 $COVERAGE
- if [ "${DEPS}" == "nodata" ]; then make flake; fi;
- if [ "${DEPS}" == "nodata" ]; then make codespell-error; fi;
after_success:
- if [ "${TEST_LOCATION}" == "src" ]; then echo "Running codecov"; cd ${SRC_DIR};
codecov; fi;