04ace57589
* 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>
[ROCm/rocprofiler-sdk commit: 73e7f8cfb1]
108 linhas
3.3 KiB
Python
108 linhas
3.3 KiB
Python
# Configuration file for the Sphinx documentation builder.
|
|
#
|
|
# This file only contains a selection of the most common options. For a full
|
|
# list see the documentation:
|
|
# http://www.sphinx-doc.org/en/master/config
|
|
|
|
# -- Path setup --------------------------------------------------------------
|
|
|
|
# If extensions (or modules to document with autodoc) are in another directory,
|
|
# add these directories to sys.path here. If the directory is relative to the
|
|
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
|
|
|
import os
|
|
import sys
|
|
import subprocess as sp
|
|
|
|
# If extensions (or modules to document with autodoc) are in another directory,
|
|
# add these directories to sys.path here. If the directory is relative to the
|
|
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
|
sys.path.insert(0, os.path.abspath(".."))
|
|
|
|
|
|
def install(package):
|
|
sp.call([sys.executable, "-m", "pip", "install", package])
|
|
|
|
|
|
# Check if we're running on Read the Docs' servers
|
|
read_the_docs_build = os.environ.get("READTHEDOCS", None) == "True"
|
|
|
|
_srcdir = os.path.realpath(os.path.join(os.getcwd(), "../.."))
|
|
|
|
|
|
def build_doxyfile():
|
|
sp.run(
|
|
[
|
|
"cmake",
|
|
f"-DSOURCE_DIR={_srcdir}",
|
|
"-DPROJECT_NAME='Rocprofiler SDK'",
|
|
f"-P {_srcdir}/source/docs/generate-doxyfile.cmake",
|
|
]
|
|
)
|
|
|
|
|
|
def configure_version_header():
|
|
sp.run(
|
|
[
|
|
"cmake",
|
|
f"-S {_srcdir}/source/include/rocprofiler-sdk",
|
|
f"-B {_srcdir}/source/include/rocprofiler-sdk",
|
|
]
|
|
)
|
|
|
|
|
|
configure_version_header()
|
|
build_doxyfile()
|
|
|
|
# -- Project information -----------------------------------------------------
|
|
project = "Rocprofiler SDK"
|
|
copyright = "2023-2024, Advanced Micro Devices, Inc."
|
|
author = "Advanced Micro Devices, Inc."
|
|
|
|
project_root = os.path.normpath(os.path.join(os.getcwd(), "..", ".."))
|
|
version = open(os.path.join(project_root, "VERSION")).read().strip()
|
|
# The full version, including alpha/beta/rc tags
|
|
release = version
|
|
|
|
# -- General configuration ---------------------------------------------------
|
|
|
|
# Add any Sphinx extension module names here, as strings. They can be
|
|
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
|
# ones.
|
|
extensions = [
|
|
"rocm_docs",
|
|
"rocm_docs.doxygen",
|
|
]
|
|
|
|
doxygen_root = "."
|
|
doxysphinx_enabled = True
|
|
doxygen_project = {
|
|
"name": "rocprofiler-sdk",
|
|
"path": "_doxygen",
|
|
}
|
|
doxyfile = "rocprofiler-sdk.dox"
|
|
|
|
external_projects_current_project = "rocprofiler-sdk"
|
|
external_projects = []
|
|
|
|
master_doc = "index"
|
|
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "README.md"]
|
|
external_toc_path = "./_toc.yml"
|
|
|
|
# Add any paths that contain templates here, relative to this directory.
|
|
templates_path = ["_templates"]
|
|
suppress_warnings = ["etoc.toctree"]
|
|
|
|
# -- Options for HTML output -------------------------------------------------
|
|
|
|
# The theme to use for HTML and HTML Help pages. See the documentation for
|
|
# a list of builtin themes.
|
|
|
|
html_theme = "rocm_docs_theme"
|
|
html_theme_options = {"flavor": "rocm"}
|
|
|
|
# Add any paths that contain custom static files (such as style sheets) here,
|
|
# relative to this directory. They are copied after the builtin static files,
|
|
# so a file named "default.css" will overwrite the builtin "default.css".
|
|
html_title = f"ROCprofiler-SDK {version} Documentation"
|