Files
open-amp/.readthedocs.yaml
Bill Mills 00e0d7abf0 docs: update the readthedocs integration for PRs in this repo
Upstream Read The Docs has tightened up the schema checking and this broke
what we were doing for PRs.

A good number of things were tried but the best compromise is to:
* supply a dummy sphinx config file in this repo
* override the default build command to use the openamp-docs dir

Also:
* add more documentation about what is going on
* lock to html only format.  PRs only do html anyway but make sure

Signed-off-by: Bill Mills <bill.mills@linaro.org>
2025-02-17 09:16:47 +01:00

52 lines
2.3 KiB
YAML

# The main readthedocs build is in openamp-docs and includes this repo as a
# sub-module.
# This config file supports doc preview for PRs in this repo.
# This allows us to see how a PR in this repo will look in the docs before it
# is promoted to main and before the openamp-docs repo picks up the new version.
version: 2
# only do html, this is the case for PRs anyway but make sure
formats: []
sphinx:
# See comments in the file for why this is required
configuration: doc/readthedocs-conf.py
build:
os: "ubuntu-22.04"
tools:
python: "3.10"
apt_packages:
- cmake
- libhugetlbfs-dev
- libsysfs-dev
jobs:
post_checkout:
- echo "post_checkout"; pwd; echo $PATH; env; ls -la .
# we ignore the checkout they did and make a new one of the whole openamp-docs project
- git log -n 1 --oneline
- git rev-parse HEAD
- git clone --recurse-submodules https://github.com/OpenAMP/openamp-docs.git
# now adjust the focused submodule to the PR in progress
- echo "URL=${READTHEDOCS_GIT_CLONE_URL} COMMIT=${READTHEDOCS_GIT_COMMIT_HASH}"
- (cd openamp-docs/open-amp; git remote add this_pr ../../.git )
- (cd openamp-docs/open-amp; git fetch this_pr $(cd ../..; git rev-parse HEAD) )
- (cd openamp-docs/open-amp; git checkout $(cd ../..; git rev-parse HEAD) )
- (cd openamp-docs/open-amp; git log -n 1 --oneline)
- (cd openamp-docs; git submodule status)
post_install:
- echo "post_install"; pwd; echo $PATH; env; ls -la . openamp-docs
- python -m pip install --exists-action=w --no-cache-dir -r openamp-docs/requirements.txt
pre_build:
- echo "pre_build"; pwd; echo $PATH; env; ls -la . openamp-docs
- echo "READTHEDOCS_OUTPUT=$READTHEDOCS_OUTPUT"
- make -C openamp-docs BUILDDIR=$READTHEDOCS_OUTPUT doxygen
build:
html:
- echo "build"; pwd; echo $PATH; env; ls -la . openamp-docs
# This is the default build command as of 2025/01/12 but with
# "." changed to "openamp-docs"
- python -m sphinx -T -b html -d _build/doctrees -D language=en openamp-docs $READTHEDOCS_OUTPUT/html
post_build:
- echo "post_build"; pwd; echo $PATH; ls -la . openamp-docs
- make -C openamp-docs BUILDDIR=$READTHEDOCS_OUTPUT doxygen_copy