ci: add Guix builds to CI #36006

pull willcl-ark wants to merge 6 commits into bitcoin:master from willcl-ark:guix-ci changing 12 files +237 −618
  1. willcl-ark commented at 7:26 AM on August 18, 2026: member

    Adds:

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

    ... Guix builds to CI as a standalone workflow.

    Testing exposed that manifest_build.scm depends are invalidated by a subsequent manifest_gui.scm build, so the first commit here splits these inside of BASE_CACHE. This means they can both be cached and re-used.

    The second commit exports the time machine commit which makes it easier to re-use in other scripts e.g. this CI workflow, but also places like an automated Guix substitute build server.

    The final commit adds the new workflow and guix install shell snippet.

  2. DrahtBot added the label Tests on Aug 18, 2026
  3. DrahtBot commented at 7:27 AM on August 18, 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/36006.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

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

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #35855 (guix: update time-machine by fanquake)
    • #35774 (ci: test cross-built macos arm64 binaries by willcl-ark)
    • #35765 (depends: hash local source contents by willcl-ark)
    • #33593 (guix: Use UCRT runtime for Windows release binaries by hebasto)
    • #31507 (build: Use clang-cl to build on Windows natively by hebasto)
    • #30343 (wallet, logging: Replace WalletLogPrintf() with LogInfo() by ryanofsky)
    • #30342 (kernel, logging: Pass Logger instances to kernel objects by ryanofsky)
    • #29700 (kernel, refactor: return error status on all fatal errors by ryanofsky)
    • #26022 (Add util::ResultPtr class by ryanofsky)
    • #25722 (refactor: Use util::Result class for wallet loading by ryanofsky)
    • #19461 (multiprocess: Add bitcoin-gui -ipcconnect option by ryanofsky)
    • #19460 (multiprocess: Add bitcoin-wallet -ipcconnect option by ryanofsky)
    • #17783 (common: Disallow calling IsArgSet() on ALLOW_LIST options by ryanofsky)
    • #17581 (refactor: Remove settings merge reverse precedence code by ryanofsky)
    • #17580 (refactor: Add ALLOW_LIST flags and enforce usage in CheckArgFlags by ryanofsky)
    • #17493 (util: Forbid ambiguous multiple assignments in config file by ryanofsky)

    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 8:08 AM on August 18, 2026: member

    A full run with no caches and guix time machine sync completed in 38m 40s.

  5. willcl-ark force-pushed on Aug 18, 2026
  6. hebasto commented at 8:17 AM on August 18, 2026: member

    Testing exposed that manifest_build.scm depends are invalidated by a subsequent manifest_gui.scm build...

    Have you seen #35929?

  7. willcl-ark commented at 8:36 AM on August 18, 2026: member

    A cached build has completed in 23m 19s .

    Based on the CPU usage, there is a lot of idel setup time still, even when using a substitute server:

    <img width="2340" height="1428" alt="image" src="https://github.com/user-attachments/assets/a3feab3c-2aa4-47b8-bad1-da41ff542e67" />

    So there is still some juice to squeeze. I may investigate using a pre-built docker container too (possibly based off this one) to see if we can cut down on some of that wasted runner time.

    However overall, I think 20 - 40 minutes is pretty acceptable for a new CI job.

  8. willcl-ark commented at 9:00 AM on August 18, 2026: member

    15m4s when dropping the slow https://ci.guix.gnu.org substitute server

  9. in .github/install-guix.sh:3 in 98bacdd71f
       0 | @@ -0,0 +1,28 @@
       1 | +#!/usr/bin/env bash
       2 | +set -o errexit
       3 | +set +o pipefail
    


    maflcko commented at 9:01 AM on August 18, 2026:

    why disable? Also, missing nounset and trace?


    willcl-ark commented at 9:08 AM on August 18, 2026:

    ah that's a legacy of my playing with Line 19 (to make installation non-interactive)

    yes '' | sudo env GUIX_BINARY_FILE_NAME="$guix_tarball" ./guix-install.sh
    

    Will tidy up before undrafting :)

  10. fanquake commented at 9:06 AM on August 18, 2026: member

    15m4s when dropping the slow https://ci.guix.gnu.org/ substitute server

    Could add a second HOST? Maybe arm64-apple-darwin, to get some LLVM toolchain coverage?

  11. willcl-ark force-pushed on Aug 18, 2026
  12. maflcko commented at 9:26 AM on August 18, 2026: member

    Seems fine to add this, but I fail to see the goal or motivation?

    It would be good to list at least a single historic bug that this would catch.

    Recall that the CI scripts already mirror the guix env, so any compile errors should be caught by the pre-existing CI scripts.

    Also, any change to guix requires matching hashes on different arches, which this pull is not doing. So non-determinism or bugs such as #35855 (comment) are not caught either here.

    Again, no objection to adding this, but I think it would be easier to review if there was a goal or motivation.

  13. fanquake commented at 9:32 AM on August 18, 2026: member

    It would be good to list at least a single historic bug that this would catch.

    It would have caught #33177 (broken in #32750, fixed in #33178).

  14. in .github/install-guix.sh:9 in 98bacdd71f
       0 | @@ -0,0 +1,28 @@
       1 | +#!/usr/bin/env bash
       2 | +set -o errexit
       3 | +set +o pipefail
       4 | +
       5 | +# Download Guix
       6 | +mkdir -p "$GUIX_BOOTSTRAP_DIR"
       7 | +guix_tarball="${GUIX_BOOTSTRAP_DIR}/guix-binary-${GUIX_BINARY_VERSION}.x86_64-linux.tar.xz"
       8 | +if [ ! -e "$guix_tarball" ]; then
       9 | +  wget --quiet \
    


    maflcko commented at 10:11 AM on August 18, 2026:

    Also, I think we switched to curl in most CI scripts, so could use curl -fLO or so for consistency here?


    willcl-ark commented at 10:30 AM on August 18, 2026:

    thx, will add to the next push

  15. willcl-ark force-pushed on Aug 18, 2026
  16. fanquake commented at 1:06 PM on August 18, 2026: member

    Given the runtimes of 19m and 21m, this seems to be fast enough that you could add a Windows HOST as well.

  17. hebasto commented at 1:24 PM on August 18, 2026: member

    Even with a populated depends cache, the native_libmultiprocess package is still building:

    make: Entering directory '/bitcoin/depends'
    Extracting native_libmultiprocess...
    /home/runner/work/bitcoin/bitcoin/.guix-cache/depends-sources/src-ipc-libmultiprocess.tar: OK
    Preprocessing native_libmultiprocess...
    Configuring native_libmultiprocess...
    <snip>
    Building native_libmultiprocess...
    <snip>
    Postprocessing native_libmultiprocess...
    Caching native_libmultiprocess...
    copying packages: native_libmultiprocess native_capnp boost sqlite systemtap zeromq capnp
    

    Could #35618 fix this?

  18. willcl-ark force-pushed on Aug 18, 2026
  19. willcl-ark force-pushed on Aug 18, 2026
  20. willcl-ark force-pushed on Aug 18, 2026
  21. willcl-ark closed this on Aug 18, 2026

  22. willcl-ark reopened this on Aug 18, 2026

  23. willcl-ark commented at 3:52 PM on August 18, 2026: member

    Even with a populated depends cache, the native_libmultiprocess package is still building:

    Yeah that is a shame. I'm not sure it happens every time though. Unsure of the cause...

    Could #35618 fix this?

    These are x64 Ubuntu runners, but perhaps I could cherry-pick that and test it out?

  24. willcl-ark force-pushed on Aug 18, 2026
  25. willcl-ark force-pushed on Aug 18, 2026
  26. willcl-ark renamed this:
    ci: add a full x86_64 Guix build to CI
    ci: add Guix builds to CI
    on Aug 18, 2026
  27. willcl-ark force-pushed on Aug 18, 2026
  28. DrahtBot added the label CI failed on Aug 18, 2026
  29. DrahtBot commented at 4:11 PM on August 18, 2026: contributor

    <!--85328a0da195eb286784d51f73fa0af9-->

    🚧 At least one of the CI tasks failed. <sub>Task lint: https://github.com/bitcoin/bitcoin/actions/runs/32157463479/job/95778244301</sub> <sub>LLM reason (✨ experimental): CI failed because the shell locale lint check reported a missing export LC_ALL=C in .github/install-guix.sh (lint-shell-locale.py).</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>

  30. DrahtBot removed the label CI failed on Aug 18, 2026
  31. willcl-ark force-pushed on Aug 18, 2026
  32. willcl-ark force-pushed on Aug 18, 2026
  33. willcl-ark force-pushed on Aug 18, 2026
  34. willcl-ark commented at 8:04 AM on August 19, 2026: member

    Could #35618 fix this?

    It does indeed seem to fix it!

  35. willcl-ark commented at 10:24 AM on August 19, 2026: member

    So it seems it would make sense to try and merge #35618 first. Then optionally split the first to commits out from here, before merging a Guix CI job.

    What do you think @hebasto ?

  36. hebasto commented at 10:31 AM on August 19, 2026: member

    So it seems it would make sense to try and merge #35618 first. Then optionally split the first to commits out from here, before merging a Guix CI job.

    What do you think @hebasto ?

    Sounds reasonable.

  37. DrahtBot added the label Needs rebase on Aug 19, 2026
  38. depends: Make tarball creation from local directory reproducible
    This guarantees `$(package)_sha256_hash` reproducibility regardless of
    the default behavior of `$(build_TAR)`. Fixes caching on some systems,
    for example, on FreeBSD.
    529023e3f0
  39. guix: cache GUI depends separately
    The GUI manifest has a distinct Guix profile and consequently produces
    different depends build IDs. Reusing one cache root lets each build replace
    the other's archive, so a later build rebuilds depends.
    
    Keep the artifacts in BASE_CACHE/BUILD and BASE_CACHE/GUI. This preserves both
    variants in the existing master cache without changing depends.
    1dfea8ba5e
  40. guix: expose time-machine metadata
    Make the pinned repository and commit available to callers that source the
    Guix prelude.
    
    This lets CI consume the same values as guix-build without parsing the
    time-machine invocation.
    b139a0c515
  41. 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.
    b50127904c
  42. dropme: only run guix ci job 3475b0b3fd
  43. ci: add a second substitute server 454cd632ac
  44. willcl-ark force-pushed on Aug 19, 2026
  45. DrahtBot removed the label Needs rebase on Aug 19, 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-08-21 04:51 UTC

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