Skip to content

Commit

Permalink
Add Doxyfile and generate Doxygen docs in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
rollerozxa committed May 27, 2024
1 parent 98c59d3 commit 0a903f1
Show file tree
Hide file tree
Showing 4 changed files with 93 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/doxygen_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: doxygen_deploy

permissions:
contents: read
pages: write
id-token: write

on:
push:
paths:
- '.github/workflows/doxygen_deploy.yml'
- 'doc/'
- 'src/src/'
- 'src/tms/'
branches:
- master

jobs:
build:
if: github.repository == 'Bithack/principia'
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4

- name: Install deps
run: |
sudo apt-get install -y doxygen graphviz wget
- name: Generate Doxygen documentation
run: |
wget https://raw.githubusercontent.com/rollerozxa/doxygen-awesome-css/main/doxygen-awesome.css -O doc/doxygen-awesome.css
doxygen Doxyfile
touch doc/doxy/html/.nojekyll
- name: Setup Pages
uses: actions/configure-pages@v4

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'doc/doxy/html/'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ opengl32.dll
.cache/
compile_commands.json

# Doxygen documentation
doc/doxy/
doc/doxygen-awesome.css

# Model junk files
*.blend1
*.blend2
Expand Down
39 changes: 39 additions & 0 deletions Doxyfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Project properties
PROJECT_NAME = Principia
PROJECT_LOGO = packaging/principia.png

# Parsing
JAVADOC_AUTOBRIEF = YES
EXTRACT_ALL = YES
EXTRACT_PRIVATE = YES
EXTRACT_STATIC = YES
SORT_MEMBERS_CTORS_1ST = YES
WARN_IF_UNDOCUMENTED = NO
BUILTIN_STL_SUPPORT = YES

# Input
RECURSIVE = YES
STRIP_FROM_PATH = src
INPUT = doc/main_page.dox \
src/src/ src/tms/
EXCLUDE = src/src/Box2D/

# Dot graphs
HAVE_DOT = YES
CALL_GRAPH = YES
CALLER_GRAPH = YES
MAX_DOT_GRAPH_DEPTH = 3
DOT_MULTI_TARGETS = YES
DOT_IMAGE_FORMAT = svg

# Output
OUTPUT_DIRECTORY = doc/doxy/ # /tmp/doxy/
GENERATE_LATEX = NO
REFERENCED_BY_RELATION = YES
REFERENCES_RELATION = YES
SEARCHENGINE = YES
DISABLE_INDEX = YES
GENERATE_TREEVIEW = YES
HTML_DYNAMIC_SECTIONS = YES
HTML_TIMESTAMP = YES
HTML_EXTRA_STYLESHEET = doc/doxygen-awesome.css
5 changes: 5 additions & 0 deletions doc/main_page.dox
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/** @mainpage Principia documentation

This site contains automatically generated documentation by Doxygen for Principia and its engine.

*/

0 comments on commit 0a903f1

Please sign in to comment.