Skip to content

Build and test on Windows - #33

Merged
alpae merged 4 commits into
DessimozLab:masterfrom
alpae:windows-wheels
Oct 29, 2026
Merged

alpae merged 4 commits into
DessimozLab:masterfrom
alpae:windows-wheels

Conversation

@alpae

@alpae alpae commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Adds Windows wheels (x86_64 and arm64) and Windows to the CI test matrix.

Fix

aligned_malloc in DynProgr_sse_double.c aligned its buffers by casting the pointer to long. On 64-bit Windows long is only 32 bits, so the pointer was truncated. That is a likely reason why the tests failed when Windows wheels were tried in 2022. It now uses uintptr_t.

Build

  • wheels for windows-latest (x86_64) and windows-11-arm (arm64), built with MSVC and /openmp. delvewheel bundles the MSVC OpenMP runtime (vcomp140.dll)
  • no 32-bit (win32) wheels
  • no arm64 wheel for Python 3.10, as numpy has no Windows arm64 wheels for 3.10 (they start with numpy 2.3, which needs Python ≥ 3.11)
  • ci: windows-latest in the test matrix; run steps use bash on all platforms, e.g. for the dist/*.tar.gz glob

Warnings

Cleaned up the MSVC warnings in our code:

  • explicit casts where gap costs (double) are passed as char/short and lengths (Py_ssize_t) as int
  • pointers in debug prints use %p instead of a cast to unsigned long
  • c_align_strings no longer assigns the double tot in the loop initialiser of i

With this, the x86_64 build has no MSVC warnings left. On arm64, the only remaining warning comes from simde itself (simde/x86/sse.h, a uint64_t to int conversion), not from pyopa.

Results

All checks of this PR pass:

  • wheels: every wheel passes the test suite (22 passed, 1 skipped), i.e. Windows x86_64 for Python 3.10–3.15, Windows arm64 for 3.11–3.15, and the existing Linux and macOS wheels
  • ci: all 18 test jobs, including windows-latest with Python 3.10–3.15
  • full-tests: the comparison with all 35,156 darwin reference results

The changelog has entries for the Windows wheels and the fixes.

alpae added 4 commits October 29, 2026 23:00
- align pointers through uintptr_t in aligned_malloc; long is only 32 bits
  on 64-bit Windows, which truncated the pointers
- wheels for Windows x86_64 and arm64; delvewheel bundles the MSVC
  OpenMP runtime
- ci: test on windows-latest, using bash as shell on all platforms
- skip the win32 wheels
- explicit casts where doubles are converted to char/short/int and
  Py_ssize_t lengths are passed as int (sequences are far shorter than
  2^31)
- print pointers with %p instead of truncating them to unsigned long
- tot is a double; do not assign it in the loop initialiser of i
@alpae

alpae commented Oct 29, 2026

Copy link
Copy Markdown
Member Author

should also fix #1

@alpae
alpae merged commit 64913ad into DessimozLab:master Oct 29, 2026
28 checks passed
@alpae
alpae deleted the windows-wheels branch October 29, 2026 23:50
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.

1 participant