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 Windows ARM64 + Apple Silicon support #9691
Add Windows ARM64 + Apple Silicon support #9691
Conversation
Azure Pipelines build + tests now succeed on my ARM64 device (Surface Pro X) 🎉 https://dev.azure.com/fits4all/github-desktop/_build/results?buildId=507&view=logs&j=7df51adc-23f7-5bdc-263d-a9d9817a26b1 Thing is, the GitHub Desktop team would either need to get their hands on a Windows ARM64 device (like the Surface Pro X, the Electron and VS Code teams are doing this) or we could choose not to run tests in CI for ARM64 devices (for the time being) and just cross-compile to create an ARM64 build. I already created a feature request for the Azure DevOps team to start offering a hosted Windows ARM64 agent, but that might take a while, if they will consider doing that at all. https://developercommunity.visualstudio.com/idea/1015752/please-add-a-windows-arm64-hosted-agent.html |
Nice job! If you want an ARM64 version of node to speed up the tests, you can find pre-built versions at (for example) https://unofficial-builds.nodejs.org/download/release/v12.15.0/ |
@marswe Details
I'll patiently wait until nodejs/node#32867 is approved & merged. I managed to do some performance tweaking on my Surface Pro X and got the build + test time down to a total of ~32 mins. I think that's fine for the time being. |
To make the installer work on Windows ARM64, we'd need the PR attached in Squirrel/Squirrel.Windows#1616 to be merged, that would be the last major blocker to be able to build GitHub Desktop for ARM64 + an installer (not considering ARM64 tests in the CI pipeline, see #9691 (comment)) |
@dennisameling |
efff440
to
1c228d9
Compare
Just a quick update that this PR is waiting for Squirrel 2.0 to be released (Squirrel/Squirrel.Windows#1623). When that's done, I'll update this PR accordingly, will also fix the merge conflicts then. |
Awesome @dennisameling, thanks for letting us know. For context we've recently switched from appveyor and circle to GitHub Actions (#9680). Unfortunately it doesn't seem like GitHub Actions support self-hosted ARM64 runners on Windows (actions/runner-images#768) yet. |
@niik That should be OK, an amd64 host can also build ARM64 packages. AFAIK there aren't any cloud providers that offer ARM64 hosts yet. Only thing that isn't possible then is to run automated tests on ARM64, as that would need an ARM64 device. Hope that's OK for the time being; tests can of course run on amd64 as they do now. |
Squirrel 2.0 seems to have been released which should unblock this effort 🎉 |
Now all that's left is for So we'll have to wait a little longer for this I'm afraid 😞 |
1ad7bb3
to
abf8e34
Compare
@niik update: just rebased this PR and updated CI to GitHub Actions. I was able to build GitHub Desktop for Windows Here's the binary for anyone interested: https://github.com/dennisameling/desktop/releases/tag/2.5.6-arm64 I'll do some more investigation later. We anyway need to wait for some dependencies like electron/windows-installer#361 to be updated first, so expect that to take another month or two. At least this PR is up-to-date with the latest changes to GitHub Desktop now 👍 We might be able to combine this effort with releasing GitHub Desktop for Apple Silicon. The NodeJS and Electron teams are currently working on this as well. |
@dennisameling Thank you so much for your continued work on this! ❤️ https://github.com/desktop/registry-js I'd be happy to review a PR to add prebuilt arm64 binaries there but I imagine that would be similarly blocked by the lack of node arm64 builds. |
Yeah we'd run into the same issues there. Last NodeJS version that had arm64 binaries was 12.15.0 (https://unofficial-builds.nodejs.org/download/release/v12.15.0/win-arm64/). I've created an issue against nodejs/build to ask for new builds with arm64 binaries, since an issue regarding those was solved a few months ago. For now, we might get away with downloading the Let's wait a bit for a reply to my question in the nodejs/build repo, then happy to take next steps here. To be continued 😊 |
Update: I can't move forward with this until NodeJS publishes native ARM64 builds for Windows. They currently can't reliably run tests on ARM64 in their CI (they have two Surface Pro Xs in their office I believe), so they are waiting for Azure Pipelines/GitHub to release hosted ARM64 agents. Thing is, there's currently not a single CI provider that offers hosted Windows ARM64 machines AFAIK, so it might take multiple months before we can proceed with this 😞 Please, for anyone reading this, upvote this feature request for hosted Windows ARM64 agents in Azure DevOps and Windows ARM64 VMs in Azure, so that the NodeJS team can move on and release official ARM64 builds for Windows. I'll update this PR as soon as things are moving on the NodeJS side 👍 |
Great news! Is there a way for me to download this to use locally (while I wait for #11683 to be merged) |
I think the only option is that you build the app yourself locally 😅 I'll let you know when we build and deploy our own arm64 builds 😄 |
Gotcha haha - are there steps on how to do that? (And would I just pull to get updates) |
You have all the info you need here: https://github.com/desktop/desktop/blob/development/docs/contributing/setup.md Not sure if anything changes for arm64, though 😅 Please, let me know if any step is missing for M1! |
@trulyronak a PR to enhance the docs if needed would be greatly appreciated 😄. |
@dennisameling @trulyronak (or anyone else) if you want to give this a try:
Please, let me know if it works (and which specific platform you tested 😅 ) |
@sergiou87 can confirm it works on Windows ARM64! 🚀 |
Yay!! Thank you for testing it 😄 What you're looking for should be in https://github.com/desktop/desktop/blob/development/app/src/lib/editors/win32.ts You can read more about it in https://github.com/desktop/desktop/blob/development/docs/technical/editor-integration.md (which might need to be updated if Windows for arm64 requires different Registry keys to check 😅 ) |
Bingo - it's |
You're the best, thank you!!! 🙌 🙇♂️ |
I tried to open the macOS arm64 version (on my M1 MacBook Air) but the main window does not show up except when I click on something on the menu bar like File->New Repository but the window is just white and blank. Toggling the developer options shows the following error: I don't really know how to test it though and the logs are empty. |
Looks like keytar was built for x64 instead of arm64. Running |
@waffelcop good catch - I helped Keytar to release arm64 builds of their native plugin a while ago, but we had to revert it due to bugs in the build process: atom/node-keytar#346 - let me have a look at this in the coming days. GH Actions doesn't support MacOS 11 yet (actions/runner-images#2486) which has the option to build native binaries for arm64, but there's a trick I applied elsewhere to have it use the proper SDK for building arm64 as well. Will report back here in the coming weekend! |
We have been building native deps (including keytar) for arm64 Macs on a x64 Mac with |
|
yep same issue here — I ran into this when building and running locally as well. |
Have created a PR with a temporary fix for the keytar issue, more details here: #11969 This should fix the keytar issue, so we only have the fs-admin issue left. For anyone who would like to verify if the keytar module indeed has the right architecture now, please test https://github.com/dennisameling/desktop/releases/tag/2.7.3-test UPDATE: also working on a PR to migrate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ #.github/workflows/ci.yml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Help
Help |
finally, great! |
Closes #9034
Description
Requirements for cross-compilation from x64 to arm64:
Building for Windows ARM64
Running tests
In my test build, all tests have passed: yarn test:unit:cov, yarn test:script:cov, yarn test:integration.
Getting the installer to work
Squirrel has been updated to support Windows arm64, now we're only waiting for electron-winstaller to approve the PR that updates Squirrel: electron/windows-installer#361
Screenshots
No UI changes, but just to show that building + launching + login on Windows ARM works:
Release notes
Notes: Add Windows ARM build support