harmony-one / bounties

Bounty program is to help the community take part in the development of the Harmony blockchain. It covers from core feature to validator tooling, from dApp development to DeFi integration.
MIT License
59 stars 23 forks source link

Mac OS: Support brew installation for Harmony #69

Open jacksteroo opened 2 years ago

jacksteroo commented 2 years ago

Description

Package our binary, for brew. Or in brew terms, "Bottle Harmony One binaries into Brew Casks!". For example, brew install harmony-one should initiate installation of Harmony binaries alongside all the dependencies. Also allow the installation to be pinned to a certain version.

Context

This encourages ease of development and testing, and further helps with decentralizing the ecosystem. See Brew documentation for more info.

Acceptance Criteria

Reward

USD $500 (in ONEs)

cylim commented 2 years ago

What is suppose to pack into the bottle? The Harmony CLI?

cylim commented 2 years ago

Due to the harmony-one/go-sdk doesn't met minimum requirements for publish to Homebrew, I am using harmony-one/harmony as the base.

According the Homebrew, Notable enough repo should have >30 forks, >30 watchers and >75 stars.

Besides that, when running hmy <command>, it is showing a warning message, which should be related to
https://github.com/harmony-one/go-sdk/issues/256#issuecomment-851016270

Warning: Using outdated version. Redownload to upgrade to v417-bc3f026

A new formula PR is created for homebrew/core: https://github.com/Homebrew/homebrew-core/pull/85856. Documents for updating the formula is not created yet, will wait for the PR approval. This might work for Linux too, I can't be sure about it due to I didn't test it on any Linux distros.

cylim commented 2 years ago

@LeoHChen May I know what is the reasons why the latest harmony-one/go-sdk github actions removed the ARM64 build. https://github.com/harmony-one/go-sdk/compare/v1.2.6...v1.2.7 I can't debugging the homebrew formula for arm64 due to I don't have the required device for testing, so I have set the arch to x86 only, but homebrew team is asking about it.

cylim commented 2 years ago

PR for a bug related to Go 1.17 on MacOS: https://github.com/harmony-one/go-sdk/pull/270

Need to figure out what is the issues with arm64, unfortunately, I don't have a M1 Macbook.

gitcoinbot commented 2 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


This issue now has a funding of 3426.2931 ONE (502.66 USD @ $0.15/ONE) attached to it.

gitcoinbot commented 2 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work has been started.

These users each claimed they can complete the work by 265 years, 1 month from now. Please review their action plans below:

1) cylim has started work.

  1. Create Homebrew Bottle
  2. Fix bugs for Linux Build (Yes, homebrew can be use in Linux now)
  3. Fix bugs in Go SDK for Go 1.17 and arm64 Mac
  4. Get PR approval from Homebrew
  5. Create Doc for Harmony about how to upgrade dependencies and main package

We can discuss about it at https://github.com/harmony-one/bounties/issues/69

Learn more on the Gitcoin Issue Details page.

cylim commented 2 years ago

@LeoHChen just in case if you didn't saw my comments ealier, I had summarize to three items.

Questions/Note

  1. Main Package is using Harmony not go-sdk - The go-sdk doesn't met minimum requirements (>30 forks, >30 watchers and >75 stars)
  2. Go 1.17 Support - Pending PR review (https://github.com/harmony-one/go-sdk/pull/270)
  3. ARM64 Support - Pending Feedback from Go-sdk (https://github.com/harmony-one/go-sdk/issues/271)
LeoHChen commented 2 years ago

@cylim to package the harmony node program, not just the hmycli

cylim commented 2 years ago

@LeoHChen which repo is for the node? The formula has included harmony, bls, mcl and go-sdk to ensure it is working correctly.

LeoHChen commented 2 years ago

@cylim https://github.com/harmony-one/harmony

LeoHChen commented 2 years ago

for go-sdk, I am asking for our dev community support to have more star, and forks.

cylim commented 2 years ago

@LeoHChen All good. The 4 dependencies are all included in one formula. It is just whether we want to use harmony or go-sdk as the base, because the upgrading process is slightly different. I would prefer to use go-sdk as the base, because the hmy cli command is exposed from go-sdk. which it required (>30 forks, >30 watchers and >75 stars) to become the base of a brew formula. 😄

GraoMelo commented 2 years ago

@jacksteroo

your project has many conflicting dependencies.

not compilede for mac os.. then nothing of brew.

` honnef.co/go/tools v0.0.1-2020.1.5 // indirect )

replace github.com/ethereum/go-ethereum => github.com/ethereum/go-ethereum v1.9.9`

what?

or better:

https://github.com/harmony-one/mcl.git compile only windows.

https://github.com/harmony-one/bls.git compile only windows too.

so how to create a precompiled package for mac os if it doesnt compile?

cylim commented 2 years ago

@GraoMelo The project had passed CI/CD and successfully installed in different MacOS and Linux.

The issues we are facing now is there is too many hardcoded path in the Makefile or script files, and Homebrew prefer to do it the Go Module way.

https://github.com/Homebrew/homebrew-core/pull/87031

klngrs commented 2 years ago

@jacksteroo - Figured I'd get my feet wet looking at this.

In the spirit of eliminating manual processes on the part of the Harmony core team or manual processes with every release, what are your thoughts on:

Edit the harmony release github action to:

  1. Fork/Checkout homebrew core
  2. Create a branch w/ the name of the Harmony release number
  3. Edit the homebrew formula with the updated release info / shas
  4. Submit a PR to homebrew in an automated fashion
gitcoinbot commented 2 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work for 3426.2931 ONE (1077.45 USD @ $0.34/ONE) has been submitted by: