Skip to content

add homebrew taps #292

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

add homebrew taps #292

wants to merge 2 commits into from

Conversation

mikelxc
Copy link

@mikelxc mikelxc commented Apr 26, 2025

Add Homebrew Formula for Revive Solidity Compiler (resolc)

This PR adds a Homebrew Formula for the Revive Solidity Compiler (resolc), making it easily installable on macOS systems.

Changes

  • Added Formula/resolc.rb with support for binary installation
  • Added GitHub workflow to automatically update the Formula on new releases
  • Includes necessary steps to handle unsigned macOS binaries using xattr -c

Installation

Once merged, users can install resolc using:

brew tap paritytech/revive
brew install resolc

Notes

  • The Formula uses the pre-built binary from GitHub releases
  • Includes automatic SHA256 verification for security
  • The GitHub workflow will automatically update the Formula when new releases are published

Testing

The Formula has been tested with the latest release (v0.1.0-dev.14) and includes a basic test to verify the installation.

To update the formula:

1. Create a new release on GitHub
2. Update the `url` and `sha256` in `Formula/resolc.rb`
Copy link
Member

Choose a reason for hiding this comment

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

Stale comment? This should be handled by the github workflow?

Comment on lines +8 to +10
# If someone wants to build from latest source:
head "https://github.com/paritytech/revive.git", branch: "master"
depends_on "llvm@18" => :build if build.head? # only needed when building from source
Copy link
Member

Choose a reason for hiding this comment

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

This won't work because we need our custom LLVM in order to build resolc. So either remove or add a second Formula for our LLVM build. We also do binary releases of those in our repo.


jobs:
update-formula:
runs-on: ubuntu-latest
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
runs-on: ubuntu-latest
runs-on: ubuntu-24.04

We use fixed version by convention.

Comment on lines +29 to +32
run: |
# Get the release version and SHA256
VERSION=$(echo ${{ github.ref }} | sed 's/refs\/tags\/v//')
SHA256=$(curl -sL https://github.com/paritytech/revive/archive/refs/tags/v${VERSION}.tar.gz | shasum -a 256 | cut -d' ' -f1)
Copy link
Member

Choose a reason for hiding this comment

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

We also do LLVM releases from this repo. So we need to detect this here and skip if it is a LLVM release.

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