File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change 46
46
CC : clang
47
47
CXX : clang++
48
48
run : |
49
- mkdir -p build && cd build
50
49
echo "Running cmake..."
51
- cmake .. \
50
+ cmake -B build \
52
51
-DCMAKE_CXX_STANDARD=14 \
53
52
-DWITH_STL=CXX14 \
54
53
-DWITH_OTLP_HTTP=ON \
@@ -62,23 +61,21 @@ jobs:
62
61
-DBUILD_W3CTRACECONTEXT_TEST=ON \
63
62
-DWITH_METRICS_EXEMPLAR_PREVIEW=ON \
64
63
-DWITH_ASYNC_EXPORT_PREVIEW=ON \
65
- -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
66
- -DCMAKE_CXX_CLANG_TIDY="clang-tidy"
64
+ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
67
65
68
66
- name : Run clang-tidy
69
67
run : |
70
- cd build
71
- make 2>&1 | tee -a clang-tidy.log || exit 1
68
+ cmake -- build build --target opentelemetry_proto
69
+ jq -r .[].file build/compile_commands.json | grep -vE '/(generated|third_party)/' | xargs -P $(nproc) -n 1 clang-tidy --quiet -p build 2>&1 | tee -a clang-tidy.log
72
70
73
71
- uses : actions/upload-artifact@v4
74
72
with :
75
73
name : Logs (clang-tidy)
76
- path : ./build/ clang-tidy.log
74
+ path : ./clang-tidy.log
77
75
78
76
- name : Count warnings
79
77
run : |
80
- cd build
81
78
COUNT=$(grep -c "warning:" clang-tidy.log)
82
79
echo "clang-tidy reported ${COUNT} warning(s)"
83
80
84
- # TODO: include WITH_OTLP_GRPC and WITH_ABSEIL flags.
81
+ # TODO: include WITH_OTLP_GRPC and WITH_ABSEIL flags.
You can’t perform that action at this time.
0 commit comments