-
Notifications
You must be signed in to change notification settings - Fork 13
feat: 🎸 Added Build Support For aarch64-apple-darwin #205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: 🎸 Added Build Support For aarch64-apple-darwin #205
Conversation
Allows for apple silicon builds BREAKING CHANGE: 🧨 No
📝 WalkthroughWalkthroughAdds macOS Apple Silicon (aarch64-apple-darwin) build and release support: new Makefile target, CI build-matrix entry, conditional cross install, and macOS artifacts included in the release workflow and draft release assets. (49 words) Changes
Sequence Diagram(s)sequenceDiagram
participant Dev as Developer
participant GH as GitHub Actions
participant RunnerLinux as Linux Runner
participant RunnerMac as macOS Runner
participant ArtifactStore as Release Artifacts
Dev->>GH: Push PR / tag triggers release workflow
GH->>RunnerLinux: Start linux build jobs (x86_64, aarch64)
GH->>RunnerMac: Start macOS aarch64 build job
RunnerLinux->>ArtifactStore: Upload linux artifacts
RunnerMac->>ArtifactStore: Upload macOS aarch64 artifact
GH->>ArtifactStore: Create draft release with all artifacts (linux + macOS + signatures)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In @.github/workflows/release.yml:
- Around line 78-85: The setup-mold step in the GitHub Actions workflow should
be guarded so it only runs on Linux runners; update the step that uses
rui314/setup-mold@v1 to include a conditional (e.g., an if: that checks
runner.os == 'Linux') so the action is skipped on macOS jobs (this ensures the
mold setup is not executed for the macos-14 job and prevents failures).
| - target: aarch64-apple-darwin | ||
| os: macos-14 | ||
| profile: maxperf | ||
| allow_fail: false | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| - uses: rui314/setup-mold@v1 | ||
| - uses: dtolnay/rust-toolchain@stable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
rui314/setup-mold GitHub Action macOS support
💡 Result:
rui314/setup-mold is effectively Linux-only for typical use, because mold does not support linking Mach-O binaries on macOS (its Mach-O support was removed). On a macOS GitHub Actions runner you may be able to install mold (e.g., via Homebrew), but attempting to use it as the system linker will fail for native macOS builds. [1] [2]
Implication for GitHub Actions: don’t use - uses: rui314/setup-mold@v1 on runs-on: macos-* unless you’re doing something nonstandard like cross-linking non-Mach-O targets; for native macOS builds you’ll need a different linker. [1] [2]
Sources:
[1] GitHub issue “Is macos supported” in rui314/mold (shows macOS link failure / not supported) (github.com)
[2] Homebrew mold formula notes Mach-O support removed (formulae.brew.sh)
Citations:
🏁 Script executed:
# Check the actual workflow file to understand the current state
find . -name "release.yml" -o -name "*.yml" | grep -E "workflows|github" | head -20Repository: berachain/bera-reth
Length of output: 425
🏁 Script executed:
cat .github/workflows/release.ymlRepository: berachain/bera-reth
Length of output: 13003
Guard setup-mold to Linux runners.
The setup-mold action will fail on the macOS runner since mold does not support Mach-O binaries (support was removed). Conditionally run this step only on Linux.
Suggested fix
- uses: rui314/setup-mold@v1
+ if: ${{ !startsWith(matrix.configs.os, 'macos') }}🤖 Prompt for AI Agents
In @.github/workflows/release.yml around lines 78 - 85, The setup-mold step in
the GitHub Actions workflow should be guarded so it only runs on Linux runners;
update the step that uses rui314/setup-mold@v1 to include a conditional (e.g.,
an if: that checks runner.os == 'Linux') so the action is skipped on macOS jobs
(this ensures the mold setup is not executed for the macos-14 job and prevents
failures).
| cross build --target aarch64-unknown-linux-gnu --features "$(FEATURES)" --profile "$(PROFILE)" | ||
|
|
||
| .PHONY: build-aarch64-apple-darwin | ||
| build-aarch64-apple-darwin: ## Build bera-reth for macOS Apple Silicon |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this isn't being used in CI anywhere (in release.yml)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's for practicality of:
make build-aarch64-apple-darwin;
| target: ${{ matrix.configs.target }} | ||
| - name: Install cross main | ||
| id: cross_main | ||
| if: ${{ !startsWith(matrix.configs.os, 'macos') }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this? cross main not needed on apple silicon?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apparently cross will default to cargo on Apple Silicon anyways.
Allows for apple silicon builds
BREAKING CHANGE: 🧨 No
Summary by CodeRabbit
New Features
Tests / Build
✏️ Tip: You can customize this high-level summary in your review settings.