-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Create a GitHub workflow for running clang-tidy #39478
Create a GitHub workflow for running clang-tidy #39478
Conversation
0f77ffd
to
edfee00
Compare
Well, this is weird. I have the workflow running clang-tidy, but it's reporting vast numbers of warnings that are just wrong, like unused parameter warnings for seemingly every parameter of every function. I have no idea what's up... Edit: OK, I figured out that mystery. Was an include path issue. |
ecdcb2f
to
df03fdd
Compare
The GitHub workflow VM doesn't have wheel configured correctly for newer package installs. Try to upgrade it first.
I was having trouble debugging include issues in the GitHub workflow for clang-tidy. Therefore, dump the compiler and clang-tidy header search paths to help debug such issues now and in the future.
A difference in the clang include paths between Travis and GitHub workflows means that the custom clang-tidy we're using doesn't quite work correctly on GitHub. Work around this by adding a new include directory explicitly.
df03fdd
to
644e7fa
Compare
OK, I think this is now working. The new job is failing right now, because of a genuine clang-tidy error for which I've opened the separate PR #39494. It's still stopping after the same time limit as the Travis CI for now (because it's running the same code). I plan to remove the Travis CI and remove that constraint in a future PR. |
Summary
SUMMARY: Infrastructure "Create a GitHub workflow for running clang-tidy"
Purpose of change
The Travis clang-tidy job is problematic. It doesn't have sufficient time to run clang-tidy across everything, and it often doesn't run at all because some earlier job failed for a reason unrelated to the PR in question.
This leads to clang-tidy errors creeping into the codebase more often than we would prefer.
Describe the solution
Create a GitHub workflow running clang-tidy to replace the Travis job. This has a much longer timeout, and so we shoul be able to run clang-tidy to completion, and start it sooner.
Long term plan is to remove the Travis job, if this goes well.
Describe alternatives you've considered
Moving the Travis clang-tidy job earlier in the Travis sequence.
I considered going directly to clang-tidy-10 with this PR, but I don't want to change too many variables at once.
Testing
Has to be tested live on this PR. So this is likely to remain draft for a while.