diff --git a/.travis.yml b/.travis.yml index 6d2f840c2..71d330100 100644 --- a/.travis.yml +++ b/.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 diff --git a/Makefile b/Makefile index 2315518cb..dabd23408 100644 --- a/Makefile +++ b/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." diff --git a/conf.py b/conf.py index 24def6f1c..aeed7e61d 100644 --- a/conf.py +++ b/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']