Skip to content

Commit b66cfbd

Browse files
committed
maint: do not install neurodebian on CircleCI
1 parent 4e24225 commit b66cfbd

File tree

1 file changed

+53
-62
lines changed

1 file changed

+53
-62
lines changed

.circleci/config.yml

+53-62
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,59 @@ jobs:
99
FS_LICENSE: "/tmp/fslicense/license.txt"
1010

1111
steps:
12+
- restore_cache:
13+
keys:
14+
- env-v3-{{ .Branch }}-
15+
- env-v3-master-
16+
- env-v3-
17+
- run:
18+
name: Setup git-annex
19+
command: |
20+
sudo apt update && sudo apt-get install apt-transport-https ca-certificates -y && sudo update-ca-certificates
21+
if [[ ! -d /opt/circleci/git-annex.linux ]]; then
22+
cd /tmp
23+
wget https://downloads.kitenet.net/git-annex/linux/current/git-annex-standalone-amd64.tar.gz
24+
tar xzf git-annex-standalone-amd64.tar.gz -C /opt/circleci/
25+
fi
26+
git config --global user.name 'NiPy'
27+
git config --global user.email '[email protected]'
28+
- run:
29+
name: Setup DataLad
30+
command: |
31+
export PY3=$(pyenv versions | grep '3\.' |
32+
sed -e 's/.* 3\./3./' -e 's/ .*//')
33+
pyenv local $PY3
34+
python -m pip install --no-cache-dir -U pip "setuptools >= 45.0" "setuptools_scm[toml] >= 3.4"
35+
python -m pip install --no-cache-dir -U datalad datalad-osf
36+
37+
- save_cache:
38+
key: env-v3-{{ .Branch }}-{{ .BuildNum }}
39+
paths:
40+
- /opt/circleci/git-annex.linux
41+
- /opt/circleci/.pyenv/versions/3.9.4
42+
43+
- restore_cache:
44+
keys:
45+
- data-v2-{{ .Branch }}-
46+
- data-v2-master-
47+
- data-v2-
48+
- run:
49+
name: Install test data from GIN
50+
command: |
51+
export PY3=$(pyenv versions | grep '3\.' |
52+
sed -e 's/.* 3\./3./' -e 's/ .*//')
53+
pyenv local $PY3
54+
export PATH=/opt/circleci/git-annex.linux:$PATH
55+
mkdir -p /tmp/data
56+
cd /tmp/data
57+
datalad install -r https://gin.g-node.org/oesteban/nitransforms-tests.git
58+
datalad update -r --merge -d nitransforms-tests/
59+
datalad get -r -d nitransforms-tests/
60+
- save_cache:
61+
key: data-v2-{{ .Branch }}-{{ .BuildNum }}
62+
paths:
63+
- /tmp/data
64+
1265
- restore_cache:
1366
keys:
1467
- build-v1-{{ .Branch }}-{{ epoch }}
@@ -41,13 +94,6 @@ jobs:
4194
docker push localhost:5000/ubuntu
4295
fi
4396
- checkout
44-
- run:
45-
name: Prepare a Python environment
46-
command: |
47-
export PY3=$(pyenv versions | grep '3\.' |
48-
sed -e 's/.* 3\./3./' -e 's/ .*//')
49-
pyenv local $PY3
50-
python3 -m pip install "setuptools >= 45.0" "setuptools_scm[toml] >= 3.4" "pip>=10.0.1"
5197
- run:
5298
name: Build Docker image & push to registry
5399
no_output_timeout: 60m
@@ -93,61 +139,6 @@ jobs:
93139
mkdir -p /tmp/fslicense
94140
cd /tmp/fslicense
95141
echo "cHJpbnRmICJrcnp5c3p0b2YuZ29yZ29sZXdza2lAZ21haWwuY29tXG41MTcyXG4gKkN2dW12RVYzelRmZ1xuRlM1Si8yYzFhZ2c0RVxuIiA+IGxpY2Vuc2UudHh0Cg==" | base64 -d | sh
96-
97-
- restore_cache:
98-
keys:
99-
- env-v1-{{ .Branch }}-
100-
- env-v1-master-
101-
- env-v1-
102-
- restore_cache:
103-
keys:
104-
- data-v2-{{ .Branch }}-
105-
- data-v2-master-
106-
- data-v2-
107-
- run:
108-
name: Setup git-annex
109-
command: |
110-
if [[ ! -d /usr/lib/git-annex.linux ]]; then
111-
wget -O- http://neuro.debian.net/lists/focal.us-ca.full | tee /etc/apt/sources.list.d/neurodebian.sources.list
112-
apt-key add /tmp/src/nitransforms/docker/files/neurodebian.gpg
113-
apt-key adv --recv-keys --keyserver hkps://keys.openpgp.org 0xA5D32F012649A5A9 || true
114-
apt update && apt-get install -y --no-install-recommends git-annex-standalone
115-
fi
116-
git config --global user.name 'NiPy'
117-
git config --global user.email '[email protected]'
118-
- run:
119-
name: Setup DataLad & TemplateFlow
120-
command: |
121-
export PY3=$(pyenv versions | grep '3\.' |
122-
sed -e 's/.* 3\./3./' -e 's/ .*//')
123-
pyenv local $PY3
124-
python -m pip install --no-cache-dir -U pip
125-
python -m pip install --no-cache-dir -U datalad datalad-osf
126-
127-
- save_cache:
128-
key: env-v1-{{ .Branch }}-{{ .BuildNum }}
129-
paths:
130-
- /usr/local/bin
131-
- /usr/local/lib/python3.7/site-packages
132-
- /usr/bin/git-annex
133-
- /usr/bin/git-annex-shell
134-
- /usr/lib/git-annex.linux
135-
136-
- run:
137-
name: Install test data from GIN
138-
command: |
139-
export PY3=$(pyenv versions | grep '3\.' |
140-
sed -e 's/.* 3\./3./' -e 's/ .*//')
141-
pyenv local $PY3
142-
143-
cd /tmp/data
144-
datalad install -r https://gin.g-node.org/oesteban/nitransforms-tests
145-
datalad update -r --merge -d nitransforms-tests/
146-
datalad get -r -d nitransforms-tests/
147-
- save_cache:
148-
key: data-v1-{{ .Branch }}-{{ .BuildNum }}
149-
paths:
150-
- /tmp/data
151142
- run:
152143
name: Get codecov
153144
command: python -m pip install codecov

0 commit comments

Comments
 (0)