Skip to content

Migrate Windows arm64 release build to native windows-11-arm runner - #15437

Draft
warp-agent-staging[bot] wants to merge 3 commits into
masterfrom
factory/win-arm64-native-build
Draft

Migrate Windows arm64 release build to native windows-11-arm runner#15437
warp-agent-staging[bot] wants to merge 3 commits into
masterfrom
factory/win-arm64-native-build

Conversation

@warp-agent-staging

@warp-agent-staging warp-agent-staging Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Warning

This PR currently carries a temporary test-only commit that must be removed before merge: TEMPORARY TEST SCAFFOLDING: isolate Windows arm64 in create_release.yml (commit 8a9c508). It restricts a manual workflow_dispatch run to the Windows arm64 path only, so the migration can be tested without running the full release matrix. Drop that one commit (a single, self-contained revert/rebase) before merging. See "Temporary test-only commit" below for exactly what it does.

Summary

Migrates the Windows arm64 release build (both the main app and the TUI) from x86_64 cross-compilation to native compilation on the windows-11-arm GitHub-hosted runner. The Windows 11 Arm64 GA runner image now ships the same VC++/Windows SDK/LLVM toolchain as the x64 image, so cross-compilation is no longer necessary. Stacked on #13240.

Changes

  • build_windows_binaries / release_windows: changed the arm64 leg's matrix.runner from windows-latest-large to windows-11-arm (the x64 leg is untouched).
  • build_windows_tui_binaries / release_windows_tui: gave these jobs the same per-arch matrix.runner treatment (they previously had a flat runs-on: windows-latest-large), pointing the arm64 leg at windows-11-arm.
  • Dropped the Add arm64 target (rustup target add aarch64-pc-windows-msvc) steps in the two build jobs, since the arm64 leg's host target is now aarch64-pc-windows-msvc rather than a cross-compiled add-on.
  • Disabled azure/artifact-signing-action's dependency cache (cache-dependencies: false) in both signing steps. That cache is not keyed by runner architecture, so the x64 and arm64 legs of the matrix can corrupt each other's cached tools when they sign concurrently (Azure/artifact-signing-action#146).
  • script/install_cargo_binstall: pinned the aarch64-pc-windows-msvc cargo-binstall archive and its verified SHA-256 alongside the existing x86_64 entry, and fixed archive_for_platform's Windows arch detection to read PROCESSOR_ARCHITEW6432/PROCESSOR_ARCHITECTURE instead of uname -m (Git for Windows' MSYS runtime doesn't report the true host architecture there, so the aarch64 entry was otherwise unreachable).

Temporary test-only commit

The final commit on this branch, TEMPORARY TEST SCAFFOLDING: isolate Windows arm64 in create_release.yml, is scaffolding for manually testing this migration, requested for after code review passes. It is not part of the migration itself and must be dropped before merge. It:

  • Flips the default of the build_linux, build_macos, and build_web workflow_dispatch inputs to false (the workflow_call inputs used by real automated releases are untouched). collect_results derives which platforms are "disabled" from these same inputs, so a default manual test run correctly excludes those platforms from its pass/fail rollup instead of reporting a spurious failure.
  • Isolates the arm64 leg of build_windows_tui_binaries, release_windows_tui, and release_windows by commenting out the x64 entry in each job's matrix.include (not via a job-level if:, since jobs.<job_id>.if cannot see the matrix context).
  • Leaves build_windows_binaries running both legs unchanged, since its x64 leg alone produces the canonical Windows settings schema artifact the arm64 release jobs depend on.

A manual workflow_dispatch run of create_release.yml (with channel and build_windows: true, leaving build_linux/build_macos/build_web at their default) will therefore exercise only: prepare_releasebuild_windows_binaries (both legs) → build_windows_tui_binaries (arm64 only) → release_windows (arm64 only) and release_windows_tui (arm64 only) → collect_results. Every other release job is skipped and correctly excluded from collect_results' pass/fail rollup.

Verification

This can only be fully verified by actually running the workflow on windows-11-arm, which I can't do from here. What I checked instead:

  • The workflow YAML parses and every job's if:, matrix.include, and the workflow_dispatch/workflow_call input defaults resolve as expected (verified with js-yaml), including confirming no job-level if: references the matrix context (cross-checked against GitHub's documented context availability table, which lists only github, needs, vars, inputs for jobs.<job_id>.if) and that the workflow_call input defaults are untouched.
  • script/install_cargo_binstall's new SHA-256 for cargo-binstall-aarch64-pc-windows-msvc.zip was independently verified by downloading the v1.18.1 asset and computing its digest locally.
  • The PROCESSOR_ARCHITEW6432/PROCESSOR_ARCHITECTURE dispatch logic was sanity-checked in isolation under bash -u for all three relevant cases: an unemulated x64 host (unchanged from before), an arm64 host running x64-emulated Git Bash, and an arm64 host running native arm64 Git Bash.
  • script/windows/build_inno_sign_tool_command.ps1 needs no change: the Windows SDK installs x86, x64, arm, and arm64 signtool.exe subfolders side-by-side on every host regardless of its own architecture, and Azure's Trusted Signing dlib has no arm64 build at all, so the script's existing x64 filters remain correct — an arm64 signtool.exe can't load the x64-only dlib anyway.
  • protoc install (choco + winget fallback in prepare_environment) needs no change either: neither package publishes an arm64 Windows archive, but the x64 archive runs fine under Windows 11 arm64's built-in x64 emulation, which only affects toolchain install speed, not the codegen it produces.
  • azure/artifact-signing-action officially does not support Windows arm64 runners, but multiple public reports confirm it works via x64 emulation as long as its dependency cache is disabled when x64 and arm64 legs of a matrix run concurrently — hence the cache-dependencies: false addition above. This, and whether the arm64 build genuinely succeeds end-to-end, remain the parts of this change that only an actual run on windows-11-arm can confirm.

@cla-bot cla-bot Bot added the cla-signed label Aug 22, 2026
@warp-agent-staging
warp-agent-staging Bot requested a review from vorporeal August 22, 2026 01:27
@warp-agent-staging warp-agent-staging Bot changed the title factory/win arm64 native build Migrate Windows arm64 release build to native windows-11-arm runner Aug 22, 2026
@warp-agent-staging

Copy link
Copy Markdown
Contributor Author

This PR was generated with Warp.

Comment @warp-factory on this PR to send it follow-up work.

View run View conversation View on Slack

@warp-agent-staging
warp-agent-staging Bot force-pushed the factory/win-arm64-native-build branch from b110f7e to 5bc22f8 Compare August 22, 2026 01:46
@warp-agent-staging
warp-agent-staging Bot force-pushed the factory/win-arm64-native-build branch from 5bc22f8 to 8a9c508 Compare August 23, 2026 00:49
Base automatically changed from david/optimize-settings-schema-generation-during-release to master August 23, 2026 01:21
Both windows-11-arm and windows-2025 GitHub-hosted runner images now ship
the same VC++/Windows SDK/LLVM toolchain, so the arm64 leg of the Windows
release build no longer needs to cross-compile from an x86_64 host.

- .github/workflows/create_release.yml: point the arm64 leg of
  build_windows_binaries and release_windows (already keyed by a
  per-arch matrix.runner) at windows-11-arm instead of
  windows-latest-large. Give build_windows_tui_binaries and
  release_windows_tui the same per-arch matrix.runner treatment (they
  previously had a flat runs-on: windows-latest-large). Drop the
  'Add arm64 target' rustup steps, since the arm64 leg's host target
  is now aarch64-pc-windows-msvc rather than a cross-compiled add-on.
  Disable azure/artifact-signing-action's dependency cache
  (cache-dependencies: false) in both signing steps, since it is not
  keyed by runner architecture and can otherwise be corrupted when the
  x64 and arm64 legs of the matrix sign concurrently
  (Azure/artifact-signing-action#146).
- script/install_cargo_binstall: pin the aarch64-pc-windows-msvc
  cargo-binstall archive and its verified SHA-256 alongside the
  existing x86_64 entry, so the installer can resolve a native arm64
  archive if it is ever selected.
archive_for_platform derived the Windows archive name from `uname -m`,
but Git for Windows' MSYS runtime does not report the host's real
architecture there: it reports the emulated x86_64 process architecture
under WOW64, or "unknown" for a native arm64 host with no case in its
uname implementation. On windows-11-arm this asked for
cargo-binstall-unknown-pc-windows-msvc.zip, which has no pinned digest,
and the script exited before installing anything.

Derive the Windows architecture from PROCESSOR_ARCHITEW6432 (set only
under WOW64/x64 emulation, to the true native architecture) falling
back to PROCESSOR_ARCHITECTURE instead, so both a native arm64 host and
an x64-emulated bash on an arm64 host resolve to the aarch64 archive.
The x64 leg still resolves to the same x86_64 archive as before.
DO NOT MERGE THIS COMMIT. It exists only so this migration's Windows
arm64 path can be exercised on its own, without paying for the full
release matrix. Revert it (a single, self-contained commit) before this
PR merges.

Re-derived against the workflow as restructured by the commits this
branch is now rebased onto (release_macos_cli and release_linux_cli_x86
split into build-only + packaging-only jobs, gate_tui_release_artifacts
replaced by collect_results). The previous version of this commit hardcoded
if: false on every non-Windows job by name; that approach no longer matches
the current job list and, more importantly, collect_results derives which
platforms are "disabled" from the build_macos/build_linux/build_windows/
build_web workflow inputs, not from each job's own if:, so hardcoding if:
false directly on jobs would have made collect_results treat every one of
them as a genuine, non-excluded failure and fail the whole run.

Instead, this flips the *default* of the build_linux, build_macos, and
build_web workflow_dispatch inputs to false (the workflow_call inputs used
by real automated releases are untouched). A manual test run started with
no input overrides now disables those three platforms through the exact
same mechanism a user could already invoke by hand, so collect_results
correctly excludes them instead of reporting spurious failures.

Within Windows, isolates the arm64 leg of build_windows_tui_binaries,
release_windows_tui, and release_windows by commenting out the x64 entry
in each job's matrix.include, rather than by adding a matrix condition to
the job's if:. jobs.<job_id>.if only has access to the github, needs, vars,
and inputs contexts (see the context availability table in GitHub's docs);
matrix is not among them, so a job-level if: referencing matrix.arch
silently evaluates to an empty-string comparison and is always false. This
was the flaw in the very first attempt at this scaffolding.

build_windows_binaries is deliberately left running both legs: its x64 leg
alone produces the canonical Windows settings schema artifact that the
arm64 legs of release_windows and release_windows_tui download.
@vorporeal
vorporeal force-pushed the factory/win-arm64-native-build branch from 8a9c508 to 4da56ca Compare August 23, 2026 01:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants