Skip to content

Commit

Permalink
Add Doxygen Github Action to generate docs
Browse files Browse the repository at this point in the history
  • Loading branch information
shamitha-shashidhara committed Nov 13, 2024
1 parent 909e181 commit be3df69
Show file tree
Hide file tree
Showing 6 changed files with 2,783 additions and 11 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/Doc-coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Build Documentation Coverage

on: [push, pull_request]

permissions:
contents: write

jobs:
build-doxygen-docs:
uses: ./.github/workflows/doxygen-build.yml

doxygen-docs:
runs-on: ubuntu-latest
needs: build-doxygen-docs
defaults:
run:
working-directory: ./doc
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Install python dependencies
run: |
python -m pip install --upgrade pip
pip install coverxygen
- name: Restore Doxygen Output Cache
uses: actions/cache@v3
id: doxygen-output-cache
with:
path: |
doxygenOut/html
doxygenOut/xml
key: ${{ github.ref }}-doxygen-output

- name: Run coverxygen
run: python3 -m coverxygen --format summary --xml-dir doxygenOut/xml/ --src-dir .. --output doc-coverage.info

- name: Print doc coverage
run: cat doc-coverage.info
9 changes: 3 additions & 6 deletions .github/workflows/doc-publish.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
name: Publish Documentation

on:
push:
branches:
- main
on: [push, pull_request]

permissions:
contents: write

jobs:
build-docs:
uses: ./.github/workflows/doc-build.yml

publish-docs:
runs-on: ubuntu-latest
needs: build-docs
Expand All @@ -29,4 +25,5 @@ jobs:
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs
force_orphan: true
destination_dir: docs/sphinx
keep_files: true
44 changes: 44 additions & 0 deletions .github/workflows/doxygen-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Build and Deploy Doxygen Documentation

on: [workflow_call, pull_request]

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
defaults:
run:
working-directory: ./doc
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install Doxygen
run: |
sudo apt-get install -y doxygen
which doxygen
- name: Run doxygen
run: doxygen Doxyfile

- name: Cache Doxygen Output
uses: actions/cache@v3
id: cache-doxygen
with:
path: doxygenOut/xml
key: ${{ github.ref }}-doxygen-output

- name: Print Doxygen Warning Log
run: cat DoxygenWarningLog.txt

- name: Zip doxygen documentation
run: |
mv doxygenOut/html doxygen_docs
zip -r doxygen_docs.zip doxygen_docs
- name: Upload doxygen_docs
uses: actions/upload-artifact@v4
with:
name: doxygen_docs
path: ./doc/doxygen_docs.zip
Loading

0 comments on commit be3df69

Please sign in to comment.