-
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -75,14 +75,18 @@ jobs: | |
| os: ubuntu-24.04 | ||
| profile: maxperf | ||
| allow_fail: false | ||
| - 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 | ||
| with: | ||
| 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 commentThe reason will be displayed to describe this comment to others. Learn more. why this? cross main not needed on apple silicon?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Apparently cross will default to cargo on Apple Silicon anyways. |
||
| run: | | ||
| cargo install cross --git https://github.com/cross-rs/cross | ||
| - uses: Swatinem/rust-cache@v2 | ||
|
|
@@ -211,6 +215,7 @@ jobs: | |
| |:---:|:---:|:---:|:---| | ||
| | <img src="https://www.svgrepo.com/download/473700/linux.svg" width="50"/> | x86_64 | [bera-reth-${{ env.VERSION }}-x86_64-unknown-linux-gnu.tar.gz](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/bera-reth-${{ env.VERSION }}-x86_64-unknown-linux-gnu.tar.gz) | [PGP Signature](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/bera-reth-${{ env.VERSION }}-x86_64-unknown-linux-gnu.tar.gz.asc) | | ||
| | <img src="https://www.svgrepo.com/download/473700/linux.svg" width="50"/> | aarch64 | [bera-reth-${{ env.VERSION }}-aarch64-unknown-linux-gnu.tar.gz](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/bera-reth-${{ env.VERSION }}-aarch64-unknown-linux-gnu.tar.gz) | [PGP Signature](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/bera-reth-${{ env.VERSION }}-aarch64-unknown-linux-gnu.tar.gz.asc) | | ||
| | <img src="https://www.svgrepo.com/download/473712/macos.svg" width="50"/> | aarch64 | [bera-reth-${{ env.VERSION }}-aarch64-apple-darwin.tar.gz](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/bera-reth-${{ env.VERSION }}-aarch64-apple-darwin.tar.gz) | [PGP Signature](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/bera-reth-${{ env.VERSION }}-aarch64-apple-darwin.tar.gz.asc) | | ||
| | <img src="https://www.svgrepo.com/download/473589/docker.svg" width="50"/> | Docker | [${{ env.IMAGE_NAME }}](${{ env.DOCKER_IMAGE_NAME_URL }}) | - | | ||
| ENDBODY | ||
| ) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -96,6 +96,10 @@ build-x86_64-unknown-linux-gnu: ## Build bera-reth for x86_64-unknown-linux-gnu | |
| build-aarch64-unknown-linux-gnu: ## Build bera-reth for aarch64-unknown-linux-gnu | ||
| 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 commentThe reason will be displayed to describe this comment to others. Learn more. this isn't being used in CI anywhere (in release.yml)
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's for practicality of: |
||
| cargo build --target aarch64-apple-darwin --features "$(FEATURES)" --profile "$(PROFILE)" | ||
|
|
||
| ############################################################################### | ||
| ### Development ### | ||
| ############################################################################### | ||
|
|
||
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-moldis 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@v1onruns-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
moldformula notes Mach-O support removed (formulae.brew.sh)Citations:
🏁 Script executed:
Repository: berachain/bera-reth
Length of output: 425
🏁 Script executed:
Repository: berachain/bera-reth
Length of output: 13003
Guard
setup-moldto Linux runners.The
setup-moldaction 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