Skip to content

Conversation

@codingwithmanny
Copy link

@codingwithmanny codingwithmanny commented Jan 23, 2026

Allows for apple silicon builds

BREAKING CHANGE: 🧨 No

Summary by CodeRabbit

  • New Features

    • Official build support for macOS on Apple Silicon — pre-built Apple Silicon (aarch64) binaries will be published with future releases.
    • Release assets and download listings updated to include the macOS Apple Silicon artifact and signature.
  • Tests / Build

    • Build and test flows updated to include macOS Apple Silicon targets so macOS builds are validated in CI.

✏️ Tip: You can customize this high-level summary in your review settings.

Allows for apple silicon builds

BREAKING CHANGE: 🧨 No
@coderabbitai
Copy link

coderabbitai bot commented Jan 23, 2026

📝 Walkthrough

Walkthrough

Adds 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

Cohort / File(s) Summary
CI/CD Release Configuration
.github/workflows/release.yml
Added aarch64-apple-darwin (macOS 14) to release build matrix; made cross installation conditional (skip on macOS); added macOS aarch64 tarball and signature to release artifacts; updated draft-release asset paths and release assets table to include macOS.
Build Targets / Makefile
Makefile
Added PHONY target build-aarch64-apple-darwin that runs cargo build --target aarch64-apple-darwin --features "$(FEATURES)" --profile "$(PROFILE)".
Test Scripts
scripts/test-build-targets.sh
Added conditional test for aarch64-apple-darwin that runs only when PLATFORM is macOS; otherwise prints a skipped-target message.

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)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 Hopped from Linux fields to macOS hill,

tiny paws on Apple Silicon thrill.
Builds aligned, artifacts tucked tight,
seeds of cross-compile take flight ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and accurately describes the main change: adding build support for aarch64-apple-darwin (Apple Silicon macOS builds).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a 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).

Comment on lines +78 to 85
- 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
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 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 -20

Repository: berachain/bera-reth

Length of output: 425


🏁 Script executed:

cat .github/workflows/release.yml

Repository: 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
Copy link

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)

Copy link
Author

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') }}
Copy link

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?

Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants