doc: Build doxygen documentation

The Doxygen documentation is generated and uploaded with GitHub actions.

Currently the code is not yet thoroughly documented.
This commit is contained in:
Lukas Woodtli 2023-10-12 10:45:06 +02:00 committed by Lukas Woodtli
parent 1623d69eda
commit cc0b92644d
6 changed files with 2914 additions and 2 deletions

27
.github/workflows/documentation.yaml vendored Normal file
View File

@ -0,0 +1,27 @@
name: Build Documentation
on:
pull_request:
branches: [main]
jobs:
documentation:
runs-on: ubuntu-24.04
steps:
- name: Checkout code including full history and submodules
uses: actions/checkout@v4
- name: Install dependencies from APT repository
run: |
sudo apt-get update
sudo apt-get install doxygen graphviz plantuml
- name: Build Doxygen documentation
run: tools/ci/run_ci.sh --run-doxygen
- name: Upload Doxygen documentation
uses: actions/upload-artifact@v4
with:
name: Doxygen documentation (HTML)
path: build-wakaama/doxygen

View File

@ -34,7 +34,7 @@
* An implementation of the Constrained Application Protocol (draft 12)
* \author
* Matthias Kovatsch <kovatsch@inf.ethz.ch>
* \contributors
* \author
* David Navarro, Intel Corporation - Adapt to usage in liblwm2m
* Tuve Nordius, Husqvarna Group - Please refer to git log
* Lukas Woodtli, Gardena AG - Please refer to git log

View File

@ -34,7 +34,7 @@
* An implementation of the Constrained Application Protocol (draft 12)
* \author
* Matthias Kovatsch <kovatsch@inf.ethz.ch>
* \contributors
* \author
* David Navarro, Intel Corporation - Adapt to usage in liblwm2m
* Tuve Nordius, Husqvarna Group - Please refer to git log
*/

2868
doc/doxygen/Doxyfile Normal file

File diff suppressed because it is too large Load Diff

BIN
doc/doxygen/wakaama.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View File

@ -40,6 +40,7 @@ RUN_CMAKE_FORMAT=0
RUN_GITLINT=0
RUN_GIT_BLAME_IGNORE=0
RUN_TESTS=0
RUN_DOXYGEN=0
HELP_MSG="usage: ${SCRIPT_NAME} <OPTIONS>...
Runs build and test steps in CI.
@ -83,6 +84,7 @@ Available steps (executed by --all):
--run-cmake-format Check CMake files formatting
--run-build Build all targets
--run-tests Execute tests (works only for top level project)
--run-doxygen Build the Doxygen documentation of the code
"
function usage() {
@ -221,6 +223,11 @@ function run_tests() {
find "${REPO_ROOT_DIR}" -name \*.gcov -exec rm {} \;
}
function run_doxygen() {
mkdir -p build-wakaama/doxygen
GIT_REVISION=$(git rev-parse @) WORKING_DIR=$(pwd) DOXYGEN_OUT_DIR=build-wakaama/doxygen \
doxygen doc/doxygen/Doxyfile
}
# Parse Options
if [[ "$OSTYPE" == "darwin"* ]]; then
@ -251,6 +258,7 @@ if ! PARSED_OPTS=$($getopt -o vah \
-l run-gitlint \
-l run-git-blame-ignore \
-l run-tests \
-l run-doxygen \
-l sanitizer: \
-l scan-build: \
-l sonarqube: \
@ -315,6 +323,10 @@ while true; do
RUN_TESTS=1
shift
;;
--run-doxygen)
RUN_DOXYGEN=1
shift
;;
--sanitizer)
OPT_SANITIZER=$2
shift 2
@ -359,6 +371,7 @@ while true; do
RUN_GIT_BLAME_IGNORE=1
RUN_BUILD=1
RUN_TESTS=1
RUN_DOXYGEN=1
shift
;;
-h|--help)
@ -446,3 +459,7 @@ fi
if [ "${RUN_TESTS}" -eq 1 ]; then
run_tests
fi
if [ "${RUN_DOXYGEN}" -eq 1 ]; then
run_doxygen
fi