Make docs build parallel

This updates our thread extension and tox command for docs builds to use
the available number of cores to multithread the docs build. This can
speed things up significantly.

Depends-on: https://review.opendev.org/741026

Change-Id: I1ba656390094b4e1c6d3fb7bb3028eadb11c4d08
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This commit is contained in:
Sean McGinnis 2020-07-14 13:36:31 -05:00
parent cdfee5608b
commit e68d33ef68
No known key found for this signature in database
GPG Key ID: CE7EE4BFAF8D70C8
4 changed files with 10 additions and 2 deletions

View File

@ -22,4 +22,8 @@ def setup(app):
print('** Generating driver list...')
rv = utils.execute(sys.executable, './tools/generate_driver_list.py', ['docs'])
print(rv[0])
return {
'parallel_read_safe': True,
'parallel_write_safe': True,
}

View File

@ -142,3 +142,7 @@ class ConfigTableDirective(rst.Directive):
def setup(app):
app.add_directive('config-table', ConfigTableDirective)
return {
'parallel_read_safe': True,
'parallel_write_safe': True,
}

View File

@ -6,4 +6,4 @@ reno>=3.1.0 # Apache-2.0
sphinx>=2.0.0,!=2.1.0 # BSD
os-api-ref>=1.5.0 # Apache-2.0
sphinxcontrib-apidoc>=0.2.0 # BSD
sphinx-feature-classification>=0.1.0 # Apache 2.0
sphinx-feature-classification>=1.1.0 # Apache 2.0

View File

@ -131,7 +131,7 @@ deps =
commands =
rm -fr doc/source/contributor/api/
rm -fr doc/build/html doc/build/doctrees
sphinx-build -W -b html -d doc/build/doctrees doc/source doc/build/html
sphinx-build -W -j auto -b html -d doc/build/doctrees doc/source doc/build/html
whitelist_externals = rm
[testenv:pdf-docs]