Files
rocm-systems/source/scripts/update-docs.sh
T
Bhardwaj, Gopesh 73e7f8cfb1 ROCTx Documentation (#29)
* Add roctx doc

* Add roctx doxyfile input

* Update links and toc

* Build doxysphinx for both doxygen files

* Update scripts

* Generate roctx doxygen files

* Change doxygen path

to allow for 2 doxyfiles

* Make doxygen dir for script

* Call make _doxygen dir with p flag

* Create _doxygen dir in workfllow

* Create doc dirs for doxygen

* Run update docs as sudo

* Fix typo in mkdir command

* Include graphviz for dot

* Install dot for docs CI

* Install dot as sudo due to permission denied

* Install doxygen via sudo

* Install doxysphinx

* Add postcheckout step to RTD to config and gen doxygen docs

* On RTD, update doxygen after creating env

* update docs.yml

* update docs.yml

* fixing build-docs-from-source

* Fixing build docs from source

* update docs.yml

* trying to fix readthedocs

* trying to fix readthedocs

* update docs.yml

* improve mainpage documentation

* update docs

* clang-format fix

---------

Co-authored-by: Sam Wu <22262939+samjwu@users.noreply.github.com>
Co-authored-by: Madsen, Jonathan <Jonathan.Madsen@amd.com>
2025-01-22 11:34:21 -06:00

48 γραμμές
1.4 KiB
Bash
Εκτελέσιμο Αρχείο

#!/bin/bash -e
message()
{
echo -e "\n\n##### ${@}... #####\n"
}
WORK_DIR=$(cd $(dirname ${BASH_SOURCE[0]})/../docs &> /dev/null && pwd)
SOURCE_DIR=$(cd ${WORK_DIR}/../.. &> /dev/null && pwd)
message "Working directory is ${WORK_DIR}"
message "Source directory is ${SOURCE_DIR}"
message "Changing directory to ${SOURCE_DIR}"
cd ${SOURCE_DIR}
message "Configurating cmake..."
cmake -B build-docs ${SOURCE_DIR} -DROCPROFILER_INTERNAL_BUILD_DOCS=ON
message "Changing directory to ${WORK_DIR}"
cd ${WORK_DIR}
message "Generating rocprofiler-sdk.dox"
cmake -DSOURCE_DIR=${SOURCE_DIR} -DPROJECT_NAME="Rocprofiler SDK" -P ${WORK_DIR}/generate-doxyfile.cmake
message "Generating doxygen xml files"
mkdir -p _doxygen
doxygen rocprofiler-sdk.dox
doxygen rocprofiler-sdk-roctx.dox
message "Running doxysphinx"
doxysphinx build ${WORK_DIR} ${WORK_DIR}/_build/html ${WORK_DIR}/_doxygen/rocprofiler-sdk/html
doxysphinx build ${WORK_DIR} ${WORK_DIR}/_build/html ${WORK_DIR}/_doxygen/roctx/html
message "Building html documentation"
make html SPHINXOPTS="--keep-going -n"
if [ -d ${SOURCE_DIR}/docs ]; then
message "Removing stale documentation in ${SOURCE_DIR}/docs/"
rm -rf ${SOURCE_DIR}/docs/*
message "Adding nojekyll to docs/"
cp -r ${WORK_DIR}/.nojekyll ${SOURCE_DIR}/docs/.nojekyll
message "Copying source/docs/_build/html/* to docs/"
cp -r ${WORK_DIR}/_build/html/* ${SOURCE_DIR}/docs/
fi