Skip to content

Commit a3dd31f

Browse files
ci(profiling): add a clang-tidy check
1 parent c6edb37 commit a3dd31f

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

.gitlab/native.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,17 @@ include:
2121
echo -e "\e[0Ksection_start:`date +%s`:cargo_test[collapsed=true]\r\e[0Kcargo test"
2222
cargo test --no-fail-fast --locked
2323
echo -e "\e[0Ksection_end:`date +%s`:cargo_test\r\e[0K"
24+
25+
"clang-tidy profiling":
26+
stage: tests
27+
image: registry.ddbuild.io/images/mirror/ubuntu:25.04
28+
tags: ["arch:amd64"]
29+
timeout: 20m
30+
needs: []
31+
before_script:
32+
- apt-get update && apt-get install -y clang clang-tidy cmake
33+
script:
34+
- |
35+
echo -e "\e[0Ksection_start:`date +%s`:clang_tidy_build[collapsed=true]\r\e[0Kclang-tidy on profiling C++ code"
36+
ddtrace/internal/datadog/profiling/build_standalone.sh --clangtidy Debug all
37+
echo -e "\e[0Ksection_end:`date +%s`:clang_tidy_build\r\e[0K"

ddtrace/internal/datadog/profiling/stack/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ set_target_properties(
3939
include(FetchContent)
4040
include(AnalysisFunc)
4141
include(FindCppcheck)
42+
include(FindClangtidy)
4243

4344
find_package(Python3 COMPONENTS Interpreter Development)
4445

@@ -71,6 +72,9 @@ add_cppcheck_target(
7172
SRC
7273
${CMAKE_CURRENT_SOURCE_DIR}/src)
7374

75+
# Static analysis
76+
add_clangtidy_target(${EXTENSION_NAME})
77+
7478
# Never build with native unwinding, since this is not currently used
7579
target_compile_definitions(${EXTENSION_NAME} PRIVATE UNWIND_NATIVE_DISABLE)
7680

0 commit comments

Comments
 (0)