-
Notifications
You must be signed in to change notification settings - Fork 38.7k
[POC] ci: Skip compilation when running static code analysis #32953
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
base: master
Are you sure you want to change the base?
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code Coverage & BenchmarksFor details see: https://corecheck.dev/bitcoin/bitcoin/pulls/32953. ReviewsSee the guideline for information on the review process. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
| export LC_ALL=C.UTF-8 | ||
|
|
||
| export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04" | ||
| export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:25.04" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was done in the past, but it makes bisecting harder, because those images (and their package mirrors) quickly get deleted upstream
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems fine to wait a few months until the 26.04 tag is available and then just use that. Also, it seems fine to just require cmake 3.31 (or higher) if anyone wants to use the codegen target, but no strong opinion.
eb20643 to
a3e6ed9
Compare
|
🐙 This pull request conflicts with the target branch and needs rebase. |
56750c4 iwyu, clang-format: Sort includes (Hennadii Stepanov) 2c78814 ci: Add IWYU job (Hennadii Stepanov) 94e4f04 cmake: Fix target name (Hennadii Stepanov) 0f81e00 cmake: Make `codegen` target dependent on `generate_build_info` (Hennadii Stepanov) 73f7844 iwyu: Add patch to prefer C++ headers over C counterparts (Hennadii Stepanov) 7a65437 iwyu: Add patch to prefer angled brackets over quotes for includes (Hennadii Stepanov) Pull request description: This PR separates the IWYU checks into its own CI job to provide faster feedback to developers. No other changes are made to the treatment of IWYU warnings. The existing “tidy” CI job will no longer run IWYU. See also the discussion of #33779, specifically this [comment](#33779 (comment)): > Maybe a better approach would be to run the enforced sections in a separate, faster job? Some of the linters are already a bit annoying to invoke locally, so I usually just run the lint job. Doing the same for the includes seems fine to me. Based on ideas from #32953. ACKs for top commit: maflcko: review ACK 56750c4 🌄 sedited: ACK 56750c4 Tree-SHA512: af15326b6d0c5d1e11346ac64939644936c65eb9466cd1a17ab5da347d39aef10f7ab33b39fbca31ad291b0b4b54639b147b24410f4f86197e4a776049882694
This PR is a proof of concept for using a compilation database with static analysis tools such as clang-tidy or IWYU. The idea was suggested in #32662 (comment):
Additionally, this PR makes use of the
codegentarget, following the suggestion in #32662 (comment):A few tasks remain to be addressed. Here's the current TODO list:
codegentarget for CMake versions older than 3.31.mpgentool.RUN_CHECK_DEPS=trueelsewhere.While #31965 is still under discussion, it may make sense to move this CI job to GHA to provide quicker feedback.