Skip to content

Commit

Permalink
Add documentation check with doxygen
Browse files Browse the repository at this point in the history
Signed-off-by: Louise Poubel <[email protected]>
  • Loading branch information
chapulina committed Aug 19, 2021
1 parent 50bcdef commit 17db640
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
uses: ignition-tooling/ubuntu-ci-action@master
with:
codecov-enabled: true
doxygen-enabled: true
cmake-args: '-DBUILD_TESTING=1'
```

Expand Down Expand Up @@ -107,3 +108,8 @@ build folder before exiting the script.
The `cmake-args` can be used to pass additional CMake arguments to the build.
If building with codecov is enabled, it is not possible to override the build type,
which will always be `CMAKE_BUILD_TYPE=coverage`.

### Doxygen

Doxygen checks can be enabled with `doxygen-enabled: true`. This will make CI
fail if there is code not documented properly.
5 changes: 5 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ inputs:
description: '(Deprecated) Bash script to be run after make test inside the build folder'
required: false
default: ''
doxygen-enabled:
description: 'Run doxygen documentation checks.'
required: false
default: ''
runs:
using: 'docker'
image: 'Dockerfile'
Expand All @@ -51,3 +55,4 @@ runs:
- ${{ inputs.codecov-token-private-repos }}
- ${{ inputs.codecov-token }}
- ${{ inputs.cmake-args }}
- ${{ inputs.doxygen-enabled }}
9 changes: 9 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ CODECOV_ENABLED=$2
CODECOV_TOKEN_PRIVATE_REPOS=$3
DEPRECATED_CODECOV_TOKEN=$4
CMAKE_ARGS=$5
DOXYGEN_ENABLED=$2

# keep the previous behaviour of running codecov if old token is set
[ -n "${DEPRECATED_CODECOV_TOKEN}" ] && CODECOV_ENABLED=1
Expand All @@ -23,6 +24,7 @@ apt -y install \
cmake \
cppcheck \
curl \
doxygen \
g++-8 \
git \
gnupg \
Expand Down Expand Up @@ -137,6 +139,13 @@ else
fi
echo ::endgroup::

if [ -n "$DOXYGEN_ENABLED" ] && ${DOXYGEN_ENABLED} ; then
echo ::group::Documentation check
make doc 2>&1
bash <(curl -s https://raw.githubusercontent.com/ignitionrobotics/ign-cmake/ign-cmake2/tools/doc_check.sh)
echo ::endgroup::
fi

if [ -f "$SCRIPT_BETWEEN_CMAKE_MAKE" ] || [ -f "$SCRIPT_BETWEEN_CMAKE_MAKE_VERSIONED" ] ; then
echo ::group::Script between cmake and make
if [ -f "$SCRIPT_BETWEEN_CMAKE_MAKE" ] ; then
Expand Down

0 comments on commit 17db640

Please sign in to comment.