You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add ARM + MacOS target to be able to use on self-hosted runners #805
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
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.
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:
Reacted by Denis Tuzhik, Ugo Arangino, Daniel Lamando, Olivier Grisel, Andrey Lushnikov, Dennis Ameling, Shenghang Tsai, Demian, Yuanming Hu, Christopher Drum and 13 more
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 😆
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.
Reacted by Andrey Lushnikov, Nikolay Edigaryev, Fedor Korotkov, Aleksey Mikhailov, Jan Piotrowski, Dj, Nantris, Axel Huebl and Jiun Kim
@thboop This is mainly about deployment, not ongoing maintenance, which I'm happy to let the runner handle automatically. Most of this isn't GitHub's problem since there's no good solution for deploying macOS build nodes, but I use Ansible to deploy files and run commands when setting up nodes. Having to constantly determine which architecture I'm on to pull the right file is something I try to avoid, but it looks like it's unavoidable here. I'd also like to avoid hardcoding versions but an API call is too much for my limited Ansible knowledge.
What I'd really like is for the runner software to be available through brew so I can install and manage it like everything else, but I realize that would require a different configuration for that deployment vs. the manual deployment.
@thboop Also, it looks like the "Add Runner" interface still only allows x64 runners, so that needs to be updated as well. Thankfully that just customizes the directions.
The downside of Universal binaries would be the package size since the dotnet runtime size will be doubled and we need to package multiple versions of node.js with the runner. 😢 (x64 node + arm64 node) *2 (if we support node 16 + node 20 in the future)
From the current release that would be 136.2MB. This is trivial, especially since it's only downloaded on install or update. Of course, if you're building a VM from scratch every day that can add up, but for hardware runners it doesn't seem to be an issue. Plus you could keep offering the architecture-specific downloads at the same time.
Reacted by Λlisue, Francisco Fabián González, Tyler Hendrickson, Axel Huebl, Ross Gustafson, Robin Binder, Anderson Laverde , David Brittain, Yerkebulan Tulibergenov, Amadej Papež and 9 more
Reacted by Dr Nic Williams, Eric Dallo, Amadej Papež, Yerkebulan Tulibergenov, Suraj, Luke Pighetti and jk2K
Reacted by Amadej Papež, Dr Nic Williams, Eric Dallo, Yerkebulan Tulibergenov, Suraj, Luke Pighetti and Alexey Palazhchenko
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.
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!
Reacted by Robbie Blaine, James Swift, Suraj, Jeff L., Till Krüss, Bret Fisher, Jerry Zhang, Masaki Hara, cwegener, Matin Zadeh Dolatabad and 1 more
Reacted by Masaki Hara
Reacted by Eric Dallo, Suraj, Jeff L., Suresh, Bret Fisher, Ingu Kang, cwegener and Simon Schick
@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.
@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!)
Reacted by Robbie Blaine, Michiel Borkent, Suraj, Jeff L., Bret Fisher and August
Reacted by Jorge Romero and fdo
Reacted by Robbie Blaine, Michiel Borkent, Suraj, Jeff L. and Bret Fisher
Activity
senorflor commentedon Nov 12, 2020
(seems like dotnet/core#4879 is entailed, though)
michaelst commentedon Nov 18, 2020
for now you can run it with
arch -x86_64at the beginning of the commandsfor example
paulz commentedon Dec 7, 2020
the arch did not help us:
we are using preview version of the new Mac mini:
devops: add ability to skip architecture enforcement
devops: add ability to skip architecture enforcement (#4644)
devops: add old-fashioned scripts to run Mac M1 buildbot (#4649)
MikeMcQuaid commentedon Dec 9, 2020
@paulz do you have Rosetta 2 installed? It's working for us on Homebrew.
gregorymfoster commentedon Dec 9, 2020
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 commentedon 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:
The big win came from realizing that
archcan 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 commentedon 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 outputarm64for AS andx86_64for Intel. I suspect that you can just run all the bash commands from within the runner prefixed witharch -$(uname -m) my_commandand 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 -mfrom within Rosetta 2 it will outputx86_64😆smorimoto commentedon Jan 29, 2021
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 commentedon Feb 24, 2021
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 commentedon Mar 4, 2021
Has anyone got this working?
paulz commentedon Mar 4, 2021
We have Apple silicon Mac mini as self hosted runner working
65 remaining items
jshier commentedon May 25, 2022
@thboop This is mainly about deployment, not ongoing maintenance, which I'm happy to let the runner handle automatically. Most of this isn't GitHub's problem since there's no good solution for deploying macOS build nodes, but I use Ansible to deploy files and run commands when setting up nodes. Having to constantly determine which architecture I'm on to pull the right file is something I try to avoid, but it looks like it's unavoidable here. I'd also like to avoid hardcoding versions but an API call is too much for my limited Ansible knowledge.
What I'd really like is for the runner software to be available through
brewso I can install and manage it like everything else, but I realize that would require a different configuration for that deployment vs. the manual deployment.jshier commentedon May 25, 2022
@thboop Also, it looks like the "Add Runner" interface still only allows x64 runners, so that needs to be updated as well. Thankfully that just customizes the directions.
TingluoHuang commentedon May 25, 2022
The downside of
Universal binarieswould be the package size since the dotnet runtime size will be doubled and we need to package multiple versions of node.js with the runner. 😢(x64 node + arm64 node) *2(if we support node 16 + node 20 in the future)jshier commentedon May 25, 2022
From the current release that would be 136.2MB. This is trivial, especially since it's only downloaded on install or update. Of course, if you're building a VM from scratch every day that can add up, but for hardware runners it doesn't seem to be an issue. Plus you could keep offering the architecture-specific downloads at the same time.
aaronsarkissian commentedon Jul 6, 2022
Just went for it today, and it works fine and available in the UI interface to choose from.
Steve-Glass commentedon Aug 9, 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/
andreped commentedon Sep 22, 2022
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 commentedon Oct 10, 2022
You need to add the runner under organisation settings/actions/runners. It needs approving from github though..
andreped commentedon Oct 10, 2022
@robtaylor I'm talking about
GitHub-hostedrunners, 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 commentedon Oct 10, 2022
andreped commentedon Oct 10, 2022
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 commentedon 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 commentedon Feb 21, 2023
@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 commentedon 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!)