Skip to content

Commit 7885750

Browse files
committed
chore: bump cibw & pybind11
ci: extra index url style: pre-commit fixes fix: use patched versions fix: several fixes and skips style: pre-commit fixes ci: linearize pytest for wheelbuilds Update pyproject.toml Update wheels.yml fix: include test-environment too Signed-off-by: Henry Schreiner <[email protected]> fix: use main branch of cibuildwheel everywhere Signed-off-by: Henry Schreiner <[email protected]> ci: a few more skips for missing wheels Signed-off-by: Henry Schreiner <[email protected]> ci: try no 'simple' suffix Signed-off-by: Henry Schreiner <[email protected]> tests: skip unsupported on GraalPy, use build[uv] Signed-off-by: Henry Schreiner <[email protected]> chore: use latest cibuildwheel beta Signed-off-by: Henry Schreiner <[email protected]> ci: simple seems required sometimes Signed-off-by: Henry Schreiner <[email protected]> ci: add Android Signed-off-by: Henry Schreiner <[email protected]>
1 parent e5a7a7a commit 7885750

File tree

4 files changed

+96
-12
lines changed

4 files changed

+96
-12
lines changed

.github/workflows/wheels.yml

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,66 @@ jobs:
115115
path: wheelhouse/*.whl
116116
name: wheels-${{ strategy.job-index }}
117117

118+
build_ios_wheels:
119+
name: iOS ${{ matrix.runs-on }}
120+
runs-on: ${{ matrix.runs-on }}
121+
strategy:
122+
fail-fast: false
123+
matrix:
124+
runs-on: [macos-latest, macos-13]
125+
126+
steps:
127+
- uses: actions/checkout@v4
128+
with:
129+
fetch-depth: 0
130+
submodules: true
131+
132+
- run: brew upgrade cmake
133+
134+
- uses: mhsmith/cibuildwheel@android
135+
env:
136+
CIBW_PLATFORM: ios
137+
138+
- name: Verify clean directory
139+
run: git diff --exit-code
140+
shell: bash
141+
142+
- name: Upload wheels
143+
uses: actions/upload-artifact@v4
144+
with:
145+
path: wheelhouse/*.whl
146+
name: wheels-ios-${{ matrix.runs-on }}
147+
148+
build_android_wheels:
149+
name: Android ${{ matrix.runs-on }}
150+
runs-on: ${{ matrix.runs-on }}
151+
strategy:
152+
fail-fast: false
153+
matrix:
154+
runs-on: [ubuntu-latest, macos-latest]
155+
steps:
156+
- uses: actions/checkout@v4
157+
with:
158+
fetch-depth: 0
159+
submodules: true
160+
161+
- uses: mhsmith/cibuildwheel@android
162+
env:
163+
CIBW_PLATFORM: android
164+
165+
- name: Verify clean directory
166+
run: git diff --exit-code
167+
shell: bash
168+
169+
- name: Upload wheels
170+
uses: actions/upload-artifact@v4
171+
with:
172+
path: wheelhouse/*.whl
173+
name: wheels-android-${{ matrix.runs-on }}
174+
118175
upload_all:
119176
name: Upload if release
120-
needs: [build_wheels, build_sdist]
177+
needs: [build_wheels, build_ios_wheels, build_android_wheels, build_sdist]
121178
runs-on: ubuntu-latest
122179
if: github.event_name == 'release' && github.event.action == 'published'
123180
environment:

.pre-commit-config.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ repos:
8282
hooks:
8383
- id: check-readthedocs
8484
- id: check-github-workflows
85-
86-
- repo: https://github.com/henryiii/validate-pyproject-schema-store
87-
rev: 2025.05.12
88-
hooks:
89-
- id: validate-pyproject
85+
# TMP: waiting for cibuildwheel 3.0
86+
# - repo: https://github.com/henryiii/validate-pyproject-schema-store
87+
# rev: 2025.05.12
88+
# hooks:
89+
# - id: validate-pyproject

pyproject.toml

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[build-system]
2-
requires = ["scikit-build-core>=0.11", "pybind11==3.0.0rc2"]
2+
requires = ["scikit-build-core>=0.11", "pybind11 @ git+https://github.com/pybind/pybind11@master"]
33
build-backend = "scikit_build_core.build"
44

55
[project]
@@ -90,10 +90,10 @@ examples = [
9090
]
9191
test = [
9292
"cloudpickle",
93-
"hypothesis>=6.0",
93+
"hypothesis>=6.0; sys_platform != 'ios'", # slow on iOS, can fail health check
9494
"pytest-benchmark",
9595
"pytest>=6.0",
96-
"pytest-xdist",
96+
"pytest-xdist; sys_platform != 'ios'", # No processes on iOS
9797
"numpy",
9898
]
9999
github = [
@@ -175,15 +175,19 @@ ignore_missing_imports = true
175175
[tool.cibuildwheel]
176176
build-frontend = "build[uv]"
177177
test-groups = ["test"]
178-
test-command = "python -m pytest -n auto --benchmark-disable {project}/tests"
178+
test-command = "python -m pytest -n auto --benchmark-disable tests"
179+
test-sources = ["pyproject.toml", "tests"]
179180
test-skip = [
180181
"cp3{9,10}-win_arm64",
181182
"cp3{9,10}-musllinux_*",
182183
"pp310-manylinux_aarch64",
183184
"pp310-macosx_arm64",
184185
"cp31*-musllinux_*", # Threading test crashes
186+
"gp311_242-macosx_x86_64",
187+
"gp311_242-manylinux_aarch64",
188+
"gp311_242-win*", # pytest crashes with module 'io' has no attribute '_WindowsConsoleIO'
185189
]
186-
enable = ["cpython-freethreading", "pypy", "cpython-prerelease"]
190+
enable = ["cpython-freethreading", "pypy", "cpython-prerelease", "graalpy"]
187191
environment-pass = ["SETUPTOOLS_SCM_PRETEND_VERSION"]
188192
environment.PIP_ONLY_BINARY = "numpy"
189193
environment.PIP_PREFER_BINARY = "1"
@@ -192,7 +196,19 @@ environment.UV_PREFER_BINARY = "1"
192196

193197
[tool.cibuildwheel.pyodide]
194198
build-frontend = {name = "build", args = ["--exports", "whole_archive"]}
195-
test-command = "pytest --benchmark-disable {project}/tests"
199+
test-command = "pytest --benchmark-disable tests"
200+
201+
[tool.cibuildwheel.ios]
202+
build-frontend = "build"
203+
xbuild-tools = ["cmake", "ninja"]
204+
test-command = "pytest --benchmark-disable tests"
205+
environment.PIP_EXTRA_INDEX_URL = "https://pypi.anaconda.org/beeware/simple/"
206+
207+
[tool.cibuildwheel.android]
208+
build-frontend = "build"
209+
xbuild-tools = ["cmake", "ninja"]
210+
test-command = "pytest --benchmark-disable tests"
211+
environment.PIP_EXTRA_INDEX_URL = "https://chaquo.com/pypi-13.1"
196212

197213
[[tool.cibuildwheel.overrides]]
198214
select = "pp310-macosx_arm64"
@@ -206,6 +222,13 @@ environment.UV_EXTRA_INDEX_URL = "https://pypi.anaconda.org/scientific-python-ni
206222
environment.UV_INDEX_STRATEGY = "unsafe-best-match"
207223
environment.UV_PRERELEASE = "allow"
208224

225+
[[tool.cibuildwheel.overrides]]
226+
select = ["gp*"]
227+
inherit.environment = "append"
228+
environment.UV_EXTRA_INDEX_URL = "https://www.graalvm.org/python/wheels/"
229+
environment.UV_INDEX_STRATEGY = "unsafe-best-match"
230+
test-command = "pytest --benchmark-disable tests"
231+
209232
[tool.pylint]
210233
py-version = "3.9"
211234
ignore-patterns = ['.*\.pyi']

tests/test_pickle.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,10 @@ def test_histogram_metadata(copy_fn, metadata):
191191
sys.implementation.name == "pypy",
192192
reason="Not remotely supported on PyPY, hangs forever",
193193
)
194+
@pytest.mark.skipif(
195+
sys.implementation.name == "graalpy",
196+
reason="Not supported, throws exception",
197+
)
194198
@pytest.mark.parametrize("mod", [np, math])
195199
def test_pickle_transforms(mod, copy_fn):
196200
ax1 = bh.axis.Regular(

0 commit comments

Comments
 (0)