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

Add ARM + MacOS target to be able to use on self-hosted runners #805

Closed
Tracked by #723
senorflor opened this issue Nov 12, 2020 · 83 comments
Closed
Tracked by #723

Add ARM + MacOS target to be able to use on self-hosted runners #805

senorflor opened this issue Nov 12, 2020 · 83 comments
Assignees
Labels
enhancement New feature or request Runner Feature Feature scope to the runner

Comments

@senorflor
Copy link

Describe the enhancement
A new architecture+OS build target to enable adding runners on the new Apple Silicon (ARM) Macs.

Additional information
This would be useful both for GitHub-hosted and self-hosted runners. I have no idea how much work would be necessary :)

@senorflor senorflor added the enhancement New feature or request label Nov 12, 2020
@senorflor
Copy link
Author

(seems like dotnet/core#4879 is entailed, though)

@michaelst
Copy link

for now you can run it with arch -x86_64 at the beginning of the commands

for example

arch -x86_64 ./config.sh ...
arch -x86_64 ./run.sh

@paulz
Copy link

paulz commented Dec 7, 2020

the arch did not help us:

arch -x86_64  ./config.sh --url https://github.com/sparta-science --token <GENERATED-TOKEN>
arch: posix_spawnp: ./config.sh: Bad CPU type in executable

we are using preview version of the new Mac mini:

uname -v
Darwin Kernel Version 20.1.0: Sat Oct 31 00:07:18 PDT 2020; root:xnu-7195.50.7~2/RELEASE_ARM64_T8020

aslushnikov added a commit to aslushnikov/playwright that referenced this issue Dec 9, 2020
Github self-hosted runners currently run under rosetta:
actions/runner#805

This patch is an attempt to build arm webkit from-inside rosetta
shell on arm hardware.
aslushnikov added a commit to microsoft/playwright that referenced this issue Dec 9, 2020
Github self-hosted runners currently run under rosetta:
actions/runner#805

This patch is an attempt to build arm webkit from-inside rosetta
shell on arm hardware.
aslushnikov added a commit to microsoft/playwright that referenced this issue Dec 9, 2020
Even though we're undergoing migration to GitHub self-hosted runners,
they don't currently support running natively under Arm. The resulting build ends up to be
x86_64.

See actions/runner#805
@MikeMcQuaid
Copy link

@paulz do you have Rosetta 2 installed? It's working for us on Homebrew.

@gregorymfoster
Copy link

At my company, we use mac mini's + github actions to trigger xcodebuild in order to run XCUITests. By starting the github action runner, we find that all subprocesses also boot in Rosetta, causing the xcodebuild to create x86 artifacts. The mac mini is then unable to run the XCUITest because it only supports arm iOS simulators.

When we boot xcode without rosetta by hand, the tests run fine. We'd really appreciate it if Github added support for ARM + MacOS target.

cc @tomasreimers

@gregorymfoster
Copy link

gregorymfoster commented Dec 14, 2020

Made forward progress here. We are able to boot the runner using intel emulation, and then escape the emulation when our CI script calls xcodebuild using:

arch -arm64 /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild ...

The big win came from realizing that arch can be used to escape emulation, though it's not documented.

Detailed writeup here: https://gregmfoster.medium.com/using-m1-mac-minis-to-power-our-github-actions-ios-ci-540c55af13ea

@violet-athena
Copy link

violet-athena commented Jan 4, 2021

Just an addendum to @gregorymfoster's post. You can find out which architecture you are running on your mac with uname -m. This will output arm64 for AS and x86_64 for Intel. I suspect that you can just run all the bash commands from within the runner prefixed with arch -$(uname -m) my_command and this code will execute for the appropriate platform.

Maybe this can act as a substitute until the team provides an arm64 compiled version for the M1?

EDIT: just realised that if you call uname -m from within Rosetta 2 it will output x86_64 😆

@smorimoto
Copy link

Note that if you launch the Actions runner though Rosetta, everything executed internally will be in x86_64 mode. Maybe that's not what you're trying to do, and there's no easy way to address it at this point. I recommend using a self-host runner on Cirrus CI for the time being.

@smorimoto
Copy link

It will be officially released in November, so it will be a long time until we can build using the stable release, but I think we will be able to officially support Apple Silicon in .NET 6: https://devblogs.microsoft.com/dotnet/announcing-net-6-preview-1

@ioquatix
Copy link

ioquatix commented Mar 4, 2021

Has anyone got this working?

@aaronsarkissian
Copy link

Just went for it today, and it works fine and available in the UI interface to choose from.

@Steve-Glass
Copy link

👋 official support is now GA! You can find additional details in the change log post here: https://github.blog/changelog/2022-08-09-github-actions-self-hosted-runners-now-support-apple-m1-hardware/

@andreped
Copy link

andreped commented Sep 22, 2022

👋 official support is now GA! You can find additional details in the change log post here: https://github.blog/changelog/2022-08-09-github-actions-self-hosted-runners-now-support-apple-m1-hardware/

Any update on GitHub-hosted runners? I don't own a macbook with M1-chip myself, but sadly lots of users do.


EDIT: I am also aware that according to this, it should be possible to enable M1 silicon options for GitHub-hosted runners, but how do I enable it?

@robtaylor
Copy link

EDIT: I am also aware that according to this, it should be possible to enable M1 silicon options for GitHub-hosted runners, but how do I enable it?

You need to add the runner under organisation settings/actions/runners. It needs approving from github though..

@andreped
Copy link

You need to add the runner under organisation settings/actions/runners. It needs approving from github though..

@robtaylor I'm talking about GitHub-hosted runners, not self-hosted/local runners.

What Im talking about was mentioned here:
github/roadmap#528

I guess it is just part of the roadmap and not yet supported. However, would be great to have an update.

@robtaylor
Copy link

robtaylor commented Oct 10, 2022 via email

@andreped
Copy link

andreped commented Oct 10, 2022

There’s now a button to add a GitHub hosted runner!

I think you misunderstand what I want. I want this:
actions/runner-images#2187

Perhaps I was a little unclear. I don't see that this is supported as of now. By checking one of my org's settings/actions/runners, I also did not see such a button.

@nebuk89
Copy link

nebuk89 commented Feb 21, 2023

As per the roadmap we are targeting some time later this year for GitHub hosted M1 support :)
We have nothing public on this yet, but thanks for your interest and watch this space.. it is coming!

@borkdude
Copy link

@nebuk89 This is good to hear! It's the main reason I'm using Cirrus CI now in addition to Github. Will Github also support creating linux arm64 binaries? This would complete the full spectrum for my needs.

@nebuk89
Copy link

nebuk89 commented Feb 21, 2023

@borkdude a fair ask! We intend to 'at some point' but honestly - I need to start planning it 😁 as a result I don't have a timeframe for it right now 😞 (we will also do Win arm64 as well 😱 but it's in the same state of needing the plan creating!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Runner Feature Feature scope to the runner
Projects
None yet
Development

No branches or pull requests