diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index d9b84c2ab..b59359b4a 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -11,8 +11,26 @@ permissions: pages: write jobs: + build-doxygen-xml: + runs-on: ubuntu-24.04 + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Install Doxygen + run: | + sudo apt-get update + sudo apt-get install --no-install-recommends -y doxygen + - name: Run Doxygen + run: doxygen Doxyfile + - name: Upload Doxygen documentation + uses: actions/upload-artifact@v4 + with: + name: doxygen-documentation-xml + path: xml build-sphinx: runs-on: ubuntu-24.04 + needs: + - build-doxygen-xml steps: - name: Checkout repository uses: actions/checkout@v4 @@ -20,9 +38,18 @@ jobs: uses: actions/setup-python@v5 with: python-version: '3.13' + - name: Install Doxygen + run: | + sudo apt-get update + sudo apt-get install --no-install-recommends -y doxygen - name: Install dependencies run: | python3 -m pip install -r docs/requirements.txt + - name: Download artifact + uses: actions/download-artifact@v4 + with: + name: doxygen-documentation-xml + path: xml - name: Configure project run: > cmake -S . -B build -D USE_DOCS=ON diff --git a/.gitignore b/.gitignore index d8b266179..b779f5650 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /build* +/xml out mpich cmake-build-* diff --git a/Doxyfile b/Doxyfile new file mode 100644 index 000000000..f34d72ede --- /dev/null +++ b/Doxyfile @@ -0,0 +1,17 @@ +# Project identity +PROJECT_NAME = "Parallel Programming Course" +PROJECT_BRIEF = "Parallel Programming Course" + +# Input +INPUT = modules/core/task/include \ + modules/core/task/src \ + modules/core/util/include \ + modules/core/util/src +FILE_PATTERNS = *.h *.c *.hpp *.cpp +RECURSIVE = YES + +# Build +GENERATE_HTML = NO +GENERATE_LATEX = NO +GENERATE_XML = YES +XML_OUTPUT = xml diff --git a/docs/conf.py b/docs/conf.py index aefad80c1..35cdc158b 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -6,6 +6,8 @@ # -- Project information ----------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information +import os + project = 'Parallel Programming Course' copyright = '2025, Learning Process' author = 'Learning Process' @@ -13,7 +15,14 @@ # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration -extensions = [] +extensions = [ + 'breathe', +] + +breathe_projects = { + "ParallelProgrammingCourse": os.path.join(os.path.dirname(__file__), "..", "xml"), +} +breathe_default_project = "ParallelProgrammingCourse" templates_path = ['_templates'] exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] diff --git a/docs/index.rst b/docs/index.rst index 2d4e0d90c..0ecaad6aa 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -12,6 +12,7 @@ Below is the table of contents for the Parallel Programming Course documentation user_guide/environment user_guide/submit_work user_guide/ci + user_guide/api .. toctree:: :maxdepth: 2 diff --git a/docs/requirements.txt b/docs/requirements.txt index 7634b35ce..1159d5e53 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,3 +1,4 @@ Sphinx==8.1.3 sphinx-rtd-theme==3.0.2 sphinx-intl==2.3.1 +breathe==4.36.0 diff --git a/docs/user_guide/api.rst b/docs/user_guide/api.rst new file mode 100644 index 000000000..6d83a131e --- /dev/null +++ b/docs/user_guide/api.rst @@ -0,0 +1,8 @@ +API Reference +============= + +.. toctree:: + :maxdepth: 1 + +.. doxygenindex:: + :project: ParallelProgrammingCourse