Skip to content

Commit 16960f6

Browse files
committed
CI: Build docs outside of container
1 parent 3ac659d commit 16960f6

File tree

1 file changed

+14
-30
lines changed

1 file changed

+14
-30
lines changed

.circleci/config.yml

Lines changed: 14 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -294,47 +294,30 @@ jobs:
294294

295295

296296
build_docs:
297-
machine:
298-
image: circleci/classic:201711-01
299-
working_directory: /home/circleci/out/docs
297+
docker:
298+
- image: python:latest
299+
working_directory: /tmp/src/fmriprep
300300
steps:
301-
- checkout:
302-
path: /home/circleci/src/fmriprep
301+
- checkout
303302
- run:
304303
name: Check whether build should be skipped
305304
command: |
306-
cd /home/circleci/src/fmriprep
307305
if [[ "$( git log --format=oneline -n 1 $CIRCLE_SHA1 | grep -i -E '\[skip[ _]?docs\]' )" != "" ]]; then
308306
echo "Skipping doc building job"
309307
circleci step halt
310308
fi
311-
312-
- attach_workspace:
313-
at: /tmp
314309
- run:
315-
name: Load Docker image layer cache
316-
no_output_timeout: 30m
310+
name: Check Python version and upgrade pip
317311
command: |
318-
docker info
319-
set +o pipefail
320-
if [ -f /tmp/cache/docker.tar.gz ]; then
321-
sudo apt update && sudo apt -y install pigz
322-
pigz -d --stdout /tmp/cache/docker.tar.gz | docker load
323-
docker images
324-
fi
312+
python --version
313+
python -m pip install -U pip setuptools numpy
325314
- run:
326-
name: Build fMRIPrep documentation
327-
no_output_timeout: 2h
315+
name: Install fMRIPrep
328316
command: |
329-
docker run -ti --rm=false -v $PWD:/_build_html \
330-
--entrypoint=sphinx-build poldracklab/fmriprep:latest \
331-
-T -E -b html -d _build/doctrees-readthedocs -W -D \
332-
language=en /src/fmriprep/docs/ /_build_html 2>&1 \
333-
| tee $PWD/builddocs.log
334-
cat $PWD/builddocs.log
335-
grep -qv "ERROR" $PWD/builddocs.log
317+
python -m pip install ".[doc]"
318+
make -C docs html
336319
- store_artifacts:
337-
path: /home/circleci/out/docs
320+
path: /tmp/src/fmriprep/docs/_build/html
338321

339322
ds005:
340323
machine:
@@ -801,6 +784,9 @@ workflows:
801784
jobs:
802785
- build:
803786
filters:
787+
branches:
788+
ignore:
789+
- /docs?\/.*/
804790
tags:
805791
only: /.*/
806792

@@ -827,8 +813,6 @@ workflows:
827813
only: /.*/
828814

829815
- build_docs:
830-
requires:
831-
- build
832816
filters:
833817
branches:
834818
ignore:

0 commit comments

Comments
 (0)