forked from qMRLab/qMRLab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
228 lines (226 loc) · 11.6 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
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
# vim ft=yaml
# travis-ci.org definition for MOxUnit build (based on CoSMoMVPA,
# which is based on PyMVPA, which is based on nipype configuration,
# which in turn was based on nipy)
#
# We pretend to be java because we need GNU Octave which is not
# available (as of April 2015)
language: java
cache:
apt: true # Not working for public repos :(
directories:
# Following directories will be generated
- "$HOME/octave"
env:
global:
- OCTAVE=octave
- WAIT_TIME=30
before_install:
# to prevent IPv6 being used for APT
- travis_retry sudo apt-get -y -qq update
- travis_retry sudo apt-get install -y -qq software-properties-common python-software-properties
- travis_retry sudo apt-add-repository -y ppa:octave/stable
- travis_retry sudo apt-get -y -qq update
- travis_retry sudo apt-get install -y wget
- travis_retry sudo apt-get -y -qq install octave liboctave-dev octave-pkg-dev
# Please comment in following section if you need to update packages or add a new one
# If following section is going to be commented in, please set cacheState to false in startup.m
# --------------
#- travis_retry wget -O /home/travis/octave/OctavePackages.zip https://osf.io/t465n/download
#- unzip /home/travis/octave/OctavePackages.zip
- travis_retry wget http://sourceforge.net/projects/octave/files/Octave%20Forge%20Packages/Individual%20Package%20Releases/struct-1.0.14.tar.gz -P /home/travis/octave
- travis_retry wget http://sourceforge.net/projects/octave/files/Octave%20Forge%20Packages/Individual%20Package%20Releases/statistics-1.3.0.tar.gz -P /home/travis/octave
- travis_retry wget http://sourceforge.net/projects/octave/files/Octave%20Forge%20Packages/Individual%20Package%20Releases/optim-1.5.2.tar.gz -P /home/travis/octave
- travis_retry wget https://sourceforge.net/projects/octave/files/Octave%20Forge%20Packages/Individual%20Package%20Releases/io-2.4.10.tar.gz -P /home/travis/octave
- travis_retry wget http://sourceforge.net/projects/octave/files/Octave%20Forge%20Packages/Individual%20Package%20Releases/image-2.6.1.tar.gz -P /home/travis/octave
# --------------
- make -C External/MOcov install
- pip install --user awscli
jobs:
include:
- stage: Test
script:
- |
travis_wait $WAIT_TIME \
octave --no-gui --eval "bootstrapTest;cd('$TRAVIS_BUILD_DIR/Test/MoxUnitCompatible/quickMoxTests'); \
res=moxunit_runtests('-recursive','-with_coverage','-cover','$TRAVIS_BUILD_DIR/src','-cover_exclude','*GUI*','-cover_json_file','coverage_quickMoxTests.json'); \
exit(~res);"
if [ "$?" != "0" ]; then travis_terminate 1; fi
if [ "${TRAVIS_REPO_SLUG%%/*}" = "qMRLab" ]
then
aws s3 cp $TRAVIS_BUILD_DIR/Test/MoxUnitCompatible/quickMoxTests/coverage_quickMoxTests.json \
s3://qmrlab/$TRAVIS_BUILD_NUMBER/coverage_quickMoxTests.json;
if [ "$?" != "0" ]; then travis_terminate 1; fi
fi
- stage: Test
script:
- |
travis_wait $WAIT_TIME \
octave --no-gui --eval "bootstrapTest;cd('$TRAVIS_BUILD_DIR/Test/MoxUnitCompatible'); \
res=moxunit_runtests('BatchExample_test.m','-with_coverage','-cover','$TRAVIS_BUILD_DIR/src','-cover_exclude','*GUI*','-cover_json_file','coverage_BatchExample.json'); \
exit(~res);"
if [ "$?" != "0" ]; then travis_terminate 1; fi
if [ "${TRAVIS_REPO_SLUG%%/*}" = "qMRLab" ]
then
aws s3 cp $TRAVIS_BUILD_DIR/Test/MoxUnitCompatible/coverage_BatchExample.json \
s3://qmrlab/$TRAVIS_BUILD_NUMBER/coverage_BatchExample.json
if [ "$?" != "0" ]; then travis_terminate 1; fi
fi
- stage: Test
script:
- |
travis_wait $WAIT_TIME \
octave --no-gui --eval "bootstrapTest;cd('$TRAVIS_BUILD_DIR/Test/MoxUnitCompatible'); \
res=moxunit_runtests('BatchExample_qmt_spgr_test.m','-with_coverage','-cover','$TRAVIS_BUILD_DIR/src','-cover_exclude','*GUI*','-cover_json_file','coverage_BatchExample_qmt_spgr.json'); \
exit(~res);"
if [ "$?" != "0" ]; then travis_terminate 1; fi
if [ "${TRAVIS_REPO_SLUG%%/*}" = "qMRLab" ]
then
aws s3 cp $TRAVIS_BUILD_DIR/Test/MoxUnitCompatible/coverage_BatchExample_qmt_spgr.json \
s3://qmrlab/$TRAVIS_BUILD_NUMBER/coverage_BatchExample_qmt_spgr.json
if [ "$?" != "0" ]; then travis_terminate 1; fi
fi
- stage: Test
script:
- |
travis_wait $WAIT_TIME \
octave --no-gui --eval "bootstrapTest;cd('$TRAVIS_BUILD_DIR/Test/MoxUnitCompatible'); \
res=moxunit_runtests('BatchExample_qmt_bssfp_test.m','-with_coverage','-cover','$TRAVIS_BUILD_DIR/src','-cover_exclude','*GUI*','-cover_json_file','coverage_BatchExample_qmt_bssfp.json'); \
exit(~res);"
if [ "$?" != "0" ]; then travis_terminate 1; fi
if [ "${TRAVIS_REPO_SLUG%%/*}" = "qMRLab" ]
then
aws s3 cp $TRAVIS_BUILD_DIR/Test/MoxUnitCompatible/coverage_BatchExample_qmt_bssfp.json \
s3://qmrlab/$TRAVIS_BUILD_NUMBER/coverage_BatchExample_qmt_bssfp.json
if [ "$?" != "0" ]; then travis_terminate 1; fi
fi
- stage: Test
script:
- |
travis_wait $WAIT_TIME \
octave --no-gui --eval "bootstrapTest;cd('$TRAVIS_BUILD_DIR/Test/MoxUnitCompatible'); \
res=moxunit_runtests('BatchExample_qmt_sirfse_test.m','-with_coverage','-cover','$TRAVIS_BUILD_DIR/src','-cover_exclude','*GUI*','-cover_json_file','coverage_BatchExample_qmt_sirfse.json'); \
exit(~res);"
if [ "$?" != "0" ]; then travis_terminate 1; fi
if [ "${TRAVIS_REPO_SLUG%%/*}" = "qMRLab" ]
then
aws s3 cp $TRAVIS_BUILD_DIR/Test/MoxUnitCompatible/coverage_BatchExample_qmt_sirfse.json \
s3://qmrlab/$TRAVIS_BUILD_NUMBER/coverage_BatchExample_qmt_sirfse.json;
if [ "$?" != "0" ]; then travis_terminate 1; fi
fi
- stage: Test
script:
- |
travis_wait $WAIT_TIME \
octave --no-gui --eval "bootstrapTest;cd('$TRAVIS_BUILD_DIR/Test/MoxUnitCompatible'); \
res=moxunit_runtests('SimTest_charmed.m','-with_coverage','-cover','$TRAVIS_BUILD_DIR/src','-cover_exclude','*GUI*','-cover_json_file','coverage_SimTest_charmed.json'); \
exit(~res);"
if [ "$?" != "0" ]; then travis_terminate 1; fi
if [ "${TRAVIS_REPO_SLUG%%/*}" = "qMRLab" ]
then
aws s3 cp $TRAVIS_BUILD_DIR/Test/MoxUnitCompatible/coverage_SimTest_charmed.json \
s3://qmrlab/$TRAVIS_BUILD_NUMBER/coverage_SimTest_charmed.json
if [ "$?" != "0" ]; then travis_terminate 1; fi
fi
- stage: Test
script:
- |
travis_wait $WAIT_TIME \
octave --no-gui --eval "bootstrapTest;cd('$TRAVIS_BUILD_DIR/Test/MoxUnitCompatible'); \
res=moxunit_runtests('SimTest_dti.m','-with_coverage','-cover','$TRAVIS_BUILD_DIR/src','-cover_exclude','*GUI*','-cover_json_file','coverage_SimTest_dti.json'); \
exit(~res);"
if [ "$?" != "0" ]; then travis_terminate 1; fi
if [ "${TRAVIS_REPO_SLUG%%/*}" = "qMRLab" ]
then
aws s3 cp $TRAVIS_BUILD_DIR/Test/MoxUnitCompatible/coverage_SimTest_dti.json \
s3://qmrlab/$TRAVIS_BUILD_NUMBER/coverage_SimTest_dti.json
if [ "$?" != "0" ]; then travis_terminate 1; fi
fi
- stage: Test
script:
- |
travis_wait $WAIT_TIME \
octave --no-gui --eval "bootstrapTest;cd('$TRAVIS_BUILD_DIR/Test/MoxUnitCompatible'); \
res=moxunit_runtests('SimTest_noddi.m','-with_coverage','-cover','$TRAVIS_BUILD_DIR/src','-cover_exclude','*GUI*','-cover_json_file','coverage_SimTest_noddi.json'); \
exit(~res);"
if [ "$?" != "0" ]; then travis_terminate 1; fi
if [ "${TRAVIS_REPO_SLUG%%/*}" = "qMRLab" ]
then
aws s3 cp $TRAVIS_BUILD_DIR/Test/MoxUnitCompatible/coverage_SimTest_noddi.json \
s3://qmrlab/$TRAVIS_BUILD_NUMBER/coverage_SimTest_noddi.json
if [ "$?" != "0" ]; then travis_terminate 1; fi
fi
- stage: Test
script:
- |
travis_wait $WAIT_TIME \
octave --no-gui --eval "bootstrapTest;cd('$TRAVIS_BUILD_DIR/Test/MoxUnitCompatible'); \
res=moxunit_runtests('SimTest_qmt_sirfse.m','-with_coverage','-cover','$TRAVIS_BUILD_DIR/src','-cover_exclude','*GUI*','-cover_json_file','coverage_SimTest_qmt_sirfse.json'); \
exit(~res);"
if [ "$?" != "0" ]; then travis_terminate 1; fi
if [ "${TRAVIS_REPO_SLUG%%/*}" = "qMRLab" ]
then
aws s3 cp $TRAVIS_BUILD_DIR/Test/MoxUnitCompatible/coverage_SimTest_qmt_sirfse.json \
s3://qmrlab/$TRAVIS_BUILD_NUMBER/coverage_SimTest_mt_sirfse.json
if [ "$?" != "0" ]; then travis_terminate 1; fi
fi
- stage: Test
script:
- |
travis_wait $WAIT_TIME \
octave --no-gui --eval "bootstrapTest;cd('$TRAVIS_BUILD_DIR/Test/MoxUnitCompatible'); \
res=moxunit_runtests('SimTest_inversion_recovery.m','-with_coverage','-cover','$TRAVIS_BUILD_DIR/src','-cover_exclude','*GUI*','-cover_json_file','coverage_SimTest_inversion_recovery.json'); \
exit(~res);"
if [ "$?" != "0" ]; then travis_terminate 1; fi
if [ "${TRAVIS_REPO_SLUG%%/*}" = "qMRLab" ]
then
aws s3 cp $TRAVIS_BUILD_DIR/Test/MoxUnitCompatible/coverage_SimTest_inversion_recovery.json \
s3://qmrlab/$TRAVIS_BUILD_NUMBER/coverage_SimTest_inversion_recovery.json
if [ "$?" != "0" ]; then travis_terminate 1; fi
fi
- stage: Test
script:
- |
travis_wait $WAIT_TIME \
octave --no-gui --eval "bootstrapTest;cd('$TRAVIS_BUILD_DIR/Test/MoxUnitCompatible'); \
res=moxunit_runtests('SimTest_vfa_t1.m','-with_coverage','-cover','$TRAVIS_BUILD_DIR/src','-cover_exclude','*GUI*','-cover_json_file','coverage_SimTest_vfa_t1.json'); \
exit(~res);"
if [ "$?" != "0" ]; then travis_terminate 1; fi
if [ "${TRAVIS_REPO_SLUG%%/*}" = "qMRLab" ]
then
aws s3 cp $TRAVIS_BUILD_DIR/Test/MoxUnitCompatible/coverage_SimTest_vfa_t1.json \
s3://qmrlab/$TRAVIS_BUILD_NUMBER/coverage_SimTest_vfa_t1.json
if [ "$?" != "0" ]; then travis_terminate 1; fi
fi
- stage: Test
script:
- |
travis_wait $WAIT_TIME \
octave --no-gui --eval "bootstrapTest;cd('$TRAVIS_BUILD_DIR/Test/MoxUnitCompatible'); \
res=moxunit_runtests('SimTest_mwf.m','-with_coverage','-cover','$TRAVIS_BUILD_DIR/src','-cover_exclude','*GUI*','-cover_json_file','coverage_SimTest_mwf.json'); \
exit(~res);"
if [ "$?" != "0" ]; then travis_terminate 1; fi
if [ "${TRAVIS_REPO_SLUG%%/*}" = "qMRLab" ]
then
aws s3 cp $TRAVIS_BUILD_DIR/Test/MoxUnitCompatible/coverage_SimTest_mwf.json \
s3://qmrlab/$TRAVIS_BUILD_NUMBER/coverage_SimTest_mwf.json
if [ "$?" != "0" ]; then travis_terminate 1; fi
fi
- stage: Test (no coverage)
script: travis_wait $WAIT_TIME octave --no-gui --eval "bootstrapTest;cd('$TRAVIS_BUILD_DIR/Test/MoxUnitCompatible');res=moxunit_runtests('SimTest_qmt_spgr.m');exit(~res);"
- stage: Test (no coverage)
script: travis_wait $WAIT_TIME octave --no-gui --eval "bootstrapTest;cd('$TRAVIS_BUILD_DIR/Test/MoxUnitCompatible');res=moxunit_runtests('SimTest_qmt_bssfp.m');exit(~res);"
- stage: Send combined coveralls.io report
script:
- |
if [ "${TRAVIS_REPO_SLUG%%/*}" = "qMRLab" ]
then
aws s3 cp s3://qmrlab/$TRAVIS_BUILD_NUMBER/ $TRAVIS_BUILD_DIR/Test/MoxUnitCompatible/ --recursive --include "*.json"
octave --no-gui --eval "bootstrapTest;cd('$TRAVIS_BUILD_DIR/'); \
startup; \
mocov_combine('$TRAVIS_BUILD_DIR/Test/MoxUnitCompatible/','coverage_combined.json')"
aws s3 cp $TRAVIS_BUILD_DIR/Test/MoxUnitCompatible/coverage_combined.json s3://qmrlab/$TRAVIS_BUILD_NUMBER/coverage_combined.json
curl --verbose -F json_file=@$TRAVIS_BUILD_DIR/Test/MoxUnitCompatible/coverage_combined.json https://coveralls.io/api/v1/jobs
fi
after_failure:
- sleep 10