Skip to content

Commit 4fa1d10

Browse files
committed
Validate the complete Windows ARM64 matrix
1 parent de323af commit 4fa1d10

2 files changed

Lines changed: 58 additions & 5 deletions

File tree

.github/workflows/release.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,55 @@ jobs:
192192
CIBW_BUILD: ${{ matrix.python }}-*
193193
CIBW_ARCHS: ARM64
194194

195+
- name: Verify Windows ARM64 wheels
196+
shell: pwsh
197+
run: |
198+
Add-Type -AssemblyName System.IO.Compression.FileSystem
199+
Get-ChildItem wheelhouse/*.whl | ForEach-Object {
200+
$archive = [System.IO.Compression.ZipFile]::OpenRead($_.FullName)
201+
try {
202+
$wheelEntry = $archive.Entries |
203+
Where-Object FullName -Like '*.dist-info/WHEEL' |
204+
Select-Object -First 1
205+
$nativeEntry = $archive.Entries |
206+
Where-Object FullName -Like 'uvloop/*.pyd' |
207+
Select-Object -First 1
208+
if (-not $wheelEntry -or -not $nativeEntry) {
209+
throw "Missing WHEEL metadata or native extension in $($_.Name)"
210+
}
211+
212+
$reader = [System.IO.StreamReader]::new($wheelEntry.Open())
213+
try {
214+
$wheelMetadata = $reader.ReadToEnd()
215+
} finally {
216+
$reader.Dispose()
217+
}
218+
if ($wheelMetadata -notmatch '(?m)^Tag: .+-win_arm64$') {
219+
throw "Missing win_arm64 tag in $($_.Name)"
220+
}
221+
222+
$memory = [System.IO.MemoryStream]::new()
223+
try {
224+
$stream = $nativeEntry.Open()
225+
try {
226+
$stream.CopyTo($memory)
227+
} finally {
228+
$stream.Dispose()
229+
}
230+
$bytes = $memory.ToArray()
231+
} finally {
232+
$memory.Dispose()
233+
}
234+
$peOffset = [BitConverter]::ToInt32($bytes, 0x3c)
235+
$machine = [BitConverter]::ToUInt16($bytes, $peOffset + 4)
236+
if ($machine -ne 0xAA64) {
237+
throw ('Expected ARM64 PE machine 0xAA64 in {0}, found 0x{1:X4}' -f $_.Name, $machine)
238+
}
239+
} finally {
240+
$archive.Dispose()
241+
}
242+
}
243+
195244
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
196245
with:
197246
name: dist-wheels-windows-arm64-${{ matrix.python }}

.github/workflows/tests.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,18 @@ jobs:
2424
- "3.13"
2525
- "3.14"
2626
- "3.14t"
27-
os: [ubuntu-latest, macos-latest, windows-latest, windows-11-arm]
28-
exclude:
27+
os: [ubuntu-latest, macos-latest, windows-latest]
28+
include:
2929
- os: windows-11-arm
30-
python-version: "3.8"
30+
python-version: "3.11.9"
3131
- os: windows-11-arm
32-
python-version: "3.9"
32+
python-version: "3.12.10"
3333
- os: windows-11-arm
34-
python-version: "3.10"
34+
python-version: "3.13.15"
35+
- os: windows-11-arm
36+
python-version: "3.14.7"
37+
- os: windows-11-arm
38+
python-version: "3.14t"
3539

3640
env:
3741
PIP_DISABLE_PIP_VERSION_CHECK: 1

0 commit comments

Comments
 (0)