Skip to content

Commit d15bcde

Browse files
committed
ReadTheDocs CI builds updates
Since RTD doesn't run autogen, configure, or make, we now have to manually copy a few RST files from the embedded PRRTE to the docs/ tree before RTD invokes Sphinx. Signed-off-by: Jeff Squyres <[email protected]>
1 parent a299bfe commit d15bcde

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/bash
2+
3+
set -euxo pipefail
4+
5+
env | sort
6+
7+
# The ReadTheDocs build process does not run autogen/configure/make.
8+
# Hence, we have to copy the PRRTE RST files (from the 3rd-party/prrte
9+
# tree) to our docs/ tree manually.
10+
11+
SCHIZO_SRC_DIR=3rd-party/prrte/src/mca/schizo/ompi
12+
SCHIZO_TARGET_DIR=docs/schizo-ompi-rst-content
13+
14+
PRRTE_RST_SRC_DIR=3rd-party/prrte/src/docs/prrte-rst-content
15+
PRRTE_RST_TARGET_DIR=docs/prrte-rst-content
16+
17+
# Copy the OMPI schizo file from PRRTE
18+
19+
cp -rp $SCHIZO_SRC_DIR $SCHIZO_TARGET_DIR
20+
21+
# Only copy the PRRTE RST source files in prrte-rst-content that are
22+
# referenced by ".. include::" in the schizo-ompi-cli.rst file. We do
23+
# this because Sphinx complains if there are .rst files that are not
24+
# referenced. :-(
25+
26+
mkdir -p $PRRTE_RST_TARGET_DIR
27+
files=`fgrep '.. include::' $SCHIZO_TARGET_DIR/schizo-ompi-cli.rst | awk '{ print $3 }'`
28+
for file in $files; do
29+
filename=`basename $file`
30+
cp -pf $PRRTE_RST_SRC_DIR/$filename $PRRTE_RST_TARGET_DIR
31+
done

.readthedocs.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ build:
1212
os: ubuntu-22.04
1313
tools:
1414
python: "3.10"
15+
jobs:
16+
# RTD doesn't run configure or make. So we have to manually copy
17+
# in the PRRTE RST files to docs/.
18+
pre_create_environment:
19+
- echo This is pre_create_environment
20+
- ./.readthedocs-pre-create-environment.sh
1521

1622
python:
1723
install:
@@ -21,3 +27,6 @@ python:
2127
sphinx:
2228
configuration: docs/conf.py
2329
fail_on_warning: true
30+
31+
submodules:
32+
include: all

0 commit comments

Comments
 (0)