-
-
Notifications
You must be signed in to change notification settings - Fork 41
234 lines (228 loc) · 9.05 KB
/
smoke_test_participant.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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# Copyright (C) 2022-2023 C-PAC Developers
# This file is part of C-PAC.
# C-PAC is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
# C-PAC is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
# License for more details.
# You should have received a copy of the GNU Lesser General Public
# License along with C-PAC. If not, see <https://www.gnu.org/licenses/>.
name: Run participant smoke test
on:
workflow_call:
workflow_dispatch:
jobs:
smoke_test_human:
name: Human ${{ matrix.preconfig }} participant smoke tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
preconfig:
- default
- abcd-options
- anat-only
- benchmark-ANTS
- benchmark-FNIRT
- blank
- ccs-options
- fmriprep-options
- fx-options
- ndmg
- preproc
- rbc-options
- regtest-1
- regtest-2
- regtest-3
- regtest-4
variant:
- ''
participant:
- 1019436 2014113 3154996 3699991 3884955 NDARAA504CRN NDARAA947ZG5 NDARAB348EWR NDARAB458VK9 NDARAD481FXF NDARAV894XWD NDARCA186WGH 0025428 0025429 0025448 0025452 0025453
include:
- preconfig: default
variant: lite
participant: 1019436 2014113 3154996 3699991 3884955 NDARAA504CRN NDARAA947ZG5 NDARAB348EWR NDARAB458VK9 NDARAD481FXF NDARAV894XWD NDARCA186WGH 0025428 0025429 0025448 0025452 0025453
# - preconfig: abcd-options
# variant: ABCD-HCP
# participant: 1019436 2014113 3154996 3699991 3884955 NDARAA504CRN NDARAA947ZG5 NDARAB348EWR NDARAB458VK9 NDARAD481FXF NDARAV894XWD NDARCA186WGH 0025428 0025429 0025448 0025452 0025453
# - preconfig: fmriprep-options
# variant: fMRIPrep-LTS
# participant: 1019436 2014113 3154996 3699991 3884955 NDARAA504CRN NDARAA947ZG5 NDARAB348EWR NDARAB458VK9 NDARAD481FXF NDARAV894XWD NDARCA186WGH 0025428 0025429 0025448 0025452 0025453
steps:
- name: Get C-PAC
run: |
if [[ "${{ matrix.variant }}" != "" ]]
then
VARIANT=-${{ matrix.variant }}
fi
GITHUB_BRANCH=$(echo ${GITHUB_REF} | cut -d '/' -f 3-)
if [[ ! $GITHUB_BRANCH == 'main' ]] && [[ ! $GITHUB_BRANCH == 'develop' ]]
then
TAG=${GITHUB_BRANCH//\//_}
elif [[ $GITHUB_BRANCH == 'develop' ]]
then
TAG=nightly
elif [[ $GITHUB_BRANCH == 'main' ]]
then
TAG=latest
fi
TAG=$TAG$VARIANT
echo DOCKER_TAG=$(echo "ghcr.io/${{ github.repository }}" | tr '[:upper:]' '[:lower:]'):$TAG >> $GITHUB_ENV
cat $GITHUB_ENV
- name: Run default smoke test
if: ${{ matrix.preconfig == 'default' }}
run: |
mkdir outputs
docker run --rm \
--user $(id -u):$(id -g) -v /etc/passwd:/etc/passwd -v /etc/group:/etc/group \
-v $PWD/outputs:/outputs \
${{ env.DOCKER_TAG }} \
/outputs /outputs test_config \
--data_config_file /code/CPAC/resources/configs/test_configs/data-test_human.yml \
--participant_label ${{ matrix.participant }} \
--n_cpus 2
- name: Run ${{ matrix.preconfig }} smoke test
if: ${{ matrix.preconfig != 'default' }}
run: |
mkdir outputs
docker run --rm \
--user $(id -u):$(id -g) -v /etc/passwd:/etc/passwd -v /etc/group:/etc/group \
-v $PWD/outputs:/outputs \
${{ env.DOCKER_TAG }} \
/outputs /outputs test_config \
--data_config_file /code/CPAC/resources/configs/test_configs/data-test_human.yml \
--participant_label ${{ matrix.participant }} \
--preconfig ${{ matrix.preconfig }} \
--n_cpus 2
- uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: expectedOutputs human ${{ matrix.preconfig }} ${{ matrix.variant }} ${{ matrix.participant }}
path: outputs/log/pipeline_*/*/*_expectedOutputs.yml
if-no-files-found: ignore
smoke_test_nhp:
name: Non-human primate ${{ matrix.preconfig }} participant smoke tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
preconfig:
- monkey
- nhp-macaque
variant:
- ''
participant:
- 032102 032106 032164 032167 032130 032128 2215 2312 032191 032195
steps:
- name: Get C-PAC
run: |
if [[ "${{ matrix.variant }}" != "" ]]
then
VARIANT=-${{ matrix.variant }}
fi
GITHUB_BRANCH=$(echo ${GITHUB_REF} | cut -d '/' -f 3-)
if [[ ! $GITHUB_BRANCH == 'main' ]] && [[ ! $GITHUB_BRANCH == 'develop' ]]
then
TAG=${GITHUB_BRANCH//\//_}
elif [[ $GITHUB_BRANCH == 'develop' ]]
then
TAG=nightly
elif [[ $GITHUB_BRANCH == 'main' ]]
then
TAG=latest
fi
TAG=$TAG$VARIANT
echo DOCKER_TAG=$(echo "ghcr.io/${{ github.repository }}" | tr '[:upper:]' '[:lower:]'):$TAG >> $GITHUB_ENV
cat $GITHUB_ENV
- name: Set up datalad-OSF
run: |
git config --global user.email "CMI_CPAC_Support@childmind.org"
git config --global user.name "Theodore (Machine User)"
wget -O- http://neuro.debian.net/lists/jammy.us-tn.libre | sudo tee /etc/apt/sources.list.d/neurodebian.sources.list
sudo apt-key adv --recv-keys --keyserver hkps://keyserver.ubuntu.com 0xA5D32F012649A5A9
sudo apt-get update
sudo apt-get install datalad git-annex-standalone
pip install datalad-osf
- name: Get NHP test data
run: |
datalad clone osf://xt93j test-data
- name: Run ${{ matrix.preconfig }} smoke test
run: |
mkdir outputs
docker run --rm \
--user $(id -u):$(id -g) -v /etc/passwd:/etc/passwd -v /etc/group:/etc/group \
-v $PWD/test-data:/test-data \
-v $PWD/outputs:/outputs \
${{ env.DOCKER_TAG }} \
/test-data /outputs test_config \
--preconfig ${{ matrix.preconfig }} \
--participant_label ${{ matrix.participant }} \
--n_cpus 2
- uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: expectedOutputs nhp ${{ matrix.preconfig }} ${{ matrix.variant }} ${{ matrix.participant }}
path: outputs/log/pipeline_*/*/*_expectedOutputs.yml
if-no-files-found: ignore
smoke_test_rodent:
name: Rodent participant smoke tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
variant:
- ''
steps:
- name: Get C-PAC
run: |
if [[ "${{ matrix.variant }}" != "" ]]
then
VARIANT=-${{ matrix.variant }}
fi
GITHUB_BRANCH=$(echo ${GITHUB_REF} | cut -d '/' -f 3-)
if [[ ! $GITHUB_BRANCH == 'main' ]] && [[ ! $GITHUB_BRANCH == 'develop' ]]
then
TAG=${GITHUB_BRANCH//\//_}
elif [[ $GITHUB_BRANCH == 'develop' ]]
then
TAG=nightly
elif [[ $GITHUB_BRANCH == 'main' ]]
then
TAG=latest
fi
TAG=$TAG$VARIANT
echo DOCKER_TAG=$(echo "ghcr.io/${{ github.repository }}" | tr '[:upper:]' '[:lower:]'):$TAG >> $GITHUB_ENV
cat $GITHUB_ENV
- name: Set up datalad-OSF
run: |
git config --global user.email "CMI_CPAC_Support@childmind.org"
git config --global user.name "Theodore (Machine User)"
wget -O- http://neuro.debian.net/lists/jammy.us-tn.libre | sudo tee /etc/apt/sources.list.d/neurodebian.sources.list
sudo apt-key adv --recv-keys --keyserver hkps://keyserver.ubuntu.com 0xA5D32F012649A5A9
sudo apt-get update
sudo apt-get install datalad git-annex-standalone
pip install datalad-osf
- name: Get rodent test data
run: |
datalad clone osf://uya3r test-data
- name: Run rodent smoke test
run: |
mkdir outputs
docker run --rm \
--user $(id -u):$(id -g) -v /etc/passwd:/etc/passwd -v /etc/group:/etc/group \
-v $PWD/test-data:/test-data \
-v $PWD/outputs:/outputs \
${{ env.DOCKER_TAG }} \
/test-data /outputs test_config \
--preconfig rodent \
--n_cpus 2
- uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: expectedOutputs rodent ${{ matrix.variant }}
path: outputs/log/pipeline_*/*/*_expectedOutputs.yml
if-no-files-found: ignore