Skip to content

feat: build Windows ARM64 wheels - #1925

Merged
bdraco merged 5 commits into
python-zeroconf:masterfrom
johnnynunez:ci/windows-arm64-wheels
Oct 31, 2026
Merged

bdraco merged 5 commits into
python-zeroconf:masterfrom
johnnynunez:ci/windows-arm64-wheels

Conversation

@johnnynunez

Copy link
Copy Markdown
Contributor

Adds the hosted windows-11-arm runner to the build_wheels matrix so releases also ship native win_arm64 wheels with the Cython extensions compiled. Today Windows on Arm users get the sdist and need a local compiler, or end up on the pure-Python fallback. GitHub's windows-11-arm runners are free for public repositories.

On that runner cibuildwheel's default auto arch selects ARM64 only, and the existing CIBW_SKIP applies unchanged, so it builds the same CPython versions as the other platforms: cp310, cp311, cp312, cp313, cp314, cp314t, cp315, cp315t (there is no PyPy for Windows ARM64).

Test plan

build_wheels only runs after a release on master, so I verified it in my fork with a build-only copy of the job (same cibuildwheel pin and env, no release/publish steps, one job per Python version) and ran the test suite (pytest --timeout=60 tests, without coverage) against each installed wheel, plus an x64 control lane with the same harness:

https://github.com/johnnynunez/python-zeroconf/actions/runs/38311471960

wheel tests (ARM64) tests (x64 control)
cp310-win_arm64 521 passed, 5 skipped, 2 xfailed, 6 xpassed 521 passed, 5 skipped, 3 xfailed, 5 xpassed
cp311-win_arm64 521 passed, 5 skipped, 3 xfailed, 5 xpassed 521 passed, 5 skipped, 2 xfailed, 6 xpassed
cp312-win_arm64 521 passed, 5 skipped, 3 xfailed, 5 xpassed 521 passed, 5 skipped, 3 xfailed, 5 xpassed
cp313-win_arm64 521 passed, 5 skipped, 2 xfailed, 6 xpassed 521 passed, 5 skipped, 2 xfailed, 6 xpassed
cp314-win_arm64 521 passed, 5 skipped, 2 xfailed, 6 xpassed 521 passed, 5 skipped, 2 xfailed, 6 xpassed
cp314t-win_arm64 521 passed, 5 skipped, 2 xfailed, 6 xpassed 521 passed, 5 skipped, 2 xfailed, 6 xpassed
cp315-win_arm64 521 passed, 5 skipped, 2 xfailed, 6 xpassed 521 passed, 5 skipped, 2 xfailed, 6 xpassed
cp315t-win_arm64 521 passed, 5 skipped, 2 xfailed, 6 xpassed 521 passed, 5 skipped, 2 xfailed, 6 xpassed
  • Every ARM64 wheel contains all 18 compiled extension modules (.pyd, PE machine ARM64), and the tests imported the compiled zeroconf from the installed wheel, not the source tree.
  • Wheel tags match the filenames and RECORD hashes check out.
  • The skips are the existing environment skips (IPv6, /proc, macOS-only, SO_REUSEPORT, multicast loopback on GitHub Windows runners); the xfail/xpass split varies between runs on both architectures.

Side note, not changed here: when all versions are built in one job (as in build_wheels), the cp314t/cp315t Windows wheels also pick up the cp314/cp315 .pyd files from the previous build. The current cp314t win_amd64 wheel on PyPI has 36 .pyd files for this reason. The free-threaded interpreter doesn't load the extra files, so they are harmless, and the new ARM64 lane will behave the same way.

Add the hosted windows-11-arm runner to the cibuildwheel matrix so
releases also ship native win_arm64 wheels with the Cython extensions.
@github-actions

Copy link
Copy Markdown

Thanks for contributing! A quick note: this project is in the process of moving from LGPL-2.1 to Apache 2.0, and may keep LGPL-2.1-or-later as an OR option so GPL-2.0-only projects can keep using the library, see #1835.

By continuing with this pull request you agree that this new contribution is offered under both Apache 2.0 and LGPL-2.1-or-later, so it is covered under either outcome.

This notice does not affect your previous contributions. If you would like to consent to relicensing those as well, please post the consent statement on #1835; silence is never treated as consent for past work.

If offering this contribution under these licenses does not work for you, no hard feelings; reply with the exact phrase I do not agree to the Apache 2.0 license or simply close this pull request.

@codecov

codecov Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.87%. Comparing base (c245c2f) to head (d860fd4).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1925      +/-   ##
==========================================
+ Coverage   99.69%   99.87%   +0.17%     
==========================================
  Files          33       33              
  Lines        3913     3913              
  Branches      568      568              
==========================================
+ Hits         3901     3908       +7     
+ Misses          6        3       -3     
+ Partials        6        2       -4     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@codspeed

codspeed Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

1 warning

⚠️ 1 benchmark is dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

✅ 24 untouched benchmarks


Comparing johnnynunez:ci/windows-arm64-wheels (d860fd4) with master (c245c2f)

Open in CodSpeed

@bdraco

bdraco commented Oct 15, 2026

Copy link
Copy Markdown
Member

Traveling this week, but will take a look as soon as I can

@bdraco
bdraco requested a balanced review from Copilot October 31, 2026 03:58
@bdraco

bdraco commented Oct 31, 2026

Copy link
Copy Markdown
Member

We had a problem where the runner was producing arm and x86_64 wheels at the same time. need to make sure this doesn't come back

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are identified for the Windows ARM64 wheel-build addition.

No open issues 🎉

What changed in this PR

Adds native Windows ARM64 wheels to the release pipeline, giving Windows on Arm users prebuilt Cython extensions without requiring a local compiler.

Changes:

  • Adds windows-11-arm to the build_wheels runner matrix.
  • Reuses the existing cibuildwheel configuration and Python-version filters.
File Description
.github/​workflows/​ci.yml Adds the Windows ARM64 runner to release wheel builds.

Review effort: Balanced

@halibsbot

Copy link
Copy Markdown

@bdraco: We had a problem where the runner was producing arm and x86_64 wheels at the same time. need to make...

Current diff lacks guard. Lane relies on auto arch selection. Add CIBW_ARCHS_WINDOWS: ${{ matrix.os == 'windows-11-arm' && 'ARM64' || 'auto' }}. Matches CIBW_ARCHS_MACOS at ci.yml:369. Then verify single-job artifact contains only win_arm64.

@halibsbot

Copy link
Copy Markdown

PR Review — feat: build Windows ARM64 wheels

Almost ready: the change is the right size, but it needs an explicit ARM64 pin before merge, as @bdraco asked.

The one-line matrix addition reuses the existing cibuildwheel pin, REQUIRE_CYTHON and CIBW_SKIP, and the artifact name stays unique because it includes matrix.os. The PR's test plan is strong for a job that only runs after a release: per-wheel test runs, an x64 control lane and checks of the PE machine type. I could not independently confirm the fork run results.

  • The windows-11-arm lane relies on implicit auto arch selection. Nothing enforces @bdraco's requirement that mixed-architecture output doesn't come back. Add CIBW_ARCHS_WINDOWS for this lane.


Checklist

  • No hardcoded secrets
  • Existing release lanes unchanged
  • PR description matches the diff

Automated review by Kōan (Claude) HEAD=99ef778 1 min 25s

@halibsbot halibsbot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Tip

No blocking issues found — ready to merge.

@bdraco
bdraco merged commit d4146ac into python-zeroconf:master Oct 31, 2026
47 checks passed
@bdraco bdraco mentioned this pull request Oct 31, 2026
7 of 21 tasks
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.

4 participants