[POC] ci: Skip compilation when running static code analysis #32953

pull hebasto wants to merge 3 commits into bitcoin:master from hebasto:250712-ci-static changing 4 files +22 −15
  1. hebasto commented at 12:51 pm on July 12, 2025: member

    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):

    Shouldn’t this be excluded in the tidy CI task as well?

    Additionally, this PR makes use of the codegen target, following the suggestion in #32662 (comment):

    It does seem nice to be able to run clang-tidy on generated files… Maybe more ideally there could be … target like make --build build -t codegen that only runs code generation steps and doesn’t compile the sources.

    A few tasks remain to be addressed. Here’s the current TODO list:

    • Implement the codegen target for CMake versions older than 3.31.
    • Handle files generated by the mpgen tool.
    • Handle files generated by Qt tools.
    • Enable RUN_CHECK_DEPS=true elsewhere.

    While #31965 is still under discussion, it may make sense to move this CI job to GHA to provide quicker feedback.

  2. hebasto added the label Tests on Jul 12, 2025
  3. DrahtBot commented at 12:51 pm on July 12, 2025: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/32953.

    Reviews

    See the guideline for information on the review process. A summary of reviews will appear here.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #30595 (kernel: Introduce initial C header API by TheCharlatan)

    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.

  4. in ci/test/00_setup_env_native_tidy.sh:9 in eb20643c2e outdated
     5@@ -6,7 +6,7 @@
     6 
     7 export LC_ALL=C.UTF-8
     8 
     9-export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04"
    10+export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:25.04"
    


    maflcko commented at 7:10 am on July 14, 2025:
    this was done in the past, but it makes bisecting harder, because those images (and their package mirrors) quickly get deleted upstream

    maflcko commented at 11:09 am on July 14, 2025:
    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.
  5. DrahtBot added the label Needs rebase on Jul 14, 2025
  6. build: Make `codegen` target dependent on `generate_build_info` 29acd2edb0
  7. ci: Skip compilation when running static code analysis b44ca9b21a
  8. refactor: Fix `modernize-use-default-member-init` clang-tidy warning a3e6ed9a45
  9. hebasto force-pushed on Jul 17, 2025
  10. DrahtBot removed the label Needs rebase on Jul 17, 2025

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-07-23 00:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me