alan-turing-institute / whatwhat

A reimagining of nowwhat in OCaml
MIT License
0 stars 0 forks source link

Use github actions to create binaries #97

Closed KatrionaGoldmann closed 1 year ago

yongrenjie commented 1 year ago

As we discovered, this can't be easily done because GitHub Actions doesn't have M1 runners.

The alternative would be to cross-compile, but that's one for the future...!

yongrenjie commented 1 year ago

GitHub Actions does have M1 runners now, but they cost money (even for the ATI organisation!) I accidentally charged the Turing £7.50 by testing out the runners before discovering this 🥲

The current solution is to build the binaries locally on anyone's M1 Mac. This is now automated in bin/update.ml. The code could be a lot better but it works(!) So, running dune exec update_whatwhat will handle the entire update process incl. building the bottle, uploading the bottle to a new release, and updating the Homebrew tap 🙂

This is probably the best we can do until they make M1 runners free, so I think we can consider this completed, and revisit it in the future if needed. (And the nice thing is that if they ever make it free, the GitHub Action can simply consist of checking out the repository and running dune exec update_whatwhat)