Skip to content
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

Support arm64 builds #152

Merged
merged 4 commits into from
Jan 12, 2023
Merged

Support arm64 builds #152

merged 4 commits into from
Jan 12, 2023

Conversation

gaborcsardi
Copy link
Contributor

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
Copy link
Contributor Author

Related: #149.

On Debian uname -p returns 'unknown'.
@gaborcsardi
Copy link
Contributor Author

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

@gaborcsardi
Copy link
Contributor Author

gaborcsardi commented Jan 10, 2023

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

@gaborcsardi gaborcsardi marked this pull request as ready for review January 11, 2023 13:34
@gaborcsardi
Copy link
Contributor Author

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 gaborcsardi requested a review from glin January 11, 2023 13:36
Copy link
Contributor

@glin glin left a comment

Choose a reason for hiding this comment

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

Looks good to me. I wonder why the GitHub Actions didn't run though, hmm. Probably because this is from a fork and the config doesn't have on.pull_request,

on:
push:
. I'll run it here just to double check the amd64 builds: https://github.com/rstudio/r-builds/compare/feature/arm64-pr?expand=1

For making the arm64 packages official, we don't have it in our platform support yet, but I think it's definitely coming as customer requests have been picking up, and IDE/Workbench is starting to provide arm64 builds now.

As for CI and deployment, I think there are more open questions around that. I'd guess that getting arm64 builds into the existing AWS infrastructure would work, but take some effort to figure out. We'll need to build the Docker images for arm64 in Jenkins, and then get Batch jobs running on the arm64 graviton instances probably. Or perhaps we want to start migrating to GitHub Actions (e.g. for #7), which I bet would be much easier as the docker actions already support cross-platform building.

For storage, the existing S3 buckets seem fine, and I believe we're also going to eventually (soon?) push these binaries to DEB/RPM repos on Cloudsmith.

@gaborcsardi
Copy link
Contributor Author

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
Copy link
Contributor Author

@glin Thanks for the review!

@gaborcsardi gaborcsardi merged commit 6e831a2 into rstudio:main Jan 12, 2023
@gaborcsardi gaborcsardi deleted the feature/arm64 branch January 12, 2023 08:46
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