Repository navigation
Build and test on Windows - #33
Merged
Merged
Conversation
- 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
Member
Author
|
should also fix #1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds Windows wheels (x86_64 and arm64) and Windows to the CI test matrix.
Fix
aligned_mallocinDynProgr_sse_double.caligned its buffers by casting the pointer tolong. On 64-bit Windowslongis 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 usesuintptr_t.Build
windows-latest(x86_64) andwindows-11-arm(arm64), built with MSVC and/openmp. delvewheel bundles the MSVC OpenMP runtime (vcomp140.dll)windows-latestin the test matrix; run steps use bash on all platforms, e.g. for thedist/*.tar.gzglobWarnings
Cleaned up the MSVC warnings in our code:
Py_ssize_t) asint%pinstead of a cast tounsigned longc_align_stringsno longer assigns the doubletotin the loop initialiser ofiWith this, the x86_64 build has no MSVC warnings left. On arm64, the only remaining warning comes from simde itself (
simde/x86/sse.h, auint64_ttointconversion), not from pyopa.Results
All checks of this PR pass:
windows-latestwith Python 3.10–3.15full-tests: the comparison with all 35,156 darwin reference resultsThe changelog has entries for the Windows wheels and the fixes.