ci: Add a “compile the public headers” job #1387

issue real-or-random openend this issue on July 27, 2023
  1. real-or-random commented at 4:45 pm on July 27, 2023: contributor

    We have a C++ job that checks that all headers compile on their own, but of course, we should test this on C also…

    The example binaries cover some headers, but not by all (e.g., there’s no example for ellswift or prealloc).

  2. real-or-random added the label assurance on Jul 27, 2023
  3. real-or-random added the label ci on Jul 27, 2023
  4. real-or-random added the label build on Jul 27, 2023
  5. purpleKarrot commented at 2:00 pm on June 26, 2025: contributor

    There is a common guideline, that for any header file, there should be an associated source file, which #includes that header, even if the source file otherwise is empty.

    This not only make sure that header files are self contained, but also static code analysis tools like clang-tidy or iwyu only report warnings from the current source file and the associated header. For those tools, an associated source file needs to exist, or diagnostics in headers are silently ignored.

    For a file stem.h, both stem.c and stem_test.c are considered associated source files. Since some compilers dislike source files that don’t provide any symbols, the easiest approach is to use stem_test.c and actually put a test in it.

  6. real-or-random commented at 2:16 pm on June 26, 2025: contributor

    This issue is mean to cover the public headers.

    This not only make sure that header files are self contained,

    For self-contained public headers, see #1039.

  7. real-or-random renamed this:
    ci: Add a "compile the headers" job
    ci: Add a "compile the public headers" job
    on Jun 26, 2025

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/secp256k1. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-06-28 23:15 UTC

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