@@ -66,24 +66,28 @@ jobs:
6666
6767 - name : Configure CMake (Windows)
6868 if : runner.os == 'Windows'
69+ # CMAKE_EXPORT_COMPILE_COMMANDS for clang-tidy
6970 run : >
7071 cmake -B ${{ steps.strings.outputs.build-output-dir }}
7172 -DCOMMON_LIBRARY_TYPE=STATIC
7273 -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
7374 -DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
7475 -DTBTPARSER_BUILD_TESTS=ON
76+ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
7577 -S ${{ steps.strings.outputs.workspace-dir }}
7678
7779 - name : Configure CMake (non-Windows)
7880 if : runner.os != 'Windows'
7981 # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
82+ # CMAKE_EXPORT_COMPILE_COMMANDS for clang-tidy
8083 run : >
8184 cmake -B ${{ steps.strings.outputs.build-output-dir }}
8285 -DCOMMON_LIBRARY_TYPE=STATIC
8386 -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
8487 -DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
8588 -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
8689 -DTBTPARSER_BUILD_TESTS=ON
90+ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
8791 -S ${{ steps.strings.outputs.workspace-dir }}
8892
8993 - name : Build (Windows)
@@ -107,6 +111,12 @@ jobs:
107111 working-directory : ${{ steps.strings.outputs.build-output-dir }}
108112 run : ctest --verbose --extra-verbose --output-on-failure
109113
114+ # run-clang-tidy not available on macOS or Windows ?
115+ - name : Clang Tidy
116+ if : runner.os == 'Linux' && matrix.c_compiler == 'clang'
117+ working-directory : ${{ steps.strings.outputs.build-output-dir }}
118+ run : run-clang-tidy -p .
119+
110120 - name : Upload tbt-converter-exe (Windows Release)
111121 if : runner.os == 'Windows' && matrix.build_type == 'Release'
112122 uses : actions/upload-artifact@v4
0 commit comments