Browse Source

Marginally speed up CI doc builds by using multiple jobs

pull/8347/head
Rapptz 3 years ago
parent
commit
3aa3c36c4f
  1. 2
      .github/workflows/build.yml
  2. 3
      docs/extensions/attributetable.py
  3. 1
      docs/extensions/builder.py
  4. 2
      docs/extensions/details.py
  5. 1
      docs/extensions/exception_hierarchy.py
  6. 1
      docs/extensions/nitpick_file_ignorer.py

2
.github/workflows/build.yml

@ -48,7 +48,7 @@ jobs:
shell: bash
run: |
cd docs
sphinx-build -b html -D language=${DOCS_LANGUAGE} -a -n -T -W --keep-going . _build/html
sphinx-build -b html -D language=${DOCS_LANGUAGE} -j auto -a -n -T -W --keep-going . _build/html
env:
DOCS_LANGUAGE: ${{ matrix.language }}

3
docs/extensions/attributetable.py

@ -276,7 +276,7 @@ def class_results_to_node(key: str, elements: Sequence[TableElement]) -> attribu
return attributetablecolumn('', title, ul)
def setup(app: Sphinx) -> None:
def setup(app: Sphinx):
app.add_directive('attributetable', PyAttributeTable)
app.add_node(attributetable, html=(visit_attributetable_node, depart_attributetable_node))
app.add_node(attributetablecolumn, html=(visit_attributetablecolumn_node, depart_attributetablecolumn_node))
@ -285,3 +285,4 @@ def setup(app: Sphinx) -> None:
app.add_node(attributetable_item, html=(visit_attributetable_item_node, depart_attributetable_item_node))
app.add_node(attributetableplaceholder)
app.connect('doctree-resolved', process_attributetable)
return {'parallel_read_safe': True}

1
docs/extensions/builder.py

@ -130,3 +130,4 @@ def add_builders(app):
def setup(app):
add_builders(app)
app.connect('builder-inited', add_custom_jinja2)
return {'parallel_read_safe': True}

2
docs/extensions/details.py

@ -52,4 +52,4 @@ def setup(app):
app.add_node(details, html=(visit_details_node, depart_details_node))
app.add_node(summary, html=(visit_summary_node, depart_summary_node))
app.add_directive('details', DetailsDirective)
return {'parallel_read_safe': True}

1
docs/extensions/exception_hierarchy.py

@ -25,3 +25,4 @@ class ExceptionHierarchyDirective(Directive):
def setup(app):
app.add_node(exception_hierarchy, html=(visit_exception_hierarchy_node, depart_exception_hierarchy_node))
app.add_directive('exception_hierarchy', ExceptionHierarchyDirective)
return {'parallel_read_safe': True}

1
docs/extensions/nitpick_file_ignorer.py

@ -20,3 +20,4 @@ def setup(app: Sphinx):
app.add_config_value('nitpick_ignore_files', [], '')
f = NitpickFileIgnorer(app)
sphinx_logging.getLogger('sphinx.transforms.post_transforms').logger.addFilter(f)
return {'parallel_read_safe': True}

Loading…
Cancel
Save