Skip to content

Commit 0dd610d

Browse files
ci: add iOS wheels (#1020)
* ci: add iOS wheels Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> * style: pre-commit fixes * Update pyproject.toml * Update pyproject.toml --------- Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent e5a7a7a commit 0dd610d

File tree

3 files changed

+54
-13
lines changed

3 files changed

+54
-13
lines changed

.github/workflows/wheels.yml

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ jobs:
100100

101101
- uses: astral-sh/setup-uv@v6
102102

103-
- uses: mhsmith/cibuildwheel@android
103+
- uses: pypa/cibuildwheel@v3.0.0rc2
104104
env:
105105
CIBW_BUILD: ${{ matrix.build }}
106106
CIBW_ARCHS: ${{ matrix.arch }}
@@ -115,9 +115,39 @@ 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: pypa/cibuildwheel@v3.0.0rc2
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+
118148
upload_all:
119149
name: Upload if release
120-
needs: [build_wheels, build_sdist]
150+
needs: [build_wheels, build_ios_wheels, build_sdist]
121151
runs-on: ubuntu-latest
122152
if: github.event_name == 'release' && github.event.action == 'published'
123153
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: 17 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==3.0.0rc3"]
33
build-backend = "scikit_build_core.build"
44

55
[project]
@@ -88,14 +88,17 @@ examples = [
8888
"xarray",
8989
"xhistogram",
9090
]
91-
test = [
91+
test-core = [
9292
"cloudpickle",
93-
"hypothesis>=6.0",
9493
"pytest-benchmark",
9594
"pytest>=6.0",
96-
"pytest-xdist",
9795
"numpy",
9896
]
97+
test = [
98+
{ include-group = "test-core" },
99+
"hypothesis>=6.0; sys_platform != 'ios'", # slow on iOS, can fail health check
100+
"pytest-xdist; sys_platform != 'ios'", # No processes on iOS
101+
]
99102
github = [
100103
{ include-group = "test" },
101104
"setuptools_scm",
@@ -175,7 +178,8 @@ ignore_missing_imports = true
175178
[tool.cibuildwheel]
176179
build-frontend = "build[uv]"
177180
test-groups = ["test"]
178-
test-command = "python -m pytest -n auto --benchmark-disable {project}/tests"
181+
test-command = "python -m pytest -n auto --benchmark-disable tests"
182+
test-sources = ["pyproject.toml", "tests"]
179183
test-skip = [
180184
"cp3{9,10}-win_arm64",
181185
"cp3{9,10}-musllinux_*",
@@ -192,7 +196,14 @@ 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+
test-groups = ["test-core"] # Working around a bug with markers in pyodide
201+
202+
[tool.cibuildwheel.ios]
203+
build-frontend = "build"
204+
xbuild-tools = ["cmake", "ninja"]
205+
test-command = "pytest --benchmark-disable tests"
206+
environment.PIP_EXTRA_INDEX_URL = "https://pypi.anaconda.org/beeware/simple/"
196207

197208
[[tool.cibuildwheel.overrides]]
198209
select = "pp310-macosx_arm64"

0 commit comments

Comments
 (0)