tox: Enable parallel docs build

Add the '-j auto' flag to all 'sphinx-build' invocations. While we're
here remove the unnecessary '-d DIR' argument: Sphinx will configure a
sane doctree directory for us without any special configuration. This
results in a tidy little speed boost. Before:

  real    1m23.772s
  user    1m9.665s
  sys     0m6.299s

After:

  real    0m54.613s
  user    1m26.129s
  sys     0m7.810s

Change-Id: Id9240456f8bb289620a64792b433dbde4fa09586
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
Stephen Finucane 2021-03-24 12:20:26 +00:00
parent f280f7cdd6
commit 5ba1e90273

View File

@ -90,14 +90,14 @@ deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/doc/requirements.txt
commands =
sphinx-build -W -d doc/build/doctrees --keep-going -b html doc/source/ doc/build/html
sphinx-build -W --keep-going -b html -j auto doc/source/ doc/build/html
[testenv:pdf-docs]
deps = {[testenv:docs]deps}
whitelist_externals =
make
commands =
sphinx-build -W -d doc/build/doctrees --keep-going -b latex doc/source/ doc/build/pdf
sphinx-build -W --keep-going -b latex -j auto doc/source/ doc/build/pdf
make -C doc/build/pdf
[testenv:releasenotes]
@ -105,7 +105,7 @@ deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/doc/requirements.txt
commands =
sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html
sphinx-build -W --keep-going -b html -j auto releasenotes/source releasenotes/build/html
[flake8]
application-import-names = openstack