mirror of
https://github.com/godotengine/godot-docs.git
synced 2025-12-31 17:49:03 +03:00
Improve CI
Improve CI build times by using a dummy builder for (empty) output, dropping LaTeX, and disabling some Sphinx extensions when building for CI (GDScript lexing, creating a search index, and generating HTML description tags). In my tests, this improves Travis CI build times: from up to 30 minutes down to 2 minutes.
This commit is contained in:
21
.travis.yml
21
.travis.yml
@@ -1,12 +1,12 @@
|
||||
os: linux
|
||||
dist: bionic
|
||||
language: python
|
||||
language: python - "3.8"
|
||||
|
||||
python:
|
||||
- "3.8"
|
||||
|
||||
stages:
|
||||
- build
|
||||
env:
|
||||
global:
|
||||
- SPHINX_NO_GDSCRIPT=1
|
||||
- SPHINX_NO_SEARCH=1
|
||||
- SPHINX_NO_DESCRIPTIONS=1
|
||||
|
||||
matrix:
|
||||
include:
|
||||
@@ -18,16 +18,17 @@ matrix:
|
||||
packages:
|
||||
- dos2unix
|
||||
- recode
|
||||
- texlive-full
|
||||
|
||||
install:
|
||||
- pip install -r requirements.txt
|
||||
- pip install codespell
|
||||
|
||||
script:
|
||||
- bash ./format.sh
|
||||
|
||||
# Check for possible typos
|
||||
- pip install codespell
|
||||
- codespell -I codespell-ignore.txt {about,community,development,getting_started,tutorials}/**/*.rst
|
||||
|
||||
- pip install -r requirements.txt
|
||||
# TODO: Add `-W` to turn warnings into errors.
|
||||
# This can only be done once all warnings have been fixed.
|
||||
- sphinx-build --color -b html -d _build/doctrees . _build/html
|
||||
- sphinx-build --color -b dummy -d _build/doctrees . _build/html
|
||||
|
||||
6
Makefile
6
Makefile
@@ -52,6 +52,7 @@ help:
|
||||
@echo " linkcheck to check all external links for integrity"
|
||||
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
|
||||
@echo " coverage to run coverage check of the documentation (if enabled)"
|
||||
@echo " dummy to run only the parse steps without generating output"
|
||||
|
||||
clean:
|
||||
rm -rf $(BUILDDIR)/*
|
||||
@@ -195,3 +196,8 @@ pseudoxml:
|
||||
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
|
||||
@echo
|
||||
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
|
||||
|
||||
dummy:
|
||||
$(SPHINXBUILD) -b dummy $(ALLSPHINXOPTS) $(BUILDDIR)/html
|
||||
@echo
|
||||
@echo "Build finished. No output."
|
||||
|
||||
17
conf.py
17
conf.py
@@ -13,13 +13,24 @@ needs_sphinx = "1.3"
|
||||
# Sphinx extension module names and templates location
|
||||
sys.path.append(os.path.abspath("_extensions"))
|
||||
extensions = [
|
||||
"gdscript",
|
||||
"godot_descriptions",
|
||||
"sphinx_search.extension",
|
||||
"sphinx_tabs.tabs",
|
||||
"sphinx.ext.imgmath",
|
||||
]
|
||||
|
||||
# Warning when the Sphinx Tabs extension is used with unknown
|
||||
# builders (like the dummy builder) - as it doesn't cause errors,
|
||||
# we can ignore this so we still can treat other warnings as errors.
|
||||
sphinx_tabs_nowarn = True
|
||||
|
||||
if not os.getenv("SPHINX_NO_GDSCRIPT"):
|
||||
extensions.append("gdscript")
|
||||
|
||||
if not os.getenv("SPHINX_NO_SEARCH"):
|
||||
extensions.append("sphinx_search.extension")
|
||||
|
||||
if not os.getenv("SPHINX_NO_DESCRIPTIONS"):
|
||||
extensions.append("godot_descriptions")
|
||||
|
||||
templates_path = ["_templates"]
|
||||
|
||||
# You can specify multiple suffix as a list of string: ['.rst', '.md']
|
||||
|
||||
Reference in New Issue
Block a user