forked from nipreps/sdcflows
-
Notifications
You must be signed in to change notification settings - Fork 0
128 lines (116 loc) · 4.38 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
name: Deps & CI
on: [push, pull_request]
jobs:
build-linux:
if: "!contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ubuntu-latest
env:
TEST_DATA_HOME: /home/runner/sdcflows-tests
FSLDIR: /usr/share/fsl/5.0
FSLOUTPUTTYPE: NIFTI_GZ
FSLMULTIFILEQUIT: TRUE
POSSUMDIR: /usr/share/fsl/5.0
FSLTCLSH: /usr/bin/tclsh
FSLWISH: /usr/bin/wish
AFNI_MODELPATH: /usr/lib/afni/models
AFNI_IMSAVE_WARNINGS: NO
AFNI_TTATLAS_DATASET: /usr/share/afni/atlases
AFNI_PLUGINPATH: /usr/lib/afni/plugins
ANTSPATH: /usr/lib/ants
strategy:
max-parallel: 5
matrix:
python-version: [3.7, 3.8, 3.9]
steps:
- name: Git settings (pacify DataLad)
run: |
git config --global user.name 'NiPreps Bot'
git config --global user.email '[email protected]'
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v2
id: conda
with:
path: |
/usr/share/miniconda/pkgs
/home/runner/.cache/pip
key: python-${{ matrix.python-version }}-v2
restore-keys: |
python-${{ matrix.python-version }}-
- name: Install DataLad
run: |
$CONDA/bin/conda install -c conda-forge git-annex datalad pip
$CONDA/bin/pip install datalad-osf
- uses: actions/checkout@v2
- name: Install minimal dependencies
run: |
$CONDA/bin/pip install -r min-requirements.txt
$CONDA/bin/pip install .[tests]
- uses: actions/cache@v2
with:
path: ~/.cache/templateflow
key: tf-cache-v1
restore-keys: |
tf-cache-
- name: Get TemplateFlow's required objects
run: |
$CONDA/bin/python tools/cache_templateflow.py
- uses: actions/cache@v2
with:
path: ${{ env.TEST_DATA_HOME }}
key: data-cache-v1
restore-keys: |
data-cache-
- name: Install test data
run: |
export PATH=$CONDA/bin:$PATH
mkdir -p ${{ env.TEST_DATA_HOME }}
cd ${{ env.TEST_DATA_HOME }}
# ds001600
datalad install -r https://github.com/nipreps-data/ds001600.git
datalad update -r --merge -d ds001600/
datalad get -r -d ds001600/ ds001600/sub-1/
# HCP/sub-101006
datalad install -r https://github.com/nipreps-data/HCP101006.git
datalad update -r --merge -d HCP101006/
datalad get -r -d HCP101006
# ds001771
datalad install -r https://github.com/nipreps-data/ds001771.git
datalad update --merge -d ds001771/
datalad get -r -d ds001771/ ds001771/sub-36/*
# ds000054
datalad install -r https://github.com/nipreps-data/ds000054.git
datalad update --merge -d ds000054/
datalad get -r -d ds000054/ ds000054/sub-100185/*
- uses: actions/cache@v2
with:
path: /var/lib/apt
key: apt-cache-v1
restore-keys: |
apt-cache-
- name: Install NeuroDebian & software packages
run: |
bash <(wget -q -O- http://neuro.debian.net/_files/neurodebian-travis.sh);
sudo apt-get update
sudo apt-get install -y --no-install-recommends fsl afni
sudo mkdir -p $ANTSPATH
curl -sSL "https://dl.dropbox.com/s/gwf51ykkk5bifyj/ants-Linux-centos6_x86_64-v2.3.4.tar.gz" | sudo tar -xzC $ANTSPATH --strip-components 1
- name: Install FreeSurfer's mri_robust_template
env:
MRI_ROBUST_TEMPLATE: sx2n7/providers/osfstorage/5e825301d0e35400ebb481f2
run: |
curl https://files.osf.io/v1/resources/$MRI_ROBUST_TEMPLATE?direct > mri_robust_template
sudo install mri_robust_template /usr/local/bin
mkdir -p $HOME/.cache/freesurfer/
echo "b2VzdGViYW5Ac3RhbmZvcmQuZWR1CjMwNzU2CiAqQ1MzYkJ5VXMxdTVNCiBGU2kvUGJsejJxR1V3Cg==" | base64 -d > $HOME/.cache/freesurfer/license.txt
- name: Run pytest with coverage
run: |
export LD_LIBRARY_PATH=/usr/lib/fsl/5.0:$LD_LIBRARY_PATH
export PATH=/usr/lib/ants:/usr/lib/fsl/5.0:/usr/lib/afni/bin:$PATH
$CONDA/bin/pytest -v --cov sdcflows --cov-report xml:cov.xml --doctest-modules sdcflows
- name: Submit code coverage
run: |
$CONDA/bin/conda install codecov
$CONDA/bin/python -m codecov --flags travis --file cov.xml -e $GITHUB_RUN_NUMBER