-
Notifications
You must be signed in to change notification settings - Fork 522
[CI] Add a clang-tidy build #3001
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 21 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
091efdd
Added the CI for clang-tidy in github workflows.
msiddhu aeaa2be
testing
msiddhu 337b105
testing
msiddhu ac8ac31
Added the CI for clang-tidy in github workflows.
msiddhu 883598c
Added the CI for clang-tidy in github workflows.
msiddhu 705af4f
Added the CI for clang-tidy in github workflows.
msiddhu 42a4c7e
Trying to run CI without sh file as .sh file is not present in main.
msiddhu 304c066
Format and remove clang installation as ubuntu24 image has it.
msiddhu 8e8bcbd
Delete install_clang18.sh as clang18 is already included in ubuntu24 …
msiddhu 4546b1d
markdown fix
msiddhu 834f934
markdown fix
msiddhu df852b2
remove dump config.
msiddhu 5db5c69
Resolve some comments by maintainer.
msiddhu e610af4
Resolve some comments by maintainer.
msiddhu e4b0b40
Resolve some comments by maintainer.
msiddhu a89117e
testing
msiddhu 9f00e4c
testing
msiddhu 2a450d3
testing
msiddhu 3042338
testing
msiddhu 154b162
testing
msiddhu 86e166a
Merge branch 'main' into ci_clang_tidy
msiddhu 23c4e37
Change log rewrite
msiddhu 2233338
Removed TOPDIR
msiddhu 516ea26
Added back multithreading make
msiddhu 5c540cf
changes regex to exclude the opentelemetry proto
msiddhu 952d309
Negative regex with third party
msiddhu 0d70409
Merge branch 'main' into ci_clang_tidy
msiddhu f3278f2
Made changes to cmake file to exclude clang-tidy to parse warnings fr…
msiddhu d04b21f
Fixed opentracing=ON flag.
msiddhu 629fbdc
changed some configs
msiddhu d76751f
Added missing comma
msiddhu ba3a6d8
Merge branch 'main' into ci_clang_tidy
marcalff File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| name: clang-tidy | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| pull_request: | ||
| branches: [main] | ||
|
|
||
| jobs: | ||
| clang-tidy: | ||
| runs-on: ubuntu-24.04 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| submodules: recursive | ||
|
|
||
| - name: Setup Environment | ||
| env: | ||
| PROTOBUF_VERSION: '23.3' | ||
| ABSEIL_CPP_VERSION: '20230125.3' | ||
| CXX_STANDARD: '14' | ||
| run: | | ||
| sudo apt update -y | ||
| sudo apt install -y --no-install-recommends --no-install-suggests \ | ||
| build-essential \ | ||
| iwyu \ | ||
| cmake \ | ||
| ninja-build \ | ||
| libssl-dev \ | ||
| libcurl4-openssl-dev \ | ||
| libprotobuf-dev \ | ||
| protobuf-compiler \ | ||
| libgmock-dev \ | ||
| libgtest-dev \ | ||
| libbenchmark-dev | ||
| # sudo -E ./ci/install_abseil.sh | ||
| # sudo -E ./ci/setup_grpc.sh -m -p protobuf -p abseil-cpp | ||
|
|
||
| - name: Prepare CMake | ||
| run: | | ||
| TOPDIR=$(pwd) | ||
| mkdir -p build && cd build | ||
| echo "Running cmake..." | ||
| CC="clang" CXX="clang++" cmake .. \ | ||
| -DCMAKE_CXX_STANDARD=14 \ | ||
| -DWITH_STL=CXX14 \ | ||
| -DWITH_OTLP_HTTP=ON \ | ||
| -DWITH_OTLP_FILE=ON \ | ||
| -DWITH_PROMETHEUS=ON \ | ||
| -DWITH_ZIPKIN=ON \ | ||
| -DWITH_ELASTICSEARCH=ON \ | ||
| -DWITH_OTLP_HTTP_COMPRESSION=ON \ | ||
| -DWITH_EXAMPLES=ON \ | ||
| -DWITH_EXAMPLES_HTTP=ON \ | ||
| -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-18" | ||
| # -DWITH_ABSEIL=ON \ | ||
| # -DWITH_OTLP_GRPC=ON \ | ||
| # -DWITH_OTLP_GRPC_SSL_MTLS_PREVIEW=ON \ | ||
|
|
||
| - name: clang-tidy | ||
| run: | | ||
| cd build | ||
| make 2>&1 | tee -a clang-tidy.log | ||
marcalff marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| - uses: actions/upload-artifact@v4 | ||
| if: success() || failure() | ||
| with: | ||
| name: Logs (clang-tidy) | ||
| path: ./build/*.log | ||
|
|
||
| - name: count warnings | ||
| run: | | ||
| cd build | ||
| COUNT=`grep -c "warning:" clang-tidy.log` | ||
| echo "clang-tidy reported ${COUNT} warning(s)" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.