Skip to content

ci: test cross-built macos arm64 binaries - #35774

Open
willcl-ark wants to merge 2 commits into
bitcoin:masterfrom
willcl-ark:macos-cross-ci-test
Open

willcl-ark wants to merge 2 commits into
bitcoin:masterfrom
willcl-ark:macos-cross-ci-test

Conversation

@willcl-ark

@willcl-ark willcl-ark commented Jul 22, 2026 •

Copy link
Copy Markdown
Member

Currently we have some macos cross-built binaries, which are using depends as opposed to brew in the native macos builds, but these binaries are not being tested, culminating in silent breakages like #35771

Build test_bitcoin-qt in macos_cross, and test the binaries in a subsequent job.

the macos_cross job is removed from ci-matrix as otherwise the new macos-cross-arm64 test job has to wait for all matrix jobs to finish (successfully) before running. This includes some of our slow jobs, and will needlessly inflate CI runtimes.

Doing this does add some more boilerplate into ci.yml, but IMO this is acceptable (and the best option currently).

@DrahtBot DrahtBot added the Tests label Jul 22, 2026
@DrahtBot

DrahtBot commented Jul 22, 2026 •

Copy link
Copy Markdown
Contributor

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

External sites

Reviews

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

Type Reviewers
Concept ACK fanquake

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

Conflicts

No conflicts as of last run.

Comment thread .github/workflows/ci.yml Outdated
key: macos-arm64-binaries-${{ github.run_id }}
provider: ${{ github.repository == 'bitcoin/bitcoin' && 'warp' || 'gha' }}
enable-cross-os-archive: true
enable-cross-arch-archive: true

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.

Seems a bit tedious to use the cache for this? Why not use a artifact, like the pre-existing windows tests and like d40e61e?

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.

I intentionally used cache vs artefact as Warp don't have an [upload|download]-artifact action, and relying on GH infra upload/download speed has been ... not the most ideal thing to do in recent times.

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.

Hmm, yeah, the GH cache seemed slow at some point in the past, but is it also true for artifacts?

Side-topic: macOS/Windows are still using the GHA cache and moving Windows was closed in #35683

Also, the GHA cache is still 200GB, so maybe it can be reduced again a bit (maybe to 20GB), given that only macOS/Windows are using it?

Also, the windows-cross-to-native tasks are still using artifacts.

No strong opinion. I just wonder if artifcats are also slow and if inconsistent handling is worth it.

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.

Happy to review this pull, but still wondering about this:

  • Is this measurably faster?
  • If yes, why not use it for Windows as well?
  • If no, why not just use plain simple GHA for consistency?

Not a blocker. Happy to give this a best-effort review, but I am wondering.

Comment thread .github/workflows/ci.yml Resolved
Comment thread ci/test/00_setup_env_mac_cross.sh Resolved
@willcl-ark
willcl-ark force-pushed the macos-cross-ci-test branch from a74438c to ab86ef4 Compare July 22, 2026 14:28
@willcl-ark
willcl-ark marked this pull request as ready for review July 22, 2026 14:53
@fanquake

Copy link
Copy Markdown
Member

Concept ACK given #35771. Similar to Windows, we should have a CI that is natively testing the release-like cross built bins.

@fanquake

Copy link
Copy Markdown
Member

Could rebase, and put this on top of #35838?

@sedited

sedited commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

@willcl-ark can you do the requested rebase here?

@willcl-ark

Copy link
Copy Markdown
Member Author

Rebased

@fanquake fanquake added this to the 33.0 milestone Sep 24, 2026
@sedited
sedited requested a review from maflcko November 4, 2026 12:38

@maflcko maflcko left a comment

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.

lgtm

Comment thread .github/workflows/ci.yml Resolved
Give the arm64 cross-build a separate job so native tests can depend on
its completion without waiting for unrelated matrix builds.
Run test_bitcoin and test_bitcoin-qt on native arm64 hardware to exercise
the cross-built binaries. Transfer the binaries and test fixture through
GitHub artifacts, matching the Windows cross-build jobs. Keep them in a
tar archive to preserve executable permissions. Limit the native job to
120 minutes so hung tests cannot occupy a runner for six hours.
@willcl-ark

Copy link
Copy Markdown
Member Author

Addressed @maflcko's comment, and added the missing timout suggested by ralph in: git range-diff 0f573277d888d07247197add0a60bf5331cbdc48...e7ddc816e4bf1b84b0013f56c6f7754e2a0406b2

@fanquake
fanquake requested a review from hebasto November 6, 2026 11:24
Comment thread .github/workflows/ci.yml
steps:
- *ANNOTATION_PR_NUMBER

- *CHECKOUT

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.

This isn't copy-pasted correctly? Maybe use a template?

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