Skip to content

Commit

Permalink
test: enable clang-tidy in GitHub Actions tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vikman90 committed Oct 14, 2024
1 parent 88c6b47 commit 4d5f606
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/actions/compile/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ runs:
if [[ "$RUNNER_OS" == "Windows" ]]; then
cmake ${SRC_FOLDER} -DBUILD_TESTS=1 -G "Visual Studio 17 2022" -A x64
else
cmake ${SRC_FOLDER} -DBUILD_TESTS=1 -G "Unix Makefiles"
cmake ${SRC_FOLDER} -DBUILD_TESTS=1 -DENABLE_CLANG_TIDY=ON -G "Unix Makefiles"
fi
echo "CMake project generated in $(pwd)"
shell: bash
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/compile_and_test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ runs:
if [[ ${{ inputs.test }} == "false" ]]; then
echo "Compiling without tests"
cmake -DSRC_FOLDER=${SRC_FOLDER} -DVERSION="$VERSION" -DREVISION="$REVISION" .. && make -j2
cmake -DSRC_FOLDER=${SRC_FOLDER} -DENABLE_CLANG_TIDY=ON -DVERSION="$VERSION" -DREVISION="$REVISION" .. && make -j2
else
if [[ "${{ inputs.asan }}" != "false" ]]; then
# Compile for ASAN
Expand All @@ -60,7 +60,7 @@ runs:
export COMPILATION_FLAGS="-fprofile-arcs -ftest-coverage -lgcov --coverage"
fi
# Read version and revision file.
cmake -DSRC_FOLDER=${SRC_FOLDER} -DCMAKE_CXX_FLAGS="$COMPILATION_FLAGS" -DUNIT_TEST=ON -DVERSION="$VERSION" -DREVISION="$REVISION" .. && make -j2
cmake -DSRC_FOLDER=${SRC_FOLDER} -DCMAKE_CXX_FLAGS="$COMPILATION_FLAGS" -DUNIT_TEST=ON -DENABLE_CLANG_TIDY=ON -DVERSION="$VERSION" -DREVISION="$REVISION" .. && make -j2
fi
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_and_test_component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
run: |
mkdir src/build
cd src/build
cmake .. -DBUILD_TESTS=ON
cmake .. -DBUILD_TESTS=ON -DENABLE_CLANG_TIDY=ON
make -j $(nproc)
- name: Run the tests
Expand Down

0 comments on commit 4d5f606

Please sign in to comment.