Skip to content

Conversation

chalcolith
Copy link
Member

Allow building on arm64 Windows

@chalcolith chalcolith added the changelog - added Automatically add "Added" CHANGELOG entry on merge label Jun 5, 2025
@ponylang-main ponylang-main added the discuss during sync Should be discussed during an upcoming sync label Jun 5, 2025
@ponylang-main
Copy link
Contributor

Hi @chalcolith,

The changelog - added label was added to this pull request; all PRs with a changelog label need to have release notes included as part of the PR. If you haven't added release notes already, please do.

Release notes are added by creating a uniquely named file in the .release-notes directory. We suggest you call the file 325.md to match the number of this pull request.

The basic format of the release notes (using markdown) should be:

## Title

End user description of changes, why it's important,
problems it solves etc.

If a breaking change, make sure to include 1 or more
examples what code would look like prior to this change
and how to update it to work after this change.

Thanks.

@chalcolith chalcolith force-pushed the arm64_windows_build branch from 60d140d to e9a048e Compare June 6, 2025 15:07
@SeanTAllen
Copy link
Member

@SeanTAllen SeanTAllen changed the title Arm64 windows build Add Windows on arm64 as a supported platform Jun 6, 2025
chalcolith and others added 2 commits June 6, 2025 09:20
Co-authored-by: Sean T Allen <sean@seantallen.com>
@SeanTAllen
Copy link
Member

The windows corral for arm appears to hang often.

@chalcolith
Copy link
Member Author

I tried adding my local arm64 windows machine as a self-hosted runner. The crypto and net_ssl libs built much faster, so maybe the existing windows-11-arm machine is not very powerful? But the corral fetch just failed without any indication of why.

@chalcolith
Copy link
Member Author

Massively increased the timeouts on the tests and they ran. @SeanTAllen I think the problem is that the arm build machines are underpowered -- they only have 1gb of memory.

@SeanTAllen
Copy link
Member

SeanTAllen commented Jun 22, 2025

That seems odd given we are able to build LLVM without much issue on the arm machines.

Perhaps we are accidentally running an amd64 binary that is being emulated. That would take quite a bit of time.

We should verify each of the binaries is arm not amd64. Something isn't right here.

The corral arm windows nightly takes 49 seconds to run.

Is it building libressl that is taking all the time? That only took about 4 to 5 minutes in your PR to add to net_ssl - https://github.com/ponylang/net_ssl/actions/runs/15424265684/job/43407090596?pr=117.

Update:

Yeah all the time is going to "cloning net_ssl" which i think means buildings libressl which only takes 4 to 5 minutes when we did directly in the net_ssl repo:

2025-06-21T15:00:43.6121392Z git cloning github.com/ponylang/net_ssl.git into C:\a\ponyup\ponyup\_repos\github_com_ponylang_net_ssl_git
2025-06-21T16:14:46.8097936Z git checking out @1.3.4 into C:\a\ponyup\ponyup\_corral\github_com_ponylang_net_ssl

that's an hour and 15 minutes. something definitely not right there.

so our PR command in net_ssl is: .\make.ps1 -Command libs 2>&1;
the one from the corral.json for net_ssl is PowerShell.exe -File make.ps1 -Config release -Command libs"

@SeanTAllen
Copy link
Member

@chalcolith I did a "test version" of crypto that doesn't build libressl as a post install step. So the only thing as part of that does build libressl is net_ssl. And looks like it was hanging on net_ssl being cloned which might be the building of libressl, but it takes way longer than we see for arm64 windows net_ssl where we only run the powershell command directly in pr.yml for net_ssl.

Its 9 minutes in now. The x64 one was fully done in 5 minutes. I assume this is going to take the full 90 minutes we were seeing, once that is confirm, I will roll back the changes I did to test "only build single LibreSSL".

@SeanTAllen
Copy link
Member

@chalcolith and right after i wrote the above, it moved on to other portions of testing. this is going to be much quicker. i can only make the second half of sync on tuesday. perhaps we could chat then (3 pm eastern) or you could make office hours tomorrow as this is looking like it will take considerably more time than amd64 windows but much less than we have been seeing. i will update you on the final time to run if it turns out to be 90 or something ridiculous again despite looking promising.

@SeanTAllen
Copy link
Member

22 minutes total when not building libressl as part of the crypto package.

@SeanTAllen SeanTAllen force-pushed the arm64_windows_build branch from 23e5479 to 65fd734 Compare June 22, 2025 17:23
@SeanTAllen SeanTAllen force-pushed the arm64_windows_build branch from 65fd734 to 1c2e9ca Compare June 22, 2025 17:44
@SeanTAllen
Copy link
Member

I think there are one or two things we should do to address the issues that I've indentified...

  1. merge crypto and net_ssl into a single library that has 2 packages as part of it. that solves the "we don't want to build more than once" and given both are riding on the same version of a c-library that probably can't easily be used with different versions of it, I think makes sense
  2. test out a new feature of corral to control the parallelism for corral operations like clones so that for environments where lots of parallelism/concurrency might make corral operations take longer than serialized, it is available. the test would be to add to corral and then test out here and see if it makes corral cloning operations quicker. if it does, we keep the feature and use it here. if it doesn't, we drop the feature as providing no known value.

@SeanTAllen SeanTAllen removed the discuss during sync Should be discussed during an upcoming sync label Jun 24, 2025
@SeanTAllen SeanTAllen self-assigned this Jun 24, 2025
@SeanTAllen SeanTAllen force-pushed the arm64_windows_build branch from 41f6f53 to f0ff14b Compare July 16, 2025 03:08
@SeanTAllen SeanTAllen force-pushed the arm64_windows_build branch from f0ff14b to 4fbd58f Compare July 17, 2025 01:50
@SeanTAllen
Copy link
Member

@jemc can you give this a close review to see if there is anything you can see that is missing from this? i just did a review and found one bit that was missing in release.yml and added it.

@ponylang-main ponylang-main added the discuss during sync Should be discussed during an upcoming sync label Jul 17, 2025
@SeanTAllen SeanTAllen requested review from jemc and a team July 17, 2025 01:56
@SeanTAllen SeanTAllen merged commit ebd5381 into main Jul 25, 2025
24 of 25 checks passed
@SeanTAllen SeanTAllen deleted the arm64_windows_build branch July 25, 2025 18:39
@ponylang-main ponylang-main removed the discuss during sync Should be discussed during an upcoming sync label Jul 25, 2025
github-actions bot pushed a commit that referenced this pull request Jul 25, 2025
github-actions bot pushed a commit that referenced this pull request Jul 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog - added Automatically add "Added" CHANGELOG entry on merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants