|
| 1 | +machine: |
| 2 | + services: |
| 3 | + - docker |
| 4 | + |
1 | 5 | dependencies: |
2 | 6 | cache_directories: |
3 | | - - "~/.apt-cache" |
4 | | - - "~/examples/data" |
5 | | - - "~/examples/fsdata" |
6 | | - - "~/mcr" |
7 | | - - "~/spm12" |
8 | | - - "~/examples/fsl_course_data" |
| 7 | + - "~/docker" |
| 8 | + |
9 | 9 | pre: |
10 | | - # Let CircleCI cache the apt archive |
11 | | - - sudo rm -rf /var/cache/apt/archives && sudo ln -s ~/.apt-cache /var/cache/apt/archives && mkdir -p ~/.apt-cache/partial |
12 | | - - bash <(wget -q -O- http://neuro.debian.net/_files/neurodebian-travis.sh) |
| 10 | + - mkdir -p "~/scratch/nose" |
| 11 | + |
13 | 12 | override: |
14 | | - # Install apt packages |
15 | | - - sudo apt-get install -y fsl-core fsl-atlases fsl-mni152-templates fsl-feeds afni swig python-vtk xvfb fusefat |
16 | | - - echo 'source /etc/fsl/fsl.sh' >> $HOME/.profile |
17 | | - - echo 'source /etc/afni/afni.sh' >> $HOME/.profile |
18 | | - - mkdir -p ~/examples/ && ln -sf /usr/share/fsl-feeds/ ~/examples/feeds |
19 | | - # Enable system-wide vtk |
20 | | - - ln -sf /usr/lib/pymodules/python2.7/vtk ~/virtualenvs/venv-system/lib/python2.7/site-packages/ |
21 | | - # Set up python environment |
22 | | - - pip install --upgrade pip |
23 | | - - pip install -e . |
24 | | - - pip install matplotlib sphinx ipython boto coverage dipy |
25 | | - # Add tvtk |
26 | | - - pip install http://effbot.org/downloads/Imaging-1.1.7.tar.gz |
27 | | - - pip install -e git+https://github.com/enthought/etsdevtools.git#egg=etsdevtools |
28 | | - - pip install -e git+https://github.com/enthought/blockcanvas.git#egg=blockcanvas |
29 | | - - pip install -e git+https://github.com/enthought/etsproxy.git#egg=etsproxy |
30 | | - - pip install -e git+https://github.com/enthought/ets.git#egg=ets |
31 | | - - pip install https://github.com/rtfd/readthedocs-sphinx-ext/archive/master.zip |
32 | | - - gem install fakes3 |
33 | | - - if [[ ! -d ~/examples/data ]]; then wget "https://dl.dropbox.com/s/jzgq2nupxyz36bp/nipype-tutorial.tar.bz2" && tar jxvf nipype-tutorial.tar.bz2 && mv nipype-tutorial/* ~/examples/; fi |
34 | | - - if [[ ! -d ~/examples/fsl_course_data ]]; then wget -c "http://fsl.fmrib.ox.ac.uk/fslcourse/fdt1.tar.gz" && wget -c "http://fsl.fmrib.ox.ac.uk/fslcourse/fdt2.tar.gz" && wget -c "http://fsl.fmrib.ox.ac.uk/fslcourse/tbss.tar.gz" && mkdir ~/examples/fsl_course_data && tar zxvf fdt1.tar.gz -C ~/examples/fsl_course_data && tar zxvf fdt2.tar.gz -C ~/examples/fsl_course_data && tar zxvf tbss.tar.gz -C ~/examples/fsl_course_data; fi |
35 | | - - bash ~/nipype/tools/install_spm_mcr.sh |
36 | | - - mkdir -p ~/.nipype && echo '[logging]' > ~/.nipype/nipype.cfg && echo 'workflow_level = DEBUG' >> ~/.nipype/nipype.cfg && echo 'interface_level = DEBUG' >> ~/.nipype/nipype.cfg && echo 'filemanip_level = DEBUG' >> ~/.nipype/nipype.cfg |
37 | | -machine: |
38 | | - environment: |
39 | | - FSLOUTPUTTYPE: NIFTI_GZ |
| 13 | + - if [[ -e ~/docker/image.tar ]]; then docker load -i ~/docker/image.tar; fi |
| 14 | + - docker build -t nipype/testbench:latest . : |
| 15 | + timeout: 1600 |
| 16 | + - mkdir -p ~/docker; docker save nipype/testbench:latest > ~/docker/image.tar : |
| 17 | + timeout: 1600 |
| 18 | + |
40 | 19 | test: |
41 | 20 | override: |
42 | | - - mkdir -p ${CIRCLE_TEST_REPORTS}/nose |
43 | | - - source $HOME/.profile; nosetests --with-doctest --xunit-file="${CIRCLE_TEST_REPORTS}/nose/${CIRCLE_PROJECT_REPONAME}.xml" -c ./.noserc --logging-level=DEBUG --verbosity=3: |
44 | | - environment: |
45 | | - SPMMCRCMD: "$HOME/spm12/run_spm12.sh $HOME/mcr/v85/ script" |
46 | | - FORCE_SPMMCR: 1 |
47 | | - FSL_COURSE_DATA: "$HOME/examples/fsl_course_data" |
48 | | - timeout: 2600 |
49 | | - - set -o pipefail && cd doc && make html 2>&1 | tee ~/log.txt |
50 | | - - cat ~/log.txt && if grep -q "ERROR" ~/log.txt; then false; else true; fi |
51 | | - - source $HOME/.profile; python ~/nipype/tools/run_examples.py test_spm Linear workflow3d workflow4d: |
52 | | - pwd: ../examples |
53 | | - environment: |
54 | | - SPMMCRCMD: "$HOME/spm12/run_spm12.sh $HOME/mcr/v85/ script" |
55 | | - FORCE_SPMMCR: 1 |
| 21 | + - docker run -i -v /etc/localtime:/etc/localtime:ro -v ~/scratch:/scratch -w /scratch --entrypoint="/usr/bin/run_builddocs.sh" nipype/testbench |
| 22 | + - docker run -i -v /etc/localtime:/etc/localtime:ro -v ~/scratch:/scratch -w /scratch nipype/testbench test_spm Linear /root/examples/ workflow3d : |
56 | 23 | timeout: 1600 |
57 | | - - source $HOME/.profile; python ~/nipype/tools/run_examples.py fmri_fsl_feeds Linear l1pipeline: |
58 | | - pwd: ../examples |
59 | | - - source $HOME/.profile; python ~/nipype/tools/run_examples.py fmri_spm_dartel Linear level1 l2pipeline: |
60 | | - pwd: ../examples |
61 | | - environment: |
62 | | - SPMMCRCMD: "$HOME/spm12/run_spm12.sh $HOME/mcr/v85/ script" |
63 | | - FORCE_SPMMCR: 1 |
| 24 | + - docker run -i -v /etc/localtime:/etc/localtime:ro -v ~/scratch:/scratch -w /scratch nipype/testbench test_spm Linear /root/examples/ workflow4d : |
64 | 25 | timeout: 1600 |
65 | | - - source $HOME/.profile; python ~/nipype/tools/run_examples.py fmri_fsl_reuse Linear level1_workflow: |
66 | | - pwd: ../examples |
67 | | - - source $HOME/.profile; python ~/nipype/tools/run_examples.py fmri_spm_nested Linear level1 l2pipeline: |
68 | | - pwd: ../examples |
69 | | - environment: |
70 | | - SPMMCRCMD: "$HOME/spm12/run_spm12.sh $HOME/mcr/v85/ script" |
71 | | - FORCE_SPMMCR: 1 |
| 26 | + - docker run -i -v /etc/localtime:/etc/localtime:ro -v ~/scratch:/scratch -w /scratch nipype/testbench fmri_fsl_feeds Linear /root/examples/ l1pipeline |
| 27 | + - docker run -i -v /etc/localtime:/etc/localtime:ro -v ~/scratch:/scratch -w /scratch nipype/testbench fmri_spm_dartel Linear /root/examples/ level1 : |
| 28 | + timeout: 1600 |
| 29 | + - docker run -i -v /etc/localtime:/etc/localtime:ro -v ~/scratch:/scratch -w /scratch nipype/testbench fmri_spm_dartel Linear /root/examples/ l2pipeline : |
| 30 | + timeout: 1600 |
| 31 | + - docker run -i -v /etc/localtime:/etc/localtime:ro -v ~/scratch:/scratch -w /scratch nipype/testbench fmri_fsl_reuse Linear /root/examples/ level1_workflow |
| 32 | + - docker run -i -v /etc/localtime:/etc/localtime:ro -v ~/scratch:/scratch -w /scratch nipype/testbench fmri_spm_nested Linear /root/examples/ level1 |
| 33 | + - docker run -i -v /etc/localtime:/etc/localtime:ro -v ~/scratch:/scratch -w /scratch nipype/testbench fmri_spm_nested Linear /root/examples/ l2pipeline |
| 34 | + - docker run -i -v /etc/localtime:/etc/localtime:ro -v ~/scratch:/scratch -w /scratch --entrypoint="/usr/bin/run_nosetests.sh" nipype/testbench : |
| 35 | + timeout: 2600 |
| 36 | + post: |
| 37 | + - bash docker/circleci/teardown.sh |
72 | 38 |
|
73 | 39 | general: |
74 | 40 | artifacts: |
75 | | - - "doc/_build/html" |
76 | | - - "~/log.txt" |
77 | | - - "nosetests.xml" |
78 | | - - "coverage.xml" |
| 41 | + - "~/docs" |
| 42 | + - "~/logs" |
| 43 | + - "~/coverage.xml" |
| 44 | + - "~/nosetests.xml" |
| 45 | + - "~/builddocs.log" |
| 46 | + - "~/scratch" |
0 commit comments