_ci_: Use goreleaser to build macos universal binaries (including M1 macs) #9096
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a much needed change that creates a universal MacOS binary, including support for M1 based macs. We also automatically update the homebrew package repo to use the new universal binary.
I also used this opportunity to refactor the workflow slightly so we can test out
goreleaser
, a yaml based tool for building, packaging, and releasing go binaries on multiple platforms. It supports building binaries for to most of the platforms we care about, including Linux and MacOS, and also supports publishing those binaries automatically as releases in Github, Homebrew, Snap, and Apt.If this trial goes well, I think we should eventually replace the entire release workflow with
goreleaser
. For now, this test is more tightly scoped to only change the MacOS release process, since that is the one we have the most issues with. This PR:- Builds darwin-amd64 and darwin-arm64 binaries of lotus, lotus-miner,
and lotus-worker
- Packages them into a universal darwin binary
- Publishes those to a release in Github based on the current tag
- Uses the binaries in the release to auto-publish an updated homebrew
configuration to filecoin-project/homebrew-lotus
- Does a dry-run build to produce a snapshot on release branches
- Manually generate and upload checksums after goreleaser
I pushed a test tag on my private fork to ensure it works as expected, which generated a release and an update to homebrew:
By running
brew install ianconsolata/lotus/lotus
you can try out the new MacOS installation process. It's been verified anecdotally on a few M1 macs, and my own non-M1 mac.Checklist
Before you mark the PR ready for review, please make sure that:
<PR type>: <area>: <change being made>
fix: mempool: Introduce a cache for valid signatures
PR type
: fix, feat, INTERFACE BREAKING CHANGE, CONSENSUS BREAKING, build, chore, ci, docs,perf, refactor, revert, style, testarea
: api, chain, state, vm, data transfer, market, mempool, message, block production, multisig, networking, paychan, proving, sealing, wallet, deps