From 198d1959e503aea3a0e467d5e764d00c3d96e66c Mon Sep 17 00:00:00 2001 From: Thom Wiggers Date: Fri, 16 Feb 2018 07:49:55 +0100 Subject: [PATCH] Run sphinx-build over all cores Use `sphinx-build -j` and `nproc` to distribute collecting and compiling the documentation over all cores. --- .gitlab-ci.yml | 2 +- resources/entrypoint.sh | 2 +- resources/entrypoint_production.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 54dd774c..cc312da5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -55,7 +55,7 @@ docs: script: - echo "Building current docs" - env -u GITLAB_CI make doctest - - env -u GITLAB_CI sphinx-build -M html "." "_build" -W + - env -u GITLAB_CI sphinx-build -M html "." "_build" -W -j $(nproc) - echo "Checking if there are changes" - ./generate-apidocs.sh - git diff --exit-code diff --git a/resources/entrypoint.sh b/resources/entrypoint.sh index bca45fc7..45313d0b 100755 --- a/resources/entrypoint.sh +++ b/resources/entrypoint.sh @@ -2,7 +2,7 @@ set -e -sphinx-build -b html /usr/src/app/docs/ /concrexit/docs/ +sphinx-build -b html /usr/src/app/docs/ /concrexit/docs/ -j $(nproc) until psql -h "$DJANGO_POSTGRES_HOST" -U "postgres" -c '\l'; do >&2 echo "PostgreSQL is unavailable: Sleeping" diff --git a/resources/entrypoint_production.sh b/resources/entrypoint_production.sh index 053855f4..e15f2df7 100755 --- a/resources/entrypoint_production.sh +++ b/resources/entrypoint_production.sh @@ -3,7 +3,7 @@ set -e >&2 echo "Creating Sphinx documentation" -sphinx-build -b html /usr/src/app/docs/ /concrexit/docs/ +sphinx-build -b html /usr/src/app/docs/ /concrexit/docs/ -j $(nproc) until psql -h "$DJANGO_POSTGRES_HOST" -U "postgres" -c '\l' $POSTGRES_DB; do >&2 echo "PostgreSQL is unavailable: Sleeping" -- GitLab