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

Support Windows on ARM64 #268

Merged
merged 5 commits into from
Feb 10, 2025
Merged

Conversation

billti
Copy link
Contributor

@billti billti commented Feb 7, 2025

This is for issue #247 . Putting up for early review, but some testing on other platforms and a couple questions remain.

@billti
Copy link
Contributor Author

billti commented Feb 7, 2025

(Looks like the CI has been failing for a couple days unrelated to my change)

@billti
Copy link
Contributor Author

billti commented Feb 7, 2025

Actually I see in the runner image used for Windows (https://github.com/actions/runner-images/blob/win22/20250127.1/images/windows/Windows2022-Readme.md) that GCC is included. So I'll revert that change to using 'clang' on Windows, install that locally, and try again.

@billti
Copy link
Contributor Author

billti commented Feb 7, 2025

With the latest couple of commits and with 'gcc' installed locally via MSYS2 (as per the Windows CI build server), all tests are passing and the wheel is building successfully on my machine!

I've updated the main.yml with what is hopefully the prerequisite magic.

Copy link
Member

@alexcrichton alexcrichton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this!

@alexcrichton
Copy link
Member

CI failures here will get fixed in bytecodealliance/actions#15 (or so I'm hoping), so I'll take care of the CI bits for this in the near future.

@alexcrichton
Copy link
Member

Ok I think that CI failure might be legitimate?

@billti
Copy link
Contributor Author

billti commented Feb 9, 2025

Ugh. As well as platform.machine() not matching on arm64, looks like Windows has a different value to Linux/Mac for x64 as well (on Mac and Linux it's x86_64). Sigh...

C:\code>python -c "import platform;print(platform.system());print(platform.machine())"
Windows
AMD64

I've just realized that this is also going to hit the same problem we have in our qsharp project as well, in that until there are Windows ARM64 runners available in the CI/release pipelines, while you can cross-compiler for Windows ARM64 fine, you won't be able to run the tests. We decided to live without test coverage for Windows ARM64 in our pipelines (https://github.com/microsoft/qsharp/blob/main/.ado/publish.yml#L343) and spot check the releases manually until Windows ARM64 runners become available, but I'll leave it up to you if that's acceptable here.

I'll push a commit shortly that fixes x64 on Windows and removes Windows aarch64 from the pipeline until you comment on the test coverage question. Thanks!

@billti
Copy link
Contributor Author

billti commented Feb 9, 2025

I noticed none of the tests run on arm64 for any platforms - so there was nothing to remove and it seems in line. CI is green now! As extra validation, I copied/installed the wheel from the CI build to my Windows ARM64 machine into a clean venv and ran a few of the scripts from under ./examples and they all run fine.

@alexcrichton
Copy link
Member

Thanks for confirming!

And yeah we could probably set up and arm64 runner now that ubuntu-arm64 images exist on github actions, but alas I don't think there are windows arm64 images just yet...

@alexcrichton alexcrichton merged commit 13e7e4e into bytecodealliance:main Feb 10, 2025
12 checks passed
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