Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation check with doxygen #30

Merged
merged 3 commits into from
Aug 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }}
11 changes: 10 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh -l
#!/bin/bash -l

set -x
set -e
Expand All @@ -8,6 +8,7 @@ CODECOV_ENABLED=$2
CODECOV_TOKEN_PRIVATE_REPOS=$3
DEPRECATED_CODECOV_TOKEN=$4
CMAKE_ARGS=$5
DOXYGEN_ENABLED=$6

# 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