Skip to content

ci: add Guix builds to CI - #36006

Closed
willcl-ark wants to merge 6 commits into
bitcoin:masterfrom
willcl-ark:guix-ci
Closed

willcl-ark wants to merge 6 commits into
bitcoin:masterfrom
willcl-ark:guix-ci

Conversation

@willcl-ark

@willcl-ark willcl-ark commented Aug 18, 2026 •

Copy link
Copy Markdown
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.

@DrahtBot DrahtBot added the Tests label Aug 18, 2026
@DrahtBot

DrahtBot commented Aug 18, 2026 •

Copy link
Copy Markdown
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/36006.

Reviews

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

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #36036 (build: Bump clang minimum supported version to 19 by maflcko)
  • #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)
  • #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)
  • #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)
  • #10102 (Multiprocess bitcoin 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.

@willcl-ark

Copy link
Copy Markdown
Member Author

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

@hebasto

hebasto commented Aug 18, 2026

Copy link
Copy Markdown
Member

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

Have you seen #35929?

@willcl-ark

Copy link
Copy Markdown
Member Author

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:

image

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.

@willcl-ark

Copy link
Copy Markdown
Member Author

Comment thread .github/install-guix.sh Resolved
@fanquake

Copy link
Copy Markdown
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?

@maflcko

maflcko commented Aug 18, 2026

Copy link
Copy Markdown
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.

@fanquake

Copy link
Copy Markdown
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).

Comment thread .github/install-guix.sh Resolved
@fanquake

Copy link
Copy Markdown
Member

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

@hebasto

hebasto commented Aug 18, 2026

Copy link
Copy Markdown
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?

@willcl-ark
willcl-ark force-pushed the guix-ci branch 3 times, most recently from d660add to ca133ba Compare August 18, 2026 15:13
@willcl-ark willcl-ark closed this Aug 18, 2026
@willcl-ark willcl-ark reopened this Aug 18, 2026
@willcl-ark

Copy link
Copy Markdown
Member Author

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?

@willcl-ark
willcl-ark force-pushed the guix-ci branch 2 times, most recently from bf639e7 to 4d27252 Compare August 18, 2026 15:56
@willcl-ark willcl-ark changed the title ci: add a full x86_64 Guix build to CI ci: add Guix builds to CI Aug 18, 2026
@DrahtBot

Copy link
Copy Markdown
Contributor

🚧 At least one of the CI tasks failed.
Task lint: https://github.com/bitcoin/bitcoin/actions/runs/32157463479/job/95778244301
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).

Hints

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.

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.
fanquake added a commit that referenced this pull request Aug 25, 2026
…roducible

7e973cc depends: Make tarball creation from local directory reproducible (Hennadii Stepanov)

Pull request description:

  This guarantees `$(package)_sha256_hash` reproducibility regardless of the default behavior of `$(build_TAR)` and fixes [caching](#36006 (comment)) for the `native_libmultiprocess` package.

  Steps to reproduce the issue using the master branch @ 2a9e35d:
  ```console
  $ mkdir a && cd a && git init
  $ git remote add origin https://github.com/bitcoin/bitcoin.git
  $ git fetch --depth 1 origin 2a9e35d
  $ git checkout FETCH_HEAD
  $ cd depends
  $ gmake print-native_libmultiprocess_sha256_hash  # Hash A. Compare with Hash B.
  native_libmultiprocess_sha256_hash=7dd817bfc0ee23c408299907aff13fefb0bd3a54ec66dc14ea15b0cc38c3d9ce
  $ cd ../../ && sleep 2
  $ mkdir b && cd b && git init
  $ git remote add origin https://github.com/bitcoin/bitcoin.git
  $ git fetch --depth 1 origin 2a9e35d
  $ git checkout FETCH_HEAD
  $ cd depends
  $ gmake print-native_libmultiprocess_sha256_hash  # Hash B. Compare with Hash A.
  native_libmultiprocess_sha256_hash=34d6f79560c0ff7a4f46bd6bfb4693076546b41f071b6dbf879da45ac8384688
  ```

ACKs for top commit:
  fanquake:
    ACK 7e973cc
  willcl-ark:
    ACK 7e973cc

Tree-SHA512: f939cd1b2aca04eaa0f8426858bae3657ee9625f915834980caacfbf80843b952451f4d1c29e27179e533de3e10d31688593e4c25ed32e62392bfbaf9e58dd12
@willcl-ark

Copy link
Copy Markdown
Member Author

Re-opened in #36082

@DrahtBot DrahtBot mentioned this pull request Aug 26, 2026
Kino1994 pushed a commit to Kino1994/bitcoin-full-history that referenced this pull request Aug 31, 2026
…l directory reproducible

7e973cce52caeadaa9dcd4b5b6b7f53372e0aa0e depends: Make tarball creation from local directory reproducible (Hennadii Stepanov)

Pull request description:

  This guarantees `$(package)_sha256_hash` reproducibility regardless of the default behavior of `$(build_TAR)` and fixes [caching](bitcoin/bitcoin#36006 (comment)) for the `native_libmultiprocess` package.

  Steps to reproduce the issue using the master branch @ 2a9e35d293b308e81811fa93ad2e5e8ed20e66e0:
  ```console
  $ mkdir a && cd a && git init
  $ git remote add origin https://github.com/bitcoin/bitcoin.git
  $ git fetch --depth 1 origin 2a9e35d293b308e81811fa93ad2e5e8ed20e66e0
  $ git checkout FETCH_HEAD
  $ cd depends
  $ gmake print-native_libmultiprocess_sha256_hash  # Hash A. Compare with Hash B.
  native_libmultiprocess_sha256_hash=7dd817bfc0ee23c408299907aff13fefb0bd3a54ec66dc14ea15b0cc38c3d9ce
  $ cd ../../ && sleep 2
  $ mkdir b && cd b && git init
  $ git remote add origin https://github.com/bitcoin/bitcoin.git
  $ git fetch --depth 1 origin 2a9e35d293b308e81811fa93ad2e5e8ed20e66e0
  $ git checkout FETCH_HEAD
  $ cd depends
  $ gmake print-native_libmultiprocess_sha256_hash  # Hash B. Compare with Hash A.
  native_libmultiprocess_sha256_hash=34d6f79560c0ff7a4f46bd6bfb4693076546b41f071b6dbf879da45ac8384688
  ```

ACKs for top commit:
  fanquake:
    ACK 7e973cce52caeadaa9dcd4b5b6b7f53372e0aa0e
  willcl-ark:
    ACK 7e973cce52caeadaa9dcd4b5b6b7f53372e0aa0e

Tree-SHA512: f939cd1b2aca04eaa0f8426858bae3657ee9625f915834980caacfbf80843b952451f4d1c29e27179e533de3e10d31688593e4c25ed32e62392bfbaf9e58dd12
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Nov 24, 2026
…ory reproducible

7e973cc depends: Make tarball creation from local directory reproducible (Hennadii Stepanov)

Pull request description:

  This guarantees `$(package)_sha256_hash` reproducibility regardless of the default behavior of `$(build_TAR)` and fixes [caching](bitcoin#36006 (comment)) for the `native_libmultiprocess` package.

  Steps to reproduce the issue using the master branch @ 2a9e35d:
  ```console
  $ mkdir a && cd a && git init
  $ git remote add origin https://github.com/bitcoin/bitcoin.git
  $ git fetch --depth 1 origin 2a9e35d
  $ git checkout FETCH_HEAD
  $ cd depends
  $ gmake print-native_libmultiprocess_sha256_hash  # Hash A. Compare with Hash B.
  native_libmultiprocess_sha256_hash=7dd817bfc0ee23c408299907aff13fefb0bd3a54ec66dc14ea15b0cc38c3d9ce
  $ cd ../../ && sleep 2
  $ mkdir b && cd b && git init
  $ git remote add origin https://github.com/bitcoin/bitcoin.git
  $ git fetch --depth 1 origin 2a9e35d
  $ git checkout FETCH_HEAD
  $ cd depends
  $ gmake print-native_libmultiprocess_sha256_hash  # Hash B. Compare with Hash A.
  native_libmultiprocess_sha256_hash=34d6f79560c0ff7a4f46bd6bfb4693076546b41f071b6dbf879da45ac8384688
  ```

ACKs for top commit:
  fanquake:
    ACK 7e973cc
  willcl-ark:
    ACK 7e973cc

Tree-SHA512: f939cd1b2aca04eaa0f8426858bae3657ee9625f915834980caacfbf80843b952451f4d1c29e27179e533de3e10d31688593e4c25ed32e62392bfbaf9e58dd12
(cherry picked from commit 0f5c6d0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants