Skip to content
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

ci: build for macos arm #42

Closed
wants to merge 11 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
test-bot:
strategy:
matrix:
os: [ubuntu-22.04, macos-13]
os: [ubuntu-22.04, macos-13, macos-14]
runs-on: ${{ matrix.os }}
steps:
- name: Set up Homebrew
Expand Down
19 changes: 12 additions & 7 deletions Formula/reth.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,23 @@ class Reth < Formula
strategy :github_latest
end

bottle do
Copy link
Member Author

Choose a reason for hiding this comment

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

i removed this to have it regen the bottles

root_url "https://github.com/paradigmxyz/homebrew-brew/releases/download/reth-0.2.0-beta.6"
sha256 cellar: :any_skip_relocation, x86_64_linux: "7b9c2d91b6ae69b5deace9d2678cec9e843bac772080bdc8191b9a49919d1111"
end

depends_on "llvm" => :build
Copy link
Member Author

Choose a reason for hiding this comment

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

i removed this because it was actually silently causing artifacts to go missing for x86 mac due to llvm already being installed by rust, just a diff version - so the linker would get confused 🤷🏻

depends_on "pkg-config" => :build
depends_on "rust" => :build

def install
features = []
features.push("jemalloc") if Hardware::CPU.intel? || OS.mac?

is_arm_linux = Hardware::CPU.arm? && OS.linux?
features.push("asm-keccak") unless is_arm_linux

cd "bin/reth" do
system "cargo", "install", "--bin", "reth", "--profile", "maxperf", "--features", "jemalloc", *std_cargo_args
if features.any?
system "cargo", "install", "--bin", "reth", "--profile", "maxperf",
"--features", features.join(" "), *std_cargo_args
else
system "cargo", "install", "--bin", "reth", "--profile", "maxperf", *std_cargo_args
end
end
end

Expand Down
Loading