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

CI: Add Apple Silicon (macOS aarch64) to the CI matrix #505

Merged
merged 20 commits into from
Feb 21, 2024
Merged

Conversation

ViralBShah
Copy link
Member

@ViralBShah ViralBShah commented Feb 6, 2024

GitHub Actions now offers free Apple Silicon macOS runners for public repositories:

Today, GitHub is excited to announce the launch of a new M1 macOS runner! This runner is available for all plans, free in public repositories, and eligible to consume included free plan minutes in private repositories. The new runner executes Actions workflows with a 3 vCPU, 7 GB RAM, and 14 GB of storage VM, which provides the latest Mac hardware Actions has to offer. The new runner operates exclusively on macOS 14 and to use it, simply update the runs-on key in your YAML workflow file to macos-14.

https://github.blog/changelog/2024-01-30-github-actions-introducing-the-new-m1-macos-runner-available-to-open-source/

https://discourse.julialang.org/t/github-actions-now-offers-free-apple-silicon-macos-runners-for-public-repositories/109641

@ViralBShah
Copy link
Member Author

@DilumAluthge Do you know how to enable apple silicon support? Apparently the path being constructed is incorrect.

@ViralBShah ViralBShah marked this pull request as draft February 6, 2024 18:56
@ViralBShah
Copy link
Member Author

ViralBShah commented Feb 7, 2024

@DilumAluthge
Copy link
Contributor

Okay, so this is what I see:

Run julia-actions/setup-julia@v1
  with:
    version: nightly
    arch: ARM64
    include-all-prereleases: false
    show-versioninfo: false
Download of https://julialangnightlies-s3.julialang.org/bin/mac/aarch64/julia-latest-mac64.tar.gz failed, trying again. Error: Error: Unexpected HTTP response: 404

That is, we are calling julia-actions/setup-julia with the input arch: ARM64, but setup-julia is trying the URL https://julialangnightlies-s3.julialang.org/bin/mac/aarch64/julia-latest-mac64.tar.gz.

I think this is a bug in setup-julia, but I'm not sure. @SaschaMann Any ideas?

Also cc: @staticfloat to take a look at the S3 download URL.

Copy link

codecov bot commented Feb 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (cb602d7) 84.60% compared to head (a482506) 84.26%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #505      +/-   ##
==========================================
- Coverage   84.60%   84.26%   -0.34%     
==========================================
  Files          12       12              
  Lines        9122     9122              
==========================================
- Hits         7718     7687      -31     
- Misses       1404     1435      +31     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@DilumAluthge
Copy link
Contributor

Just a quick aside about the determine-julia-arch stuff. That stuff is only necessary because we want some of our CI jobs to test 32-bit Julia.

If we only wanted to test on 64-bit Julia (whether x86_64 or aarch64), then we could get rid of all of the determine-julia-arch stuff, and we could just set the arch to ${{ runner.arch }}, which GitHub Actions automatically sets to the correct value.

@ViralBShah
Copy link
Member Author

ViralBShah commented Feb 13, 2024

julia-actions/setup-julia#220 implements support for M1.

@DilumAluthge I am still unsure of the exact way to enable M1 in the CI once setup-julia releases a new version upstream. Would love it if you can help get it going here (once it is available upstream).

@DilumAluthge
Copy link
Contributor

Yeah, I'll update this branch once a new release is made upstream.

@DilumAluthge
Copy link
Contributor

Looks like we're now downloading the correct aarch64 Julia. Huge thanks to @IanButterworth for cutting a new release of setup-julia.

@ViralBShah I need to clean up this PR quite a bit, but then we can merge it.

@DilumAluthge DilumAluthge changed the title Update ci.yml to use Apple Silicon CI: Add Apple Silicon (macOS aarch64) to the CI matrix Feb 13, 2024
@ViralBShah
Copy link
Member Author

ViralBShah commented Feb 13, 2024

I don't understand the PR. I thought OS should have mac/windows/linux, and arch should have x86, x64, aarch64, etc. But now, macos is in arch.

I suppose this is under experimentation and will settle down eventually.

@ViralBShah
Copy link
Member Author

Maybe listing all the things to include may be easier than listing all the things to exclude :-)

@ViralBShah
Copy link
Member Author

@DilumAluthge Is this the final state of the CI file to commit? I think it has some experimentation code, that can perhaps be removed. Would be nice to get this merged.

@DilumAluthge
Copy link
Contributor

A lot of the echos are just for debugging, and can likely be removed. But honestly we could merge this as is and clean it up later.

@DilumAluthge DilumAluthge marked this pull request as ready for review February 21, 2024 05:25
@ViralBShah
Copy link
Member Author

Thanks @DilumAluthge. I was hoping that adding M1 runners would be simpler - like just adding a new arch or something to the matrix. I suppose as the M1 runner support matures in our infra, it will become easier, at which point I can add it to various other packages.

@IanButterworth
Copy link
Contributor

@ViralBShah take a look at how Pkg did it JuliaLang/Pkg.jl#3793

@ViralBShah
Copy link
Member Author

@ViralBShah take a look at how Pkg did it JuliaLang/Pkg.jl#3793

Thanks - that was exactly what I was looking for.

@ViralBShah ViralBShah merged commit a5e95ec into main Feb 21, 2024
6 of 9 checks passed
@ViralBShah ViralBShah deleted the vs/ci-m1 branch February 21, 2024 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants