Skip to content

Commit 5686ee3

Browse files
authored
Catch Sphinx build errors in CI (#4751)
1 parent 159ed0b commit 5686ee3

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

build_docs.sh

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
set -e # Exit with nonzero exit code if anything fails
33

4-
# Doxygen
4+
# Build Doxygen
55
echo "Build the Doxygen documentation"
66
cd Docs/Doxygen
77
doxygen doxygen.conf &> doxygen.out
@@ -12,26 +12,27 @@ if grep -q "warning:" doxygen.out; then
1212
fi
1313
cd ../..
1414

15-
# sphinx
16-
cd Docs/sphinx_documentation
17-
18-
echo "Build the Sphinx documentation for Amrex."
19-
make PYTHON="python3" latexpdf
20-
mv build/latex/amrex.pdf source/
21-
make PYTHON="python3" html &> make_source_html.out
22-
cd ../../
23-
15+
# copy doxygen to target location
2416
mkdir build
2517
cd build
2618
mkdir docs_html docs_xml
27-
28-
# add doxygen
2919
mkdir -p docs_html/doxygen
3020
cp -rp ../Docs/Doxygen/html/* docs_html/doxygen/
3121
mkdir -p docs_xml/doxygen
3222
cp -rp ../Docs/Doxygen/xml/* docs_xml/doxygen/
3323
# add tagfile to allow other docs to interlink with amrex
3424
cp ../Docs/Doxygen/amrex-doxygen-web.tag.xml docs_xml/doxygen/.
25+
cd ..
3526

36-
# add sphinx
27+
# Build sphinx
28+
cd Docs/sphinx_documentation
29+
echo "Build the Sphinx documentation for Amrex."
30+
make PYTHON="python3" latexpdf
31+
mv build/latex/amrex.pdf source/
32+
make clean
33+
make SPHINXOPTS='-v -W --keep-going' PYTHON="python3" html
34+
cd ../../
35+
36+
# copy sphinx to target location
37+
cd build
3738
cp -rp ../Docs/sphinx_documentation/build/html/* docs_html/

0 commit comments

Comments
 (0)