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

Use Ubuntu 22.04 arm64 runners to build on Linux arm64 #138

Merged
merged 3 commits into from
Jan 24, 2025

Conversation

samuong
Copy link
Owner

@samuong samuong commented Jan 20, 2025

No description provided.

@camh-
Copy link
Collaborator

camh- commented Jan 23, 2025

I was just replying on the other now-merged PR about how to get cross-compiling going and was going to add a linux/arm64 build to CI but I see it is already there, and now I see this PR that updates it. What I was going to post was:

Cross compiling should not be too hard - you just need the arm64 compiler installed and to set CC=<cross-compiler> during the build.

The runners you are running on are Ubuntu 20.04, so installing the apt package gcc-10-aarch64-linux-gnu in a setup step in the matrix for the linux/arm64 build and setting CC=aarch64-linux-gnu-gcc-10 in the environment should make it work. You may also want a comment to update this version if you update the version of the ubuntu runner.

But I decided rather than just writing about it, I'd do it. camh-@7b4a1d5 is the result which does not require an arm runner. Feel free to take that if you prefer to use amd64 runners if contention for the arm64 runners gets too much.

@samuong
Copy link
Owner Author

samuong commented Jan 24, 2025

Hi Cam, thanks for that! Actually I made a mistake, there isn't any contention for runners, this was just due to a copy and paste error on my part (explained below). So I'm planning to use the arm64 runners, but I appreciate the tip on how to do cross compilation.

The first commit in this PR (1d14f79) uses the ubuntu-20.04-arm runner (which matches the Ubuntu version we use for amd64) but GitHub only supports ubuntu-22.04-arm and ubuntu-24.04-arm. I changed this to ubuntu-22.04-arm in ef4031e and it ran in 23s, which is even faster than the Mac and Windows runners.

@samuong samuong changed the title Update ci.yml Use Ubuntu 22.04 arm64 runners to build on Linux arm64 Jan 24, 2025
@samuong samuong mentioned this pull request Jan 24, 2025
@samuong samuong merged commit 1cdee3c into master Jan 24, 2025
11 checks passed
@samuong samuong deleted the linux-arm64-builds branch January 24, 2025 03:37
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