rstudio / r-builds

an opinionated environment for compiling R
GNU General Public License v3.0
101 stars 19 forks source link

Support arm64 builds #152

Closed gaborcsardi closed 1 year ago

gaborcsardi commented 1 year ago

This is currently experimental. Right now it does work fine on my arm64 Macbook, but probably more changes are needed for building arm64 packages on our CI and for deployment, and docs as well.

gaborcsardi commented 1 year ago

Related: #149.

gaborcsardi commented 1 year ago

Actually, it doesn't work yet, the final deb/rpm package is not marked as arm64 currently.

gaborcsardi commented 1 year ago

OK, it works now. I checked some RPM and DEB packages manually.

gaborcsardi commented 1 year ago

I build arm64 packages for a bunch of R versions. They are here: https://github.com/r-hub/R/releases

IDK if we want to make arm64 packages "official" and/or if we want to move them to our storage space.

Nevertheless, these packages are pretty useful for me and potentially others with an arm64 laptop.

gaborcsardi commented 1 year ago

which I bet would be much easier as the docker actions already support cross-platform building.

It is indeed not too bad to set this up, e.g. https://github.com/r-hub/r-minimal has arm64 builds: https://github.com/r-hub/r-minimal/actions/runs/3899975536/workflow#L58-L62 https://github.com/r-hub/r-minimal/actions/runs/3899975536/workflow#L81-L88 and this already pushes to Docker hub and ghcr.io: https://github.com/r-hub/r-minimal/actions/runs/3899975536/workflow#L45-L56

The only issue is that they are very slow, it takes almost an hour to build this very minimal version of R. Nevertheless it probably makes sense to set up a GHA workflow to do the daily next and devel arm64 builds on GHA and then publish them at https://github.com/r-hub/R/releases for now.

gaborcsardi commented 1 year ago

@glin Thanks for the review!