Skip to content

Commit b91560c

Browse files
committed
enh: improve travis build reliability
1 parent 50d1bfd commit b91560c

File tree

1 file changed

+42
-33
lines changed

1 file changed

+42
-33
lines changed

.travis.yml

Lines changed: 42 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,64 @@
1-
cache:
2-
apt: true
1+
dist: trusty
2+
sudo: required
33

44
language: python
5+
# our build matrix
56
python:
67
- 2.7
78
- 3.4
89
- 3.5
910
- 3.6
11+
1012
env:
1113
- INSTALL_DEB_DEPENDECIES=true NIPYPE_EXTRAS="doc,tests,fmri,profiler" CI_SKIP_TEST=1
1214
- INSTALL_DEB_DEPENDECIES=false NIPYPE_EXTRAS="doc,tests,fmri,profiler" CI_SKIP_TEST=1
1315
- INSTALL_DEB_DEPENDECIES=true NIPYPE_EXTRAS="doc,tests,fmri,profiler,duecredit" CI_SKIP_TEST=1
1416
- INSTALL_DEB_DEPENDECIES=true NIPYPE_EXTRAS="doc,tests,fmri,profiler" PIP_FLAGS="--pre" CI_SKIP_TEST=1
17+
18+
addons:
19+
apt:
20+
packages:
21+
- xvfb
22+
- fusefat
23+
- graphviz
24+
25+
cache:
26+
directories:
27+
- ${HOME}/.cache
28+
1529
before_install:
16-
- function apt_inst {
17-
if $INSTALL_DEB_DEPENDECIES; then sudo rm -rf /dev/shm; fi &&
18-
if $INSTALL_DEB_DEPENDECIES; then sudo ln -s /run/shm /dev/shm; fi &&
19-
bash <(wget -q -O- http://neuro.debian.net/_files/neurodebian-travis.sh) &&
20-
sudo apt-get -y update &&
21-
sudo apt-get -y install xvfb fusefat graphviz &&
22-
if $INSTALL_DEB_DEPENDECIES; then travis_retry sudo apt-get install -y -qq
23-
fsl afni elastix fsl-atlases; fi &&
24-
if $INSTALL_DEB_DEPENDECIES; then
30+
- if $INSTALL_DEB_DEPENDECIES; then sudo rm -rf /dev/shm; sudo ln -s /run/shm /dev/shm; fi
31+
- travis_retry bash <(wget -q -O- http://neuro.debian.net/_files/neurodebian-travis.sh);
32+
- if $INSTALL_DEB_DEPENDECIES; then
33+
travis_retry sudo apt-get -y update &&
34+
travis_retry sudo apt-get install -y -qq fsl afni elastix fsl-atlases;
35+
fi;
36+
- if $INSTALL_DEB_DEPENDECIES; then
2537
source /etc/fsl/fsl.sh;
2638
source /etc/afni/afni.sh;
27-
export FSLOUTPUTTYPE=NIFTI_GZ; fi }
28-
- function conda_inst {
29-
export CONDA_HOME=$HOME/conda &&
30-
wget https://repo.continuum.io/miniconda/Miniconda${TRAVIS_PYTHON_VERSION:0:1}-latest-Linux-x86_64.sh
31-
-O /home/travis/.cache/conda.sh &&
32-
bash /home/travis/.cache/conda.sh -b -p ${CONDA_HOME} &&
33-
export PATH=${CONDA_HOME}/bin:$PATH &&
34-
hash -r &&
35-
conda config --set always_yes yes --set changeps1 no &&
36-
conda update -q conda &&
37-
conda config --add channels conda-forge &&
38-
conda install python=${TRAVIS_PYTHON_VERSION} &&
39-
conda install -y icu &&
40-
pip install -r requirements.txt &&
41-
pushd $HOME;
42-
git clone https://github.com/INCF/pybids.git;
43-
cd pybids;
44-
pip install -e .;
45-
popd; }
46-
# Add install of vtk and mayavi to test mesh (disabled): conda install -y vtk mayavi
47-
- travis_retry apt_inst
48-
- travis_retry conda_inst
39+
export FSLOUTPUTTYPE=NIFTI_GZ;
40+
fi;
41+
42+
# handle python operations separately to reduce timeouts
43+
- wget https://repo.continuum.io/miniconda/Miniconda${TRAVIS_PYTHON_VERSION:0:1}-latest-Linux-x86_64.sh
44+
-O /home/travis/.cache/conda.sh
45+
- bash ${HOME}/.cache/conda.sh -b -p ${HOME}/conda
46+
- export PATH=${HOME}/conda/bin:$PATH
47+
- hash -r
48+
- conda config --set always_yes yes --set changeps1 no
49+
- travis_retry conda update -q conda
50+
- conda config --add channels conda-forge
51+
- travis_retry conda install -y python=${TRAVIS_PYTHON_VERSION} icu
52+
- travis_retry pip install -r requirements.txt
53+
- travis_retry git clone https://github.com/INCF/pybids.git ${HOME}/pybids &&
54+
pip install -e ${HOME}/pybids
55+
4956
install:
5057
- travis_retry pip install $PIP_FLAGS -e .[$NIPYPE_EXTRAS]
58+
5159
script:
5260
- py.test -v --doctest-modules nipype
61+
5362
deploy:
5463
provider: pypi
5564
user: satra

0 commit comments

Comments
 (0)