Skip to content

GHA/windows: switch a job to ARM64 on native runner - #17067

Closed
vszakats wants to merge 17 commits into
curl:masterfrom
vszakats:warm64
Closed

vszakats wants to merge 17 commits into
curl:masterfrom
vszakats:warm64

Conversation

@vszakats

@vszakats vszakats commented Apr 15, 2025 •

Copy link
Copy Markdown
Member

Switch a build-only MSYS2/mingw-w64 job to ARM64 using the ARM64 Windows
runner. This avoids most downsides of native ARM64 builds. Side-effect
is switching this job from GCC to clang. This adds speed, which offsets
the slower MSYS2 install step.

The new ARM64 runner hits a bunch of corner cases and inefficiencies:

Also:

  • bump the vcpkg build time limit, as it seems the native x86_64 jobs
    also can't fit into 35 minutes.
  • prepare MSVC jobs for the ARM64 runner.

Ref: github/roadmap#1098 (comment)
Ref: https://github.blog/changelog/2025-04-14-windows-arm64-hosted-runners-now-available-in-public-preview/


w/o ws https://github.com/curl/curl/pull/17067/files?w=1

I also tested switching the wolfSSL MSVC job which also run tests. curl
build times were about the same as with x64. Test runtime increased
to 5m57s from 3m55s (1.5x slower), non-native MSYS2 likely plays a role.
vcpkg build step seemed slow, and had to disable libpsl and gsasl to fit
into the time slot. Due to slowness and test runs not bringing much to
curl's test mix, I backed off from this.
Before: https://github.com/curl/curl/actions/runs/14474617013/job/40597121326
After: https://github.com/curl/curl/actions/runs/14481022915/job/40617844571?pr=17067

@vszakats vszakats added Windows Windows-specific CI Continuous Integration labels Apr 15, 2025
```
Starting MSYS2 for the first time...
C:\Windows\system32\cmd.exe /D /S /C C:\a\_temp\setup-msys2\msys2.cmd -c "'uname' '-a'"
The system cannot find the path specified.
Error: The process 'C:\Windows\system32\cmd.exe' failed with exit code 1
```
@testclutch

This comment was marked as outdated.

@vszakats

vszakats commented Apr 15, 2025 •

Copy link
Copy Markdown
Member Author

ARM64 has some quick surprises:

  • vcpkg boringssl broken for ARM64:
Call Stack (most recent call first):
  installed/arm64-windows/share/vcpkg-cmake/vcpkg_cmake_configure.cmake:269 (vcpkg_execute_required_process)
  ports/boringssl/portfile.cmake:34 (vcpkg_cmake_configure)
  scripts/ports.cmake:196 (include)
error: building boringssl:arm64-windows failed with: BUILD_FAILED

@vszakats

vszakats commented Apr 15, 2025 •

Copy link
Copy Markdown
Member Author

The MSYS2 GHA action is installing x86_64 binaries on ARM64. This works,
and quite fast, but not native.

vcpkg also uses x86_64 MSYS2 binaries while building deps for ARM64, on ARM64.

@vszakats vszakats changed the title GHA/windows: try arm64 native runner GHA/windows: switch MSVC job to ARM64 with the native runner Apr 15, 2025
@vszakats vszakats changed the title GHA/windows: switch MSVC job to ARM64 with the native runner GHA/windows: switch MSVC job to ARM64 on native runner Apr 15, 2025
@vszakats

vszakats commented Apr 16, 2025 •

Copy link
Copy Markdown
Member Author

Hm, so we got native ARM64 runners, which is truly great. Just to realize
we rely heavily on MSYS2/Cygwin for running tests, but MSYS2/Cygwin
has no native ARM64 support. It makes runtests 1.5x slower.

It's still reasonably speedy, but in CI, it's not ideal.

Another issue is vcpkg's reliance on MSYS2, which makes the vcpkg
lengthy rebuilds more lengthy. This would be fine if those jobs wouldn't
have a tendency to hang till the workflow timeouts. But they have, and
therefore the timeouts are necessary. High timeouts however also mean
that hung jobs often need contributors to wait for the whole timeout
before GitHub allows to manually retry that and other failed jobs.

On a cursory look, Cygwin seems to be far from implementing ARM64
support. It's missing a suitable GCC toolchain in the first place. clang
isn't considered. As of 2021, no work has started, and not much changed
around this as of 2025. For now it's safe to assume it will not happen.

msys2/MSYS2-packages#2889
https://cygwin.com/pipermail/cygwin/2021-December/250156.html

Running tests on ARM64 vs x64 also doesn't seem to bring much advantage
for curl, so I'm thinking to limit ARM64 to just executing the binary as
a super basic test to ensure the build works.

Also perhaps better doing this with MSYS2, to avoid vcpkg builds, and
its caching and rebuilding deps for an another arch.

It means this PR still needs some work.

@vszakats vszakats changed the title GHA/windows: switch MSVC job to ARM64 on native runner GHA/windows: switch a job to ARM64 on native runner Apr 16, 2025
vszakats added a commit to vszakats/curl that referenced this pull request Apr 16, 2025
Switch a build-only MSYS2/mingw-w64 job to ARM64 using the ARM64 Windows
runner. This avoids most downsides of native ARM64 builds. Side-effect
is switching this job from GCC to clang. This adds speed, which offsets
the slower MSYS2 install step.

The new ARM64 runner hits a bunch of corner cases and inefficiencies:
- MSYS2/Cygwin misses native ARM64 support. It means GH action installs
  x64 binaries on ARM64. vcpkg does the same. It runs, but not native,
  so slower. It affects runtests and possibly vcpkg build performance.
  This isn't expected to change.
- MSYS2 diffutils package missing for CLANGARM64.
- vcpkg boringssl build broken for ARM64.

Also:
- bump the vcpkg build time limit, as it seems the native x86_64 jobs
  also can't fit into 35 minutes.
- prepare MSVC jobs for the ARM64 runner.

I also tested switching the wolfSSL MSVC job which also run tests. curl
build times were about the same as with x64. Test runtime increased
to 5m57s from 3m55s (1.5x slower), non-native MSYS2 likely plays a role.
vcpkg build step seemed slow, and had to disable libpsl and gsasl to fit
into the time slot. Due to slowness and test runs not bringing much to
curl's test mix, I backed off from this.
Before: https://github.com/curl/curl/actions/runs/14474617013/job/40597121326
After: https://github.com/curl/curl/actions/runs/14481022915/job/40617844571?pr=17067

Ref: github/roadmap#1098 (comment)
Ref: https://github.blog/changelog/2025-04-14-windows-arm64-hosted-runners-now-available-in-public-preview/

Closes curl#17067
@vszakats vszakats closed this in be718da Apr 16, 2025
@vszakats
vszakats deleted the warm64 branch April 16, 2025 02:06
@lazka

lazka commented Apr 19, 2025

Copy link
Copy Markdown

MSYS2 https://packages.msys2.org/base/mingw-w64-diffutils package missing for ARM64.

fyi, I added it now

@vszakats

Copy link
Copy Markdown
Member Author

@lazka: Superb, thanks very much!

vszakats added a commit to vszakats/curl that referenced this pull request Apr 19, 2025
vszakats added a commit to vszakats/curl that referenced this pull request Apr 19, 2025
nbaws pushed a commit to nbaws/curl that referenced this pull request Apr 26, 2025
Switch a build-only MSYS2/mingw-w64 job to ARM64 using the ARM64 Windows
runner. This avoids most downsides of native ARM64 builds. Side-effect
is switching this job from GCC to clang. This adds speed, which offsets
the slower MSYS2 install step.

The new ARM64 runner hits a bunch of corner cases and inefficiencies:
- MSYS2/Cygwin misses native ARM64 support and this isn't expected to
  change. It means GH action installs x64 binaries on ARM64. vcpkg does
  the same. It runs, but not native, so slower. It affects runtests and
  possibly vcpkg build performance.
  msys2/MSYS2-packages#2889
  https://cygwin.com/pipermail/cygwin/2021-December/250156.html
- MSYS2 diffutils package missing for CLANGARM64.
- vcpkg boringssl build broken for ARM64.

Also:
- bump the vcpkg build time limit, as it seems the native x86_64 jobs
  also can't fit into 35 minutes.
- prepare MSVC jobs for the ARM64 runner.

Ref: github/roadmap#1098 (comment)
Ref: https://github.blog/changelog/2025-04-14-windows-arm64-hosted-runners-now-available-in-public-preview/

Closes curl#17067
nbaws pushed a commit to nbaws/curl that referenced this pull request Apr 26, 2025
Switch a build-only MSYS2/mingw-w64 job to ARM64 using the ARM64 Windows
runner. This avoids most downsides of native ARM64 builds. Side-effect
is switching this job from GCC to clang. This adds speed, which offsets
the slower MSYS2 install step.

The new ARM64 runner hits a bunch of corner cases and inefficiencies:
- MSYS2/Cygwin misses native ARM64 support and this isn't expected to
  change. It means GH action installs x64 binaries on ARM64. vcpkg does
  the same. It runs, but not native, so slower. It affects runtests and
  possibly vcpkg build performance.
  msys2/MSYS2-packages#2889
  https://cygwin.com/pipermail/cygwin/2021-December/250156.html
- MSYS2 diffutils package missing for CLANGARM64.
- vcpkg boringssl build broken for ARM64.

Also:
- bump the vcpkg build time limit, as it seems the native x86_64 jobs
  also can't fit into 35 minutes.
- prepare MSVC jobs for the ARM64 runner.

Ref: github/roadmap#1098 (comment)
Ref: https://github.blog/changelog/2025-04-14-windows-arm64-hosted-runners-now-available-in-public-preview/

Closes curl#17067
vszakats added a commit that referenced this pull request Sep 30, 2026
To inherit MSYS2 environment, which is now pre-installed on Windows
ARM64 runners.

Saving ~30s in the MSYS2 install step.

Ref: https://github.com/actions/runner-images/blob/main/images/windows/Windows11-Arm64-Readme.md
Follow-up to be718da #17067
Follow-up to 27d2469 #16429

Closes #23190
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI Continuous Integration Windows Windows-specific

Development

Successfully merging this pull request may close these issues.

3 participants