Skip to content

Commit

Permalink
[CI] speed up clang-tidy workflow (#3148)
Browse files Browse the repository at this point in the history
  • Loading branch information
sjinks authored Nov 15, 2024
1 parent 149d29c commit a388e87
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions .github/workflows/clang-tidy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,8 @@ jobs:
CC: clang
CXX: clang++
run: |
mkdir -p build && cd build
echo "Running cmake..."
cmake .. \
cmake -B build \
-DCMAKE_CXX_STANDARD=14 \
-DWITH_STL=CXX14 \
-DWITH_OTLP_HTTP=ON \
Expand All @@ -62,23 +61,21 @@ jobs:
-DBUILD_W3CTRACECONTEXT_TEST=ON \
-DWITH_METRICS_EXEMPLAR_PREVIEW=ON \
-DWITH_ASYNC_EXPORT_PREVIEW=ON \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DCMAKE_CXX_CLANG_TIDY="clang-tidy"
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
- name: Run clang-tidy
run: |
cd build
make 2>&1 | tee -a clang-tidy.log || exit 1
cmake --build build --target opentelemetry_proto
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
- uses: actions/upload-artifact@v4
with:
name: Logs (clang-tidy)
path: ./build/clang-tidy.log
path: ./clang-tidy.log

- name: Count warnings
run: |
cd build
COUNT=$(grep -c "warning:" clang-tidy.log)
echo "clang-tidy reported ${COUNT} warning(s)"
# TODO: include WITH_OTLP_GRPC and WITH_ABSEIL flags.
# TODO: include WITH_OTLP_GRPC and WITH_ABSEIL flags.

1 comment on commit a388e87

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'OpenTelemetry-cpp api Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: a388e87 Previous: 149d29c Ratio
BM_SpinLockThrashing/1/process_time/real_time 0.308908442015289 ms/iter 0.11891839066906089 ms/iter 2.60
BM_ProcYieldSpinLockThrashing/4/process_time/real_time 3.632499621464656 ms/iter 0.701490686743299 ms/iter 5.18

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.