Skip to content

Commit 7da1d53

Browse files
authored
ci: test on iOS (#5705)
* ci: add iOS Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> * Update .github/workflows/tests-cibw.yml * ci: use test groups Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> --------- Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
1 parent c2b32b1 commit 7da1d53

File tree

2 files changed

+41
-5
lines changed

2 files changed

+41
-5
lines changed

.github/workflows/tests-cibw.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: WASM
1+
name: CIBW
22

33
on:
44
workflow_dispatch:
@@ -15,16 +15,33 @@ concurrency:
1515
jobs:
1616
build-wasm-emscripten:
1717
name: Pyodide wheel
18-
runs-on: ubuntu-22.04
18+
runs-on: ubuntu-latest
1919
steps:
2020
- uses: actions/checkout@v4
2121
with:
2222
submodules: true
2323
fetch-depth: 0
2424

25-
- uses: pypa/cibuildwheel@v2.23
25+
- uses: pypa/cibuildwheel@c90accef518b1dd0253bf43b639ce21f765d6794
2626
env:
2727
PYODIDE_BUILD_EXPORTS: whole_archive
2828
with:
2929
package-dir: tests
3030
only: cp312-pyodide_wasm32
31+
32+
build-ios:
33+
name: iOS wheel
34+
runs-on: macos-latest
35+
steps:
36+
- uses: actions/checkout@v4
37+
with:
38+
submodules: true
39+
fetch-depth: 0
40+
41+
- run: brew upgrade cmake
42+
43+
- uses: pypa/cibuildwheel@c90accef518b1dd0253bf43b639ce21f765d6794
44+
env:
45+
CIBW_PLATFORM: ios
46+
with:
47+
package-dir: tests

tests/pyproject.toml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,29 @@ build-backend = "scikit_build_core.build"
88
[project]
99
name = "pybind11_tests"
1010
version = "0.0.1"
11-
dependencies = ["pytest", "pytest-timeout", "numpy", "scipy"]
11+
dependencies = ["pytest", "pytest-timeout"]
12+
13+
14+
[dependency-groups]
15+
numpy = ["numpy"]
16+
scipy = ["scipy"]
17+
18+
19+
[tool.scikit-build]
20+
build.verbose = true
21+
logging.level = "INFO"
1222

1323
[tool.scikit-build.cmake.define]
1424
PYBIND11_FINDPYTHON = true
1525

26+
1627
[tool.cibuildwheel]
17-
test-command = "pytest -o timeout=0 -p no:cacheprovider {project}/tests/test_*.py"
28+
test-sources = ["tests", "pyproject.toml"]
29+
test-command = "python -m pytest -o timeout=0 -p no:cacheprovider tests"
30+
environment.PIP_ONLY_BINARY = "numpy"
31+
environment.PIP_PREFER_BINARY = "1"
32+
pyodide.test-groups = ["numpy", "scipy"]
33+
ios.test-groups = ["numpy"]
34+
ios.xbuild-tools = ["cmake", "ninja"]
35+
ios.environment.PIP_EXTRA_INDEX_URL = "https://pypi.anaconda.org/beeware/simple"
36+
ios.config-settings."cmake.define.CMAKE_CXX_FLAGS" = "-DPYBIND11_HAS_SUBINTERPRETER_SUPPORT=0"

0 commit comments

Comments
 (0)