Skip to content

Commit 46bba4a

Browse files
committed
fix(circleci): cache git-annex installation
1 parent 40040ad commit 46bba4a

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

.circleci/config.yml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,21 +32,26 @@ jobs:
3232
pip install datalad
3333
pip install "setuptools>=27.0" twine
3434
35-
- save_cache:
36-
key: deps-v2-{{ checksum "/tmp/src/templateflow/requirements.txt"}}-{{ epoch }}
37-
paths:
38-
- "/opt/circleci/.pyenv/versions/3.5.2"
39-
- "/tmp/data/templateflow"
40-
4135
- run:
4236
name: Install git and git-annex
4337
command: |
44-
wget -O- http://neuro.debian.net/lists/trusty.us-ca.full | sudo tee /etc/apt/sources.list.d/neurodebian.sources.list
45-
sudo apt-key adv --recv-keys --keyserver hkp://pool.sks-keyservers.net:80 0xA5D32F012649A5A9
46-
sudo apt update && sudo apt-get install -y --no-install-recommends git-annex-standalone
38+
if [[ ! -d "/usr/lib/git-annex.linux" || ! -e "/usr/bin/git-annex-shell" ]]; then
39+
wget -O- http://neuro.debian.net/lists/trusty.us-ca.full | sudo tee /etc/apt/sources.list.d/neurodebian.sources.list
40+
sudo apt-key adv --recv-keys --keyserver hkp://pool.sks-keyservers.net:80 0xA5D32F012649A5A9
41+
sudo apt update && sudo apt-get install -y --no-install-recommends git-annex-standalone
42+
fi
4743
git config --global user.name "First Last"
4844
git config --global user.email "[email protected]"
4945
46+
- save_cache:
47+
key: deps-v2-{{ checksum "/tmp/src/templateflow/requirements.txt"}}-{{ epoch }}
48+
paths:
49+
- "/opt/circleci/.pyenv/versions/3.5.2"
50+
- "/tmp/data/templateflow"
51+
- "/usr/lib/git-annex.linux"
52+
- "/usr/bin/git-annex"
53+
- "/usr/bin/git-annex-shell"
54+
5055
- run:
5156
name: Run tests (w/o DataLad)
5257
environment:

0 commit comments

Comments
 (0)