cargo-dist
cargo-dist copied to clipboard
homebrew installation command issue
Dear cargo-dist community,
Congratulations for this work, it is amazing!
Sorry for the stupid question. I have a cargo dist GitHub pipeline in which I added the Homebrew installer https://github.com/eth-cscs/manta/blob/main/Cargo.toml#L101 . I can see the .rb file with the brew formulae, the release Github page says:
Install prebuilt binaries via Homebrew
brew install manta
However I can't find the part of the Github pipeline which uploads the artifact to the brew repository, I have the impression the command to run would be brew install --build-from-source ...?
thank you very much
hi @Masber - i used to be a middle school teacher ;) no stupid questions. so you have selected the homebrew installer, so it is getting built (the .rb file) BUT you haven't provided the config for a homebrew tap, and so you are correct that it's not there!
so i think there's a few questions i have to make sure i can point you in the right direction and also to make sure we are handling homebrew correctly
publish to a tap
many folks have a github repo that is considered a "tap" that allows you to have a brew install tap/formula install (this is what cargo-dist does!). to be honest, this is what i would recommend that you do (assuming i'm not missing important details of your particular situation, which i may be). to set this up- you'll need to create an empty repo on github, and then set this config to point to that repo:
tap = "axodotdev/homebrew-formulae"
publish-jobs = ["homebrew"]
it's worth noting here that you'll need to generate a github personal access token with "repo" access and set and action secret called HOMEBREW_TAP_TOKEN, so that we have push to publish to the repo.
this is explained in the docs here: https://opensource.axo.dev/cargo-dist/book/installers/homebrew.html
command if not publishing to a tap
i didn't know about the build from source flag for brew- i defer to our expert @mistydemeo on this. i suspect that you wouldn't want to suggest build from source, as the installer you just built points at pre-compiled binaries. i suspect that the command would be something closer to brew install file.rb but i'll have to do a little research to see what that would need to be!
if you don't want to publish to a tap i would be curious to learn why you don't! it seems to be to be a pure win, but i'm always interested in hearing other perspectives.