diff --git a/.github/workflows/tests-cibw.yml b/.github/workflows/tests-cibw.yml index aaaae1a194..34245a2a75 100644 --- a/.github/workflows/tests-cibw.yml +++ b/.github/workflows/tests-cibw.yml @@ -1,4 +1,4 @@ -name: WASM +name: CIBW on: workflow_dispatch: @@ -15,16 +15,33 @@ concurrency: jobs: build-wasm-emscripten: name: Pyodide wheel - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: submodules: true fetch-depth: 0 - - uses: pypa/cibuildwheel@v2.23 + - uses: pypa/cibuildwheel@c90accef518b1dd0253bf43b639ce21f765d6794 env: PYODIDE_BUILD_EXPORTS: whole_archive with: package-dir: tests only: cp312-pyodide_wasm32 + + build-ios: + name: iOS wheel + runs-on: macos-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: true + fetch-depth: 0 + + - run: brew upgrade cmake + + - uses: pypa/cibuildwheel@c90accef518b1dd0253bf43b639ce21f765d6794 + env: + CIBW_PLATFORM: ios + with: + package-dir: tests diff --git a/tests/pyproject.toml b/tests/pyproject.toml index 469c145dfd..3676c509ec 100644 --- a/tests/pyproject.toml +++ b/tests/pyproject.toml @@ -8,10 +8,29 @@ build-backend = "scikit_build_core.build" [project] name = "pybind11_tests" version = "0.0.1" -dependencies = ["pytest", "pytest-timeout", "numpy", "scipy"] +dependencies = ["pytest", "pytest-timeout"] + + +[dependency-groups] +numpy = ["numpy"] +scipy = ["scipy"] + + +[tool.scikit-build] +build.verbose = true +logging.level = "INFO" [tool.scikit-build.cmake.define] PYBIND11_FINDPYTHON = true + [tool.cibuildwheel] -test-command = "pytest -o timeout=0 -p no:cacheprovider {project}/tests/test_*.py" +test-sources = ["tests", "pyproject.toml"] +test-command = "python -m pytest -o timeout=0 -p no:cacheprovider tests" +environment.PIP_ONLY_BINARY = "numpy" +environment.PIP_PREFER_BINARY = "1" +pyodide.test-groups = ["numpy", "scipy"] +ios.test-groups = ["numpy"] +ios.xbuild-tools = ["cmake", "ninja"] +ios.environment.PIP_EXTRA_INDEX_URL = "https://pypi.anaconda.org/beeware/simple" +ios.config-settings."cmake.define.CMAKE_CXX_FLAGS" = "-DPYBIND11_HAS_SUBINTERPRETER_SUPPORT=0"