[SCons] Fix Sphinx docs build in parallel

The Sphinx build requires both the Cython module to have been built and
the doxygen run to have finished. When running the build in parallel
with scons build -j#, there was the possibility that Sphinx could run
before all its dependencies were built. This change adds dependencies
for the Sphinx builder on Doxygen and the Cython module, resolving the
problem.
This commit is contained in:
Bryan W. Weber
2021-02-12 16:57:15 -05:00
committed by Ray Speth
parent a35344d74f
commit daa36668e7
2 changed files with 4 additions and 1 deletions
+1 -1
View File
@@ -141,7 +141,7 @@ jobs:
python3 -m pip install ruamel.yaml scons numpy cython sphinx\<4.0 \
sphinxcontrib-katex sphinxcontrib-matlabdomain sphinxcontrib-doxylink
- name: Build Cantera with documentation
run: python3 `which scons` build doxygen_docs=y sphinx_docs=y
run: python3 `which scons` build -j2 doxygen_docs=y sphinx_docs=y
# The known_hosts key is generated with `ssh-keygen -F cantera.org` from a
# machine that has previously logged in to cantera.org and trusts
# that it logged in to the right machine
+3
View File
@@ -112,6 +112,7 @@ if localenv['sphinx_docs']:
'sphinx/conf.py',
'${sphinx_cmd} -b html -d ${SPHINXBUILD}/doctrees ${SPHINXSRC} ${SPHINXBUILD}/html'))
env.Alias('sphinx', sphinxdocs)
env.Depends(sphinxdocs, env['python_module'])
# Create a list of MATLAB classes to document. This uses the NamedTuple
# structure defined at the top of the file. The @Data and @Utilities
@@ -206,5 +207,7 @@ if localenv['sphinx_docs']:
localenv.Depends(sphinxdocs, c)
localenv.AlwaysBuild(sphinxdocs)
if localenv['doxygen_docs']:
localenv.Depends(sphinxdocs, docs)
install(localenv.RecursiveInstall, '$inst_docdir/sphinx/html',
'#/build/docs/sphinx/html')