ci(ClangTidy): Disable unity build for clang-tidy

"Unity builds" build everything into a unique cpp file. That's
problematic for clang-tidy which rely on compile_command.json to
figure out how to build each file. Without these informations, clang-tidy
displayed false errors (missing include file for instance)
This commit is contained in:
Julien Cabieces 2025-02-13 15:17:28 +01:00 committed by Nyall Dawson
parent 06502da4e5
commit 6de7612345

View File

@ -34,6 +34,9 @@ echo "::group::Download clang-tidy-diff"
curl -XGET https://raw.githubusercontent.com/llvm/llvm-project/llvmorg-14.0.6/clang-tools-extra/clang-tidy/tool/clang-tidy-diff.py -o clang-tidy-diff.py
echo "::endgroup::"
echo "${bold}Disable unity build...${endbold}"
cmake . -B build -DENABLE_UNITY_BUILDS=OFF
echo "${bold}Run clang-tidy on modifications...${endbold}"
# We need to add build/src/test dir as extra include directories because when clang-tidy tries to process qgstest.h