Skip to content

DRAFT: add a freebsd job using systemlibs#33562

Closed
willcl-ark wants to merge 3 commits into
bitcoin:masterfrom
willcl-ark:freebsd-job
Closed

DRAFT: add a freebsd job using systemlibs#33562
willcl-ark wants to merge 3 commits into
bitcoin:masterfrom
willcl-ark:freebsd-job

Conversation

@willcl-ark

Copy link
Copy Markdown
Member

Re #33438

Test a basic freebsd job in this repo using cirrus runners to get some info on how long a run will take on Cirrus Runners.

A run on GHA (free) runners is clocking in at around 50 - 60 minutes: https://github.com/willcl-ark/bitcoin/actions/runs/18309856374/job/52135663056

This will need permitting of the vmactions/freebsd-vm@v1 action in this repo. This action seems well-maintained/used, including by rustup, python psutil and a few other notable repos.

This job could alternatively be run as a nightly job (but in this repo, rather than elsewhere), but that does not seem to address:

BSDs are being tested in nightly repos, but merging code here, just to have it reported as broken after the fact, which then requires more changes to fix, isn't ideal. Issues should be caught in this repo, before merging.

Inspiration taken from https://github.com/hebasto/bitcoin-core-nightly/blob/main/.github/workflows/freebsd.yml

@DrahtBot

DrahtBot commented Oct 7, 2025

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/33562.

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:

  • #bitcoin-core/gui/896 (rpcconsole: display signet challenge by RandyMcMillan)
  • #33620 (ci: Build ci_native_base image layer by maflcko)
  • #33549 (ci: Add macOS cross task for arm64-apple-darwin by maflcko)
  • #33514 (Clear out space on GHA jobs by willcl-ark)
  • #33480 (ci: Turn CentOS config into Alpine musl config by maflcko)
  • #33461 (ci: add Valgrind fuzz by fanquake)
  • #33411 (ci: re-add Valgrind job to the CI by fanquake)
  • #33142 (test: Run bench sanity checks in parallel with functional tests by maflcko)
  • #31507 (build: Use clang-cl to build on Windows natively by hebasto)
  • #31425 (RFC: Riscv bare metal CI job by TheCharlatan)
  • #31410 (qa: Fix wallet_multiwallet.py by hebasto)
  • #30595 (kernel: Introduce 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.

Comment thread .github/workflows/ci.yml Outdated
CMAKE_GENERATOR: 'Ninja'
run: |
cd ${{ github.workspace }}
cmake -B build -DWITH_ZMQ=ON -DBUILD_BENCH=ON -DWERROR=ON -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no strong opinion, but is there a rationale about the scope here? why disable the fuzz binary?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No opinion from me either, this is just a tranlation mistake from https://github.com/hebasto/bitcoin-core-nightly/blob/36cc3ef2703d6f662e9a96c21db5d83d80e7efb9/.github/workflows/freebsd.yml#L58 where it is indeed enabled.

I will re-enable it in next push.

@hebasto

hebasto commented Oct 10, 2025

Copy link
Copy Markdown
Member

This will need permitting of the vmactions/freebsd-vm@v1 action in this repo.

A few comments for historical context:

Not sure. What was the conclusion when GHA was added to the repo about enabling third party actions? IIRC it was unclear whether malicious or backdoored actions could compromise the repo, so the conclusion was to refrain from enabling them?

No objection to merging this, but I'd say unless it is clear that the repo can not be compromised, the action should not be enabled in this repo.

And just recently, #32513 has resolved #32508.

@maflcko

maflcko commented Oct 10, 2025

Copy link
Copy Markdown
Member

Yeah, this would be adding FreeBSD to add coverage for a single short-term compile time issue encountered there. Though, we'd still be missing OpenBSD/NetBSD coverage for stuff that is different on those platforms: #33128 (which seems like a long-standing issue that has existed since ever and no one bothered to report?)

@DrahtBot

Copy link
Copy Markdown
Contributor

🐙 This pull request conflicts with the target branch and needs rebase.

@hebasto

hebasto commented Dec 30, 2025

Copy link
Copy Markdown
Member

All vmactions/*-vm actions are now unconditionally cached using the repository's GHA quota.

@maflcko

maflcko commented Dec 30, 2025

Copy link
Copy Markdown
Member

Are you still working on this? If not, it can probably be closed

@willcl-ark

Copy link
Copy Markdown
Member Author

Yeah, from the above it seems like we are happy to just continue running the various *BSDs on nightly jobs. Will close for now.

@willcl-ark willcl-ark closed this Dec 31, 2025
@hebasto

hebasto commented Jan 28, 2026

Copy link
Copy Markdown
Member

All vmactions/*-vm actions are now unconditionally cached using the repository's GHA quota.

This is now configurable as of v1.3.8: https://github.com/vmactions/freebsd-vm/releases/tag/v1.3.8.

@fanquake

Copy link
Copy Markdown
Member

Does that mean this job is more viable to add now?

@maflcko

maflcko commented Jan 29, 2026

Copy link
Copy Markdown
Member

I'd say the opposite: I think we've learned that upstream can control at their will whether to cache something or not. I don't really understand the GHA ecosystem and I think it is horrible (#33562 (comment)), but I guess this is just me and maybe this is fine and we can enable this third-party single-person-maintainer action here?

hebasto added a commit that referenced this pull request Mar 29, 2026
65379bb ci: add FreeBSD cross CI job (fanquake)
f44191f depends: build qrencode for Freebsd (fanquake)
7f70187 depends: FreeBSD cross with Clang (fanquake)
6464f14 depends: disable inotify in Freebsd Qt build (fanquake)

Pull request description:

  Alternative to #33562, which was adding a native FreeBSD job; however that had issues with permissions/caching, as well as potential determinism issues. This adds a FreeBSD cross job using Linux and Clang.

  Would close #33438. The same changes here could also be used to produce FreeBSD binaries out of Guix.

ACKs for top commit:
  hebasto:
    ACK 65379bb. I've cross-compiled on Ubuntu 25.10 for FreeBSD 14.4 and 15.0. The former binaries (`bitcoind`, `test_bitcoin` and `bitcoin-qt`) were tested on FreeBSD 14.4 locally.

Tree-SHA512: 52a3edaa56fe40ca901416cb9e1af04a84505526edfa7309bfa40024baa7d3b1a05303659553d9fbcf1f49d4e3d42b415a1e2523d448b22724d1415a49331259
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants