Skip to content

Commit 1168dc1

Browse files
authored
ci: add 3.14, iOS (#166)
* ci: add 3.14, iOS Signed-off-by: Henry Schreiner <[email protected]> * Update cibw-cc.yaml * fix: final versions of things Signed-off-by: Henry Schreiner <[email protected]> * fix: add tags for parallel Signed-off-by: Henry Schreiner <[email protected]> * Update pyproject.toml * Update pyproject.toml --------- Signed-off-by: Henry Schreiner <[email protected]>
1 parent 9d78c1e commit 1168dc1

File tree

7 files changed

+74
-56
lines changed

7 files changed

+74
-56
lines changed

.github/workflows/cibw-cc.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: CIBW cross-compile
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
branches:
7+
- master
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
build-pyodide:
15+
name: Pyodide
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- uses: actions/setup-python@v5
21+
22+
- uses: pypa/[email protected]
23+
env:
24+
CIBW_PLATFORM: pyodide
25+
26+
- uses: actions/upload-artifact@v4
27+
with:
28+
name: wheels-pyodide
29+
path: dist/*.whl
30+
31+
build-ios:
32+
name: iOS
33+
runs-on: macos-latest
34+
steps:
35+
- uses: actions/checkout@v4
36+
37+
- uses: actions/setup-python@v5
38+
39+
- run: brew upgrade cmake
40+
41+
- uses: pypa/[email protected]
42+
env:
43+
CIBW_PLATFORM: ios
44+
CIBW_ARCHS: all
45+
46+
- uses: actions/upload-artifact@v4
47+
with:
48+
name: wheels-ios
49+
path: dist/*.whl

.github/workflows/enscripten.yaml

Lines changed: 0 additions & 33 deletions
This file was deleted.

.github/workflows/pip.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
fail-fast: false
1616
matrix:
1717
platform: [windows-latest, macos-latest, ubuntu-latest]
18-
python-version: ["3.9", "3.13", "pypy-3.10"]
18+
python-version: ["3.9", "3.14", "pypy-3.10"]
1919

2020
steps:
2121
- uses: actions/checkout@v4
@@ -26,7 +26,7 @@ jobs:
2626
allow-prereleases: true
2727

2828
- name: Build and install
29-
run: pip install --verbose .[test]
29+
run: pip install --verbose . --group test
3030

3131
- name: Test
3232
run: pytest

.github/workflows/wheels.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
strategy:
4545
fail-fast: false
4646
matrix:
47-
os: [ubuntu-latest, macos-13, macos-latest, windows-latest]
47+
os: [ubuntu-latest, macos-13, macos-latest, windows-latest, ubuntu-24.04-arm, windows-11-arm]
4848

4949
steps:
5050
- uses: actions/checkout@v4
@@ -53,10 +53,7 @@ jobs:
5353

5454
- uses: astral-sh/setup-uv@v5
5555

56-
- uses: pypa/[email protected]
57-
env:
58-
CIBW_ENABLE: cpython-prerelease
59-
CIBW_ARCHS_WINDOWS: auto ARM64
56+
- uses: pypa/[email protected]
6057

6158
- name: Verify clean directory
6259
run: git diff --exit-code
@@ -95,5 +92,3 @@ jobs:
9592
subject-path: "dist/*"
9693

9794
- uses: pypa/gh-action-pypi-publish@release/v1
98-
with:
99-
attestations: true

CMakeLists.txt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Require CMake 3.15+ (matching scikit-build-core) Use new versions of all
2-
# policies up to CMake 3.27
3-
cmake_minimum_required(VERSION 3.15...3.27)
2+
# policies up to CMake 4.0
3+
cmake_minimum_required(VERSION 3.15...4.0)
44

55
# Scikit-build-core sets these values for you, or you can just hard-code the
66
# name and version.
@@ -9,9 +9,7 @@ project(
99
VERSION ${SKBUILD_PROJECT_VERSION}
1010
LANGUAGES CXX)
1111

12-
# Find the module development requirements (requires FindPython from 3.17 or
13-
# scikit-build-core's built-in backport)
14-
find_package(Python REQUIRED COMPONENTS Interpreter Development.Module)
12+
# Find pybind11 and Python
1513
find_package(pybind11 CONFIG REQUIRED)
1614

1715
# Add a library using FindPython's tooling (pybind11 also provides a helper like

pyproject.toml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
[build-system]
2-
requires = ["scikit-build-core>=0.10", "pybind11"]
2+
requires = ["scikit-build-core>=0.11", "pybind11>=3.0"]
33
build-backend = "scikit_build_core.build"
44

55

66
[project]
77
name = "scikit_build_example"
88
version = "0.0.1"
9+
license = "MIT"
10+
license-files = ["LICENSE"]
911
description="A minimal example package (with pybind11)"
1012
readme = "README.md"
1113
authors = [
@@ -14,23 +16,23 @@ authors = [
1416
requires-python = ">=3.9"
1517
classifiers = [
1618
"Development Status :: 4 - Beta",
17-
"License :: OSI Approved :: MIT License",
1819
"Programming Language :: Python :: 3 :: Only",
19-
"Programming Language :: Python :: 3.7",
20-
"Programming Language :: Python :: 3.8",
2120
"Programming Language :: Python :: 3.9",
2221
"Programming Language :: Python :: 3.10",
2322
"Programming Language :: Python :: 3.11",
2423
"Programming Language :: Python :: 3.12",
2524
"Programming Language :: Python :: 3.13",
25+
"Programming Language :: Python :: 3.14",
26+
"Private :: Do Not Upload",
2627
]
2728

28-
[project.optional-dependencies]
29+
30+
[dependency-groups]
2931
test = ["pytest"]
32+
dev = [{ include-group = "test" }]
3033

3134

3235
[tool.scikit-build]
33-
wheel.expand-macos-universal-tags = true
3436
minimum-version = "build-system.requires"
3537

3638

@@ -48,12 +50,19 @@ testpaths = ["tests"]
4850

4951
[tool.cibuildwheel]
5052
build-frontend = "build[uv]"
51-
test-command = "pytest {project}/tests"
52-
test-extras = ["test"]
53+
enable = ["pypy"]
54+
skip = ["cp314-ios*"] # broken upstream
55+
test-command = "python -m pytest tests"
56+
test-sources = ["pyproject.toml", "tests"]
57+
test-groups = ["test"]
5358

5459
[tool.cibuildwheel.pyodide]
5560
build-frontend = {name = "build", args = ["--exports", "whole_archive"]}
5661

62+
[tool.cibuildwheel.ios]
63+
build-frontend = "build"
64+
xbuild-tools = ["cmake", "ninja"]
65+
5766
[tool.ruff.lint]
5867
extend-select = [
5968
"B", # flake8-bugbear

src/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ int add(int i, int j) {
99

1010
namespace py = pybind11;
1111

12-
PYBIND11_MODULE(_core, m) {
12+
PYBIND11_MODULE(_core, m, py::mod_gil_not_used(), py::multiple_interpreters::per_interpreter_gil()) {
1313
m.doc() = R"pbdoc(
1414
Pybind11 example plugin
1515
-----------------------

0 commit comments

Comments
 (0)