Run sphinx-build in parallel for releasenotes

Since the recent releases and upper-constraints bumps for
openstackdocstheme 2.1.0 and reno 3.1.0, both sphinx extensions now
support safe parallel reading.

This adds the '-j auto' option to the sphinx-build command for building
release notes to parallelize the build over multiple CPUs.

This effort was inspired by the nova build-openstack-releasenotes job
which typically takes 52m to 1h to run. The job timeout is 1h, so we
are occasionally seeing TIMED_OUT job failures.

With parallel sphinx-build, the job run time is reduced down to 15m.

Change-Id: If3c615119b1a72ce294e22685ddc2dcd6b63f4a0
changes/73/727473/3
melanie witt 2 years ago
parent b8a24d635f
commit b892aad548
  1. 6
      roles/build-releasenotes/tasks/main.yaml

@ -50,7 +50,7 @@
trap "rm -f -- '$REFERENCES'" EXIT
# Extract translations
sphinx-build -b gettext \
sphinx-build -j auto -b gettext \
-d ${DIRECTORY}/build/doctrees.gettext \
${DIRECTORY}/source/ \
${DIRECTORY}/source/locale/
@ -92,7 +92,7 @@
done
# Build translated document
sphinx-build -b html -D language=${language} \
sphinx-build -j auto -b html -D language=${language} \
-d "${DIRECTORY}/build/doctrees.${language}" \
${DIRECTORY}/source/ ${DIRECTORY}/build/html/${language}
@ -126,6 +126,6 @@
executable: /bin/bash
chdir: '{{ zuul_work_dir }}'
cmd: |
{{ zuul_work_virtualenv }}/bin/sphinx-build -a -E -W \
{{ zuul_work_virtualenv }}/bin/sphinx-build -a -E -W -j auto \
-d releasenotes/build/doctrees \
-b html releasenotes/source releasenotes/build/html

Loading…
Cancel
Save