@@ -55,15 +55,10 @@ jobs:
55
55
- run :
56
56
name : Setup git-annex
57
57
command : |
58
- mkdir -p /tmp/cache
59
- if [[ ! -e "/tmp/cache/git-annex-standalone.tar.gz" ]]; then
58
+ if [[ ! -d /usr/lib/git-annex.linux ]]; then
60
59
wget -O- http://neuro.debian.net/lists/trusty.us-ca.full | sudo tee /etc/apt/sources.list.d/neurodebian.sources.list
61
60
apt-key adv --recv-keys --keyserver hkp://pool.sks-keyservers.net:80 0xA5D32F012649A5A9
62
61
apt update && sudo apt-get install -y --no-install-recommends git-annex-standalone
63
- mkdir -p /tmp/cache
64
- tar czvf /tmp/cache/git-annex-standalone.tar.gz /usr/bin/git-annex /usr/bin/git-annex-shell /usr/lib/git-annex.linux
65
- else
66
- tar xzfv /tmp/cache/git-annex-standalone.tar.gz -C /
67
62
fi
68
63
git config --global user.name 'CRN'
69
64
git config --global user.email '[email protected] '
77
72
python -c "from templateflow import api as tfapi; \
78
73
tfapi.get('MNI152NLin2009cAsym', resolution=2, desc='brain', suffix='mask'); \
79
74
tfapi.get('MNI152NLin2009cAsym', resolution=2, desc='fMRIPrep', suffix='boldref');"
75
+
76
+ - save_cache :
77
+ key : env-v1-{{ .Branch }}-{{ .BuildNum }}
78
+ paths :
79
+ - /tmp/cache/git-annex-standalone.tar.gz
80
+ - /usr/local/lib/python3.7/site-packages
81
+ - /usr/bin/git-annex
82
+ - /usr/bin/git-annex-shell
83
+ - /usr/lib/git-annex.linux
84
+
80
85
- run :
81
86
name : Install ds001600
82
87
command : |
91
96
-O testdata.zip "https://files.osf.io/v1/resources/9sy2a/providers/osfstorage/5d44b940bcd6d900198ed6be/?zip="
92
97
unzip testdata.zip -d /tmp/data/testdata
93
98
fi
99
+ - save_cache :
100
+ key : data-v2-{{ .Branch }}-{{ .BuildNum }}
101
+ paths :
102
+ - /tmp/data
103
+ - /tmp/templateflow
94
104
105
+ - restore_cache :
106
+ keys :
107
+ - freesurfer-v1-{{ .Branch }}-
108
+ - freesurfer-v1-master-
109
+ - freesurfer-v1-
95
110
- run :
96
111
name : Pull FreeSurfer down
97
112
command : |
@@ -115,23 +130,12 @@ jobs:
115
130
--exclude='freesurfer/subjects/sample-*.mgz' \
116
131
--exclude='freesurfer/subjects/V1_average' \
117
132
--exclude='freesurfer/trctrain'
133
+ echo "b2VzdGViYW5Ac3RhbmZvcmQuZWR1CjMwNzU2CiAqQ1MzYkJ5VXMxdTVNCiBGU2kvUGJsejJxR1V3Cg==" | base64 -d > /tmp/freesurfer/license.txt
118
134
fi
119
- - run :
120
- name : Store FreeSurfer license file
121
- command : |
122
- echo "b2VzdGViYW5Ac3RhbmZvcmQuZWR1CjMwNzU2CiAqQ1MzYkJ5VXMxdTVNCiBGU2kvUGJsejJxR1V3Cg==" | base64 -d > /tmp/freesurfer/license.txt
123
-
124
135
- save_cache :
125
- key : env -v1-{{ .Branch }}-{{ .BuildNum }}
136
+ key : freesurfer -v1-{{ .Branch }}-{{ .BuildNum }}
126
137
paths :
127
- - /tmp/cache/git-annex-standalone.tar.gz
128
-
129
- - save_cache :
130
- key : data-v2-{{ .Branch }}-{{ .BuildNum }}
131
- paths :
132
- - /tmp/data
133
138
- /tmp/freesurfer
134
- - /tmp/templateflow
135
139
136
140
build_n_pytest :
137
141
machine :
@@ -217,6 +221,11 @@ jobs:
217
221
paths :
218
222
- /tmp/docker
219
223
224
+ - restore_cache :
225
+ keys :
226
+ - freesurfer-v1-{{ .Branch }}-
227
+ - freesurfer-v1-master-
228
+ - freesurfer-v1-
220
229
- restore_cache :
221
230
keys :
222
231
- data-v2-{{ .Branch }}-
0 commit comments