Skip to content

Commit 630abb0

Browse files
authored
Codify win arm tests (#407)
* Changes to minimize xcookie diff * use xcookie with updates so it can generate the current ci script
1 parent b66c42c commit 630abb0

2 files changed

Lines changed: 16 additions & 22 deletions

File tree

.github/workflows/tests.yml

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,6 @@ jobs:
128128
- ubuntu-latest
129129
- macOS-latest
130130
- windows-latest
131-
# Since the oldest Python available on windows-11-arm on GitHub
132-
# is 3.11.0 (see https://raw.githubusercontent.com/actions/\
133-
# python-versions/main/versions-manifest.json), older wheels
134-
# cannot be tested... so just skip pre-building them
135131
cibw_skip:
136132
- '*-win32 cp3{9,10}-win_arm64 cp313-musllinux_i686'
137133
arch:
@@ -142,6 +138,8 @@ jobs:
142138
- name: Enable MSVC 64bit
143139
uses: ilammy/msvc-dev-cmd@v1
144140
if: ${{ startsWith(matrix.os, 'windows-') }} && ${{ contains(matrix.cibw_skip, '*-win32') }}
141+
with:
142+
arch: ${{ contains(matrix.os, 'arm') && 'arm64' || 'x64' }}
145143
- name: Set up QEMU
146144
uses: docker/setup-qemu-action@v3.0.0
147145
if: runner.os == 'Linux' && matrix.arch != 'auto'
@@ -154,16 +152,10 @@ jobs:
154152
config-file: pyproject.toml
155153
env:
156154
CIBW_SKIP: ${{ matrix.cibw_skip }}
157-
# We're building on Windows-x64, so ARM64 wheels can't be tested
158-
# locally by `cibuildwheel` (don't worry, we're testing them
159-
# later though in `test_binpy_wheels`)
160155
CIBW_TEST_SKIP: '*-win_arm64'
161156
CIBW_ARCHS_LINUX: ${{ matrix.arch }}
162157
CIBW_ENVIRONMENT: PYTHONUTF8=1
163158
PYTHONUTF8: '1'
164-
# `msvc-dev-cmd` sets this envvar, which interferes with
165-
# cross-architecture building...
166-
# just let `cibuildwheel` handle that
167159
VSCMD_ARG_TGT_ARCH: ''
168160
- name: Show built files
169161
shell: bash
@@ -236,7 +228,6 @@ jobs:
236228
install-extras: tests-strict,runtime-strict
237229
os: windows-latest
238230
arch: auto
239-
# Note: cibuildwheel can't target 3.8 on Window ARM64
240231
- python-version: '3.13'
241232
install-extras: tests-strict,runtime-strict,optional-strict
242233
os: ubuntu-latest
@@ -289,7 +280,7 @@ jobs:
289280
install-extras: tests,optional
290281
os: ubuntu-latest
291282
arch: auto
292-
- python-version: 3.14.0-rc.1
283+
- python-version: '3.14'
293284
install-extras: tests,optional
294285
os: ubuntu-latest
295286
arch: auto
@@ -317,7 +308,7 @@ jobs:
317308
install-extras: tests,optional
318309
os: macOS-latest
319310
arch: auto
320-
- python-version: 3.14.0-rc.1
311+
- python-version: '3.14'
321312
install-extras: tests,optional
322313
os: macOS-latest
323314
arch: auto
@@ -345,13 +336,10 @@ jobs:
345336
install-extras: tests,optional
346337
os: windows-latest
347338
arch: auto
348-
- python-version: 3.14.0-rc.1
339+
- python-version: '3.14'
349340
install-extras: tests,optional
350341
os: windows-latest
351342
arch: auto
352-
# Again, cibuildwheel can't target 3.8 on Window ARM64, and
353-
# GitHub doesn't have anything below Python 3.11 on their ARM64
354-
# machines, so just test the built wheels from 3.11+
355343
- python-version: '3.11'
356344
install-extras: tests,optional
357345
os: windows-11-arm
@@ -364,7 +352,7 @@ jobs:
364352
install-extras: tests,optional
365353
os: windows-11-arm
366354
arch: auto
367-
- python-version: 3.14.0-rc.1
355+
- python-version: '3.14'
368356
install-extras: tests,optional
369357
os: windows-11-arm
370358
arch: auto
@@ -374,8 +362,6 @@ jobs:
374362
- name: Enable MSVC 64bit
375363
uses: ilammy/msvc-dev-cmd@v1
376364
if: ${{ startsWith(matrix.os, 'windows-') }}
377-
# As noted in msvc-dev-cmd #90 (and the Action docs), it currently
378-
# # assumes `arch=x64`, so we have to manually set it here...
379365
with:
380366
arch: ${{ contains(matrix.os, 'arm') && 'arm64' || 'x64' }}
381367
- name: Set up QEMU
@@ -400,9 +386,11 @@ jobs:
400386
run: |-
401387
echo "Finding the path to the wheel"
402388
ls wheelhouse || echo "wheelhouse does not exist"
403-
echo "Installing helpers"
389+
echo "Installing helpers: update pip"
404390
python -m pip install pip uv -U
391+
echo "Installing helpers: setuptools"
405392
python -m uv pip install setuptools>=0.8 setuptools_scm wheel build -U
393+
echo "Installing helpers: tomli and pkginfo"
406394
python -m uv pip install tomli pkginfo
407395
export WHEEL_FPATH=$(python -c "if 1:
408396
import pathlib
@@ -422,6 +410,7 @@ jobs:
422410
")
423411
echo "WHEEL_FPATH=$WHEEL_FPATH"
424412
echo "INSTALL_EXTRAS=$INSTALL_EXTRAS"
413+
echo "UV_RESOLUTION=$UV_RESOLUTION"
425414
echo "MOD_VERSION=$MOD_VERSION"
426415
python -m uv pip install "line_profiler[$INSTALL_EXTRAS]==$MOD_VERSION" -f wheelhouse
427416
echo "Install finished."

pyproject.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ omit =[
3131

3232
[tool.cibuildwheel]
3333
build = "cp38-* cp39-* cp310-* cp311-* cp312-* cp313-* cp314-*"
34-
skip = ["*-win32", "cp313-musllinux_i686"]
34+
skip = ["*-win32", "cp3{9,10}-win_arm64", "cp313-musllinux_i686"]
3535
build-frontend = "build"
3636
build-verbosity = 1
3737
test-command = "python {project}/run_tests.py"
@@ -53,7 +53,9 @@ mod_name = "line_profiler"
5353
repo_name = "line_profiler"
5454
rel_mod_parent_dpath = "."
5555
os = [ "all", "linux", "osx", "win",]
56+
main_python = '3.13'
5657
min_python = '3.8'
58+
max_python = '3.14'
5759
author = "Robert Kern"
5860
author_email = "robert.kern@enthought.com"
5961
description = "Line-by-line profiler"
@@ -62,6 +64,9 @@ license = "BSD"
6264
dev_status = "stable"
6365
typed = true
6466
skip_autogen = ["MANIFEST.in", "CHANGELOG.md"]
67+
test_env = """
68+
COVERAGE_CORE: ctrace
69+
"""
6570

6671
[tool.xcookie.entry_points]
6772
# the console_scripts entry point creates the xdoctest executable

0 commit comments

Comments
 (0)