Skip to content

Commit e65402f

Browse files
authored
Automate doxygen builds (#521)
- updated the doxyfile using doxygen -u - include hidtest/test.c as a doc'd example - use a brief doxygen/main_page.md file as the generated site's main page - strip absolute paths from doxygen output (which now displays as relative paths to repo root) - add CI to build the docs and save as a CI artifact and rewrite the contents of the gh-pages branch for deployment (for master builds) - add some missing docstrings and excluded undocumented "helper macros" to satisfy warnings output in doxygen's build log
1 parent f81d485 commit e65402f

File tree

5 files changed

+562
-259
lines changed

5 files changed

+562
-259
lines changed

Diff for: .github/workflows/docs.yaml

+43
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,46 @@ jobs:
1313

1414
- name: Install Doxygen static libclang deps
1515
run: sudo apt-get install libclang1-12 libclang-cpp12
16+
17+
- name: Install Doxygen from SF binary archives
18+
env:
19+
DOXYGEN_VERSION: '1.9.6'
20+
run: |
21+
mkdir .doxygen && cd .doxygen
22+
curl -L https://sourceforge.net/projects/doxygen/files/rel-$DOXYGEN_VERSION/doxygen-$DOXYGEN_VERSION.linux.bin.tar.gz > doxygen.tar.gz
23+
gunzip doxygen.tar.gz
24+
tar xf doxygen.tar
25+
cd doxygen-$DOXYGEN_VERSION
26+
sudo make install
27+
28+
- uses: actions/checkout@v3
29+
30+
- run: doxygen
31+
working-directory: doxygen
32+
33+
- name: Save doxygen docs as artifact
34+
uses: actions/upload-artifact@v3
35+
with:
36+
name: HIDAPI_doxygen_docs
37+
path: ${{ github.workspace }}/doxygen/html
38+
39+
deploy-docs:
40+
runs-on: ubuntu-latest
41+
needs: [build]
42+
if: github.ref_type == 'branch' && github.ref_name == 'master'
43+
concurrency:
44+
group: "github-pages-deploy"
45+
cancel-in-progress: true
46+
steps:
47+
- name: downlod artifact
48+
uses: actions/download-artifact@v3
49+
with:
50+
name: HIDAPI_doxygen_docs
51+
path: docs
52+
53+
- name: upload to github pages
54+
uses: peaceiris/actions-gh-pages@v3
55+
with:
56+
github_token: ${{ secrets.GITHUB_TOKEN }}
57+
publish_dir: ./docs
58+
force_orphan: true

Diff for: .gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,6 @@ libtool
2727

2828
# Qt Creator
2929
CMakeLists.txt.user
30+
31+
# doxgen output
32+
doxygen/html/

0 commit comments

Comments
 (0)