Skip to content

Commit

Permalink
Add clang-tidy to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhardmgruber committed Nov 12, 2022
1 parent 757b621 commit f367983
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
10 changes: 10 additions & 0 deletions script/install_analysis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ then
travis_retry sudo apt-get -y --quiet --allow-unauthenticated --no-install-recommends install shellcheck
shellcheck --version

#-------------------------------------------------------------------------------
# Install clang-tidy
travis_retry sudo apt-get -y --quiet --allow-unauthenticated --no-install-recommends install clang-tidy
clang-tidy --version

elif [ "$ALPAKA_CI_OS_NAME" = "macOS" ]
then
#-------------------------------------------------------------------------------
Expand All @@ -38,4 +43,9 @@ then
brew install shellcheck
shellcheck --version

#-------------------------------------------------------------------------------
# Install clang-tidy
brew install clang-tidy
clang-tidy --version

fi
4 changes: 4 additions & 0 deletions script/run_analysis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,8 @@ then
#-------------------------------------------------------------------------------
# check shell script with shellcheck
find . -type f -name "*.sh" -exec shellcheck {} \;

#-------------------------------------------------------------------------------
# clang-tidy
run-clang-tidy -header-filter='(tests|include/alpaka|examples)' '^(?!.*'$PWD').*$'
fi
2 changes: 1 addition & 1 deletion script/run_generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ mkdir -p build/
cd build/

"${ALPAKA_CI_CMAKE_EXECUTABLE}" --log-level=VERBOSE -G "${ALPAKA_CI_CMAKE_GENERATOR}" ${ALPAKA_CI_CMAKE_GENERATOR_PLATFORM}\
-Dalpaka_BUILD_EXAMPLES=ON -DBUILD_TESTING=ON \
-Dalpaka_BUILD_EXAMPLES=ON -DBUILD_TESTING=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
"$(env2cmake BOOST_ROOT)" -DBOOST_LIBRARYDIR="${ALPAKA_CI_BOOST_LIB_DIR}/lib" -DBoost_USE_STATIC_LIBS=ON -DBoost_USE_MULTITHREADED=ON -DBoost_USE_STATIC_RUNTIME=OFF -DBoost_ARCHITECTURE="-x64" \
"$(env2cmake CMAKE_BUILD_TYPE)" "$(env2cmake CMAKE_CXX_FLAGS)" "$(env2cmake CMAKE_C_COMPILER)" "$(env2cmake CMAKE_CXX_COMPILER)" "$(env2cmake CMAKE_EXE_LINKER_FLAGS)" "$(env2cmake CMAKE_CXX_EXTENSIONS)"\
"$(env2cmake alpaka_ACC_CPU_B_SEQ_T_SEQ_ENABLE)" "$(env2cmake alpaka_ACC_CPU_B_SEQ_T_THREADS_ENABLE)" "$(env2cmake alpaka_ACC_CPU_B_SEQ_T_FIBERS_ENABLE)" \
Expand Down

0 comments on commit f367983

Please sign in to comment.