ci: add Guix builds to CI #36082

pull willcl-ark wants to merge 3 commits into bitcoin:master from willcl-ark:guix-ci-v2 changing 3 files +210 −2
  1. willcl-ark commented at 5:46 PM on August 25, 2026: member

    Adds Guix builds to CI as a standalone workflow for:

    • arm64-apple-darwin
    • x86_64-linux-gnu
    • x86_64-w64-mingw32

    The first commit exports the pinned Guix repository URL and time-machine commit from the common prelude so other scripts can reuse them. This workflow uses the commit in its cache key; automated Guix substitute builders can also use it.

    The second commit adds the workflow and Guix installation script, with caches for the Guix bootstrap, time-machine checkouts, depends sources and builds, and macOS SDK.

    The final commit adds a codesign environment test to the Windows and macOS jobs. It builds the environment and runs true inside its container, to try and catch manifest errors and broken dependencies without requiring signatures or signing keys.

  2. DrahtBot added the label Tests on Aug 25, 2026
  3. DrahtBot commented at 5:46 PM on August 25, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--006a51241073e994b41acfe9ec718e94-->

    Code Coverage & Benchmarks

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

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline and AI policy for information on the review process.

    Type Reviewers
    Concept ACK fanquake, sedited

    If your review is incorrectly listed, please copy-paste <code>&lt;!--meta-tag:bot-skip--&gt;</code> into the comment that the bot should ignore.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #36233 (guix: Update time-machine to 60f6956aeffa7f30285745bd0ea615e9acfc74f8 by hebasto)
    • #35855 (guix: update time-machine by fanquake)

    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.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  4. willcl-ark commented at 5:59 PM on August 25, 2026: member

    #36006 got auto-closed by a linked PR.

    More info on the infra side of things:

    I have configured two physically separate bitcoin core substitute servers for better availability (using this module. One server evaluates the guix closure and builds it. Then uses guix copy to copy store items to the second server via ssh.

    We could include the default substitute servers (https://bordeaux.guix.gnu.org https://ci.guix.gnu.org), but this makes the CI runs noticeably slower as these (slow) servers are queried even when not used/selected. These servers obviously will never include our custom compilers, which are the slowest thing to build, too.

    I tested a run with a single substitute server, shutting the server off part way through, and Guix didn't like that it thought a substitute should be available but then wasn't and so failed. I think our use of --fallback protects us in the case that no substitute servers are available before the run begins; everything is just rebuilt, but have not tested this yet.

  5. willcl-ark force-pushed on Aug 26, 2026
  6. willcl-ark marked this as ready for review on Aug 26, 2026
  7. willcl-ark marked this as a draft on Aug 26, 2026
  8. DrahtBot added the label CI failed on Aug 26, 2026
  9. DrahtBot commented at 8:45 AM on August 26, 2026: contributor

    <!--85328a0da195eb286784d51f73fa0af9-->

    🚧 At least one of the CI tasks failed. <sub>Task macOS native, fuzz: https://github.com/bitcoin/bitcoin/actions/runs/32941900565/job/98094394757</sub> <sub>LLM reason (✨ experimental): CI failed because the rpc fuzz target returned exit code 1 due to an “Error processing input” during fuzzing.</sub>

    <details><summary>Hints</summary>

    Try to run the tests locally, according to the documentation. However, a CI failure may still happen due to a number of reasons, for example:

    • Possibly due to a silent merge conflict (the changes in this pull request being incompatible with the current code in the target branch). If so, make sure to rebase on the latest commit of the target branch.

    • A sanitizer issue, which can only be found by compiling with the sanitizer and running the affected test.

    • An intermittent issue.

    Leave a comment here, if you need help tracking down a confusing failure.

    </details>

  10. willcl-ark force-pushed on Aug 26, 2026
  11. willcl-ark force-pushed on Aug 26, 2026
  12. willcl-ark force-pushed on Aug 26, 2026
  13. willcl-ark commented at 1:14 PM on August 26, 2026: member

    @hebasto I think that efbb91102107dd9e758c46b9cd51d7a1de28c38a (the first commit here) and #35929 are duplicating solutions in different ways.

    I believe that #35929 is the neater solution, and still covers the multi-toolchain (dual Guix build) scenario via embedding the toolchain info in the build ID as part of:

    BASE_CACHE/<host>/<package>/<package>-<version>-<build_id>.tar.gz
    

    Do you agree? If so I think I'll drop efbb91102107dd9e758c46b9cd51d7a1de28c38a from here, and rebase on/review #35929.

  14. hebasto commented at 9:14 AM on August 28, 2026: member

    @hebasto I think that efbb911 (the first commit here) and #35929 are duplicating solutions in different ways.

    I've reviewed and tested efbb91102107dd9e758c46b9cd51d7a1de28c38a. Compared to #35929, it manages to fix the first subissue: "1. All depends are rebuilt when switching to another branch with identical Guix scripts and the depends subdirectory". Unfortunately, it fails to resolve the second one: "2. All non-GUI packages are built twice per host (mostly relevant for non-Linux hosts)".

    Another point worth mentioning: for your commit to work as expected, the BASE_CACHE environment variable must be set explicitly.

    I believe that #35929 is the neater solution, and still covers the multi-toolchain (dual Guix build) scenario via embedding the toolchain info in the build ID as part of:

    BASE_CACHE/<host>/<package>/<package>-<version>-<build_id>.tar.gz
    

    Do you agree? If so I think I'll drop efbb911 from here, and rebase on/review #35929.

    That sounds good to me.

  15. hebasto commented at 11:07 AM on August 28, 2026: member

    @willcl-ark

    Please also consider #35929 (comment).

  16. willcl-ark commented at 11:08 AM on August 28, 2026: member

    Thanks hebasto, that sounds reasonable to me

  17. DrahtBot added the label Needs rebase on Sep 11, 2026
  18. guix: expose time-machine metadata
    Make the pinned repository and commit available to callers that source the
    Guix prelude.
    
    A Bitcoin Core-specific substitute server only needs to build the
    packages in the guix closure at a specific time machine commit. It does
    not need to build the bitcoin core binary applications.
    
    To facilitate extracting the time-machine commit, export it as a
    variable, so substitute builders (and anybody else) can re-use it by
    sourcing the prelude, instead of requiring error-prone command string parsing.
    5f83028b4b
  19. willcl-ark force-pushed on Sep 15, 2026
  20. fanquake commented at 10:34 AM on September 15, 2026: member

    Concept ACK

  21. DrahtBot removed the label Needs rebase on Sep 15, 2026
  22. willcl-ark force-pushed on Sep 15, 2026
  23. sedited commented at 11:47 AM on September 15, 2026: contributor

    Concept ACK

  24. willcl-ark commented at 11:52 AM on September 15, 2026: member

    Added a commit to run true inside the guix-codesign container to try and catch things like #36256 (review)

    I don't think there's any more we can do when we don't have signatures.

  25. willcl-ark force-pushed on Sep 15, 2026
  26. ci: add Guix build job
    Run the single-host Guix build on pull requests and master pushes.
    
    Use the Guix installer with a cached, verified bootstrap and retain
    time-machine and depends caches to avoid repeated downloads and builds.
    788a607980
  27. ci: test Guix codesign environments
    The regular Guix builds do not evaluate the codesign manifest, so missing
    imports and broken signing dependencies can go unnoticed until signing.
    
    Realize each signing target's environment before its main build to catch
    these failures without requiring signatures or signing keys.
    a340718c36
  28. willcl-ark force-pushed on Sep 15, 2026
  29. willcl-ark marked this as ready for review on Sep 15, 2026
  30. willcl-ark commented at 1:47 PM on September 15, 2026: member

    Marking this as ready for review now as I'd be interested in comments on its current state.

    For me the main open question to be answered is:

    • Are we happy to rely on the two (physically distinct) Guix substitute servers I'm operating as the only enabled ones in these jobs?

    If we add in other upstream servers (the defaults), the job runtime increases a fair amount (about 5 minutes longer to "check substitutes" in all jobs, not to mention that they'll be missing our compiler toolchains as subs so we need to rebuild those anyway which takes ages) but the jobs would become slightly more robust against my two servers being down, or in the case I disappear or whatever.

    Another alternative is to have someone else operate another server. This would be my personal preference, if it were possible.

  31. DrahtBot removed the label CI failed on Sep 15, 2026

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: 2026-09-17 00:51 UTC

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