Skip to content

Commit 67526fa

Browse files
committed
add Doxygen
1 parent 729c826 commit 67526fa

File tree

10 files changed

+2733
-8
lines changed

10 files changed

+2733
-8
lines changed

.github/workflows/docs.yml

Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
name: Documentation
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
paths:
7+
- 'include/**'
8+
- 'examples/**'
9+
- 'docs/**'
10+
- 'Doxyfile'
11+
- 'tools/scripts/build_docs.sh'
12+
pull_request:
13+
branches: [ main ]
14+
paths:
15+
- 'include/**'
16+
- 'examples/**'
17+
- 'docs/**'
18+
- 'Doxyfile'
19+
- 'tools/scripts/build_docs.sh'
20+
21+
jobs:
22+
build-docs:
23+
runs-on: ubuntu-latest
24+
25+
steps:
26+
- name: Checkout code
27+
uses: actions/checkout@v4
28+
29+
- name: Setup Python
30+
uses: actions/setup-python@v4
31+
with:
32+
python-version: '3.11'
33+
34+
- name: Install system dependencies
35+
run: |
36+
sudo apt-get update
37+
sudo apt-get install -y doxygen graphviz plantuml
38+
39+
- name: Install Python dependencies
40+
run: |
41+
python -m pip install --upgrade pip
42+
pip install sphinx sphinx-rtd-theme breathe exhale
43+
44+
- name: Make build script executable
45+
run: chmod +x tools/scripts/build_docs.sh
46+
47+
- name: Generate documentation
48+
run: |
49+
./tools/scripts/build_docs.sh all
50+
51+
- name: Upload Doxygen artifacts
52+
uses: actions/upload-artifact@v3
53+
with:
54+
name: doxygen-docs
55+
path: docs/generated/html/
56+
57+
- name: Upload Sphinx artifacts
58+
uses: actions/upload-artifact@v3
59+
with:
60+
name: sphinx-docs
61+
path: docs/sphinx/_build/html/
62+
63+
- name: Upload API docs artifacts
64+
uses: actions/upload-artifact@v3
65+
with:
66+
name: api-docs
67+
path: docs/api/
68+
69+
deploy-docs:
70+
needs: build-docs
71+
runs-on: ubuntu-latest
72+
if: github.ref == 'refs/heads/main'
73+
74+
steps:
75+
- name: Checkout code
76+
uses: actions/checkout@v4
77+
78+
- name: Download Doxygen artifacts
79+
uses: actions/download-artifact@v3
80+
with:
81+
name: doxygen-docs
82+
path: docs/generated/html/
83+
84+
- name: Download Sphinx artifacts
85+
uses: actions/download-artifact@v3
86+
with:
87+
name: sphinx-docs
88+
path: docs/sphinx/_build/html/
89+
90+
- name: Download API docs artifacts
91+
uses: actions/download-artifact@v3
92+
with:
93+
name: api-docs
94+
path: docs/api/
95+
96+
- name: Deploy to GitHub Pages
97+
uses: peaceiris/actions-gh-pages@v3
98+
with:
99+
github_token: ${{ secrets.GITHUB_TOKEN }}
100+
publish_dir: ./docs/generated/html
101+
destination_dir: ./doxygen
102+
103+
- name: Deploy Sphinx to GitHub Pages
104+
uses: peaceiris/actions-gh-pages@v3
105+
with:
106+
github_token: ${{ secrets.GITHUB_TOKEN }}
107+
publish_dir: ./docs/sphinx/_build/html
108+
destination_dir: ./sphinx
109+
110+
docs-check:
111+
runs-on: ubuntu-latest
112+
113+
steps:
114+
- name: Checkout code
115+
uses: actions/checkout@v4
116+
117+
- name: Setup Python
118+
uses: actions/setup-python@v4
119+
with:
120+
python-version: '3.11'
121+
122+
- name: Install dependencies
123+
run: |
124+
sudo apt-get update
125+
sudo apt-get install -y doxygen graphviz plantuml
126+
pip install sphinx sphinx-rtd-theme breathe exhale
127+
128+
- name: Check documentation syntax
129+
run: |
130+
chmod +x tools/scripts/build_docs.sh
131+
./tools/scripts/build_docs.sh doxygen
132+
# Check for warnings and errors in Doxygen output
133+
if grep -i "warning\|error" doxygen.log; then
134+
echo "Documentation warnings or errors found"
135+
exit 1
136+
fi
137+
138+
- name: Validate documentation structure
139+
run: |
140+
# Check if required documentation files exist
141+
test -f docs/index.md || exit 1
142+
test -f docs/api/README.md || exit 1
143+
test -f docs/examples/README.md || exit 1
144+
test -f docs/performance/README.md || exit 1
145+
echo "Documentation structure validation passed"

0 commit comments

Comments
 (0)