зеркало из https://github.com/mozilla/DeepSpeech.git
Make TaskCluster build the docs like RTD
This commit is contained in:
Родитель
88584941bc
Коммит
23139b2430
21
doc/Makefile
21
doc/Makefile
|
@ -14,34 +14,23 @@ PIP_INSTALL ?= pip3 install --user
|
|||
help:
|
||||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||
|
||||
.PHONY: help pip3 npm Makefile doxygen-c doxygen-java
|
||||
|
||||
doxygen-c:
|
||||
cd ../ && doxygen doc/doxygen-c.conf
|
||||
|
||||
doxygen-java:
|
||||
cd ../ && doxygen doc/doxygen-java.conf
|
||||
|
||||
doxygen-dotnet:
|
||||
cd ../ && doxygen doc/doxygen-dotnet.conf
|
||||
.PHONY: help pip3 Makefile
|
||||
|
||||
pip3:
|
||||
$(PIP_INSTALL) -r ../taskcluster/docs-requirements.txt
|
||||
|
||||
npm:
|
||||
npm install typedoc@0.17.4 typescript@3.8.3 @types/node@13.9.x
|
||||
|
||||
submodule:
|
||||
git submodule update --init --remote
|
||||
|
||||
# Add submodule update dependency to Sphinx's "html" target
|
||||
html: Makefile submodule pip3 npm doxygen-c doxygen-java doxygen-dotnet
|
||||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||
html: Makefile submodule pip3
|
||||
@PATH=$$HOME/.local/bin:`pwd`/../node_modules/.bin/:$$PATH \
|
||||
$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||
|
||||
dist: html
|
||||
cd $(BUILDDIR)/html/ && zip -r9 ../../html.zip *
|
||||
|
||||
# Catch-all target: route all unknown targets to Sphinx using the new
|
||||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
||||
%: Makefile pip3 npm doxygen-c doxygen-java doxygen-dotnet
|
||||
%: Makefile pip3
|
||||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||
|
|
15
doc/conf.py
15
doc/conf.py
|
@ -26,13 +26,14 @@ sys.path.insert(0, os.path.abspath('../'))
|
|||
|
||||
autodoc_mock_imports = ['deepspeech']
|
||||
|
||||
read_the_docs_build = os.environ.get('READTHEDOCS', None) == 'True'
|
||||
if read_the_docs_build:
|
||||
import subprocess
|
||||
subprocess.call('cd ../ && npm install typedoc@0.17.4 typescript@3.8.3 @types/node@13.9.x', shell=True)
|
||||
subprocess.call('cd ../ && doxygen doc/doxygen-c.conf', shell=True)
|
||||
subprocess.call('cd ../ && doxygen doc/doxygen-java.conf', shell=True)
|
||||
subprocess.call('cd ../ && doxygen doc/doxygen-dotnet.conf', shell=True)
|
||||
# This is in fact only relevant on ReadTheDocs, but we want to run the same way
|
||||
# on our CI as in RTD to avoid regressions on RTD that we would not catch on
|
||||
# TaskCluster
|
||||
import subprocess
|
||||
subprocess.check_call('cd ../ && npm install typedoc@0.17.4 typescript@3.8.3 @types/node@13.9.x', shell=True)
|
||||
subprocess.check_call('cd ../ && doxygen doc/doxygen-c.conf', shell=True)
|
||||
subprocess.check_call('cd ../ && doxygen doc/doxygen-java.conf', shell=True)
|
||||
subprocess.check_call('cd ../ && doxygen doc/doxygen-dotnet.conf', shell=True)
|
||||
|
||||
# -- General configuration ------------------------------------------------
|
||||
|
||||
|
|
|
@ -5,6 +5,5 @@ set -xe
|
|||
THIS=$(dirname "$0")
|
||||
|
||||
pushd ${THIS}/../
|
||||
export PATH=$HOME/.local/bin:${THIS}/../doc/node_modules/.bin/:$PATH
|
||||
make -C doc/ dist
|
||||
popd
|
||||
|
|
Загрузка…
Ссылка в новой задаче