Skip to content

ci: add 3.14, iOS #166

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jul 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/cibw-cc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: CIBW cross-compile

on:
workflow_dispatch:
pull_request:
branches:
- master

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build-pyodide:
name: Pyodide
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5

- uses: pypa/[email protected]
env:
CIBW_PLATFORM: pyodide

- uses: actions/upload-artifact@v4
with:
name: wheels-pyodide
path: dist/*.whl

build-ios:
name: iOS
runs-on: macos-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5

- run: brew upgrade cmake

- uses: pypa/[email protected]
env:
CIBW_PLATFORM: ios
CIBW_ARCHS: all

- uses: actions/upload-artifact@v4
with:
name: wheels-ios
path: dist/*.whl
33 changes: 0 additions & 33 deletions .github/workflows/enscripten.yaml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/pip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
fail-fast: false
matrix:
platform: [windows-latest, macos-latest, ubuntu-latest]
python-version: ["3.9", "3.13", "pypy-3.10"]
python-version: ["3.9", "3.14", "pypy-3.10"]

steps:
- uses: actions/checkout@v4
Expand All @@ -26,7 +26,7 @@ jobs:
allow-prereleases: true

- name: Build and install
run: pip install --verbose .[test]
run: pip install --verbose . --group test

- name: Test
run: pytest
9 changes: 2 additions & 7 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-13, macos-latest, windows-latest]
os: [ubuntu-latest, macos-13, macos-latest, windows-latest, ubuntu-24.04-arm, windows-11-arm]

steps:
- uses: actions/checkout@v4
Expand All @@ -53,10 +53,7 @@ jobs:

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

- uses: pypa/[email protected]
env:
CIBW_ENABLE: cpython-prerelease
CIBW_ARCHS_WINDOWS: auto ARM64
- uses: pypa/[email protected]

- name: Verify clean directory
run: git diff --exit-code
Expand Down Expand Up @@ -95,5 +92,3 @@ jobs:
subject-path: "dist/*"

- uses: pypa/gh-action-pypi-publish@release/v1
with:
attestations: true
8 changes: 3 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Require CMake 3.15+ (matching scikit-build-core) Use new versions of all
# policies up to CMake 3.27
cmake_minimum_required(VERSION 3.15...3.27)
# policies up to CMake 4.0
cmake_minimum_required(VERSION 3.15...4.0)

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

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

# Add a library using FindPython's tooling (pybind11 also provides a helper like
Expand Down
25 changes: 17 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
[build-system]
requires = ["scikit-build-core>=0.10", "pybind11"]
requires = ["scikit-build-core>=0.11", "pybind11>=3.0"]
build-backend = "scikit_build_core.build"


[project]
name = "scikit_build_example"
version = "0.0.1"
license = "MIT"
license-files = ["LICENSE"]
description="A minimal example package (with pybind11)"
readme = "README.md"
authors = [
Expand All @@ -14,23 +16,23 @@ authors = [
requires-python = ">=3.9"
classifiers = [
"Development Status :: 4 - Beta",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Private :: Do Not Upload",
]

[project.optional-dependencies]

[dependency-groups]
test = ["pytest"]
dev = [{ include-group = "test" }]


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


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

[tool.cibuildwheel]
build-frontend = "build[uv]"
test-command = "pytest {project}/tests"
test-extras = ["test"]
enable = ["pypy"]
skip = ["cp314-ios*"] # broken upstream
test-command = "python -m pytest tests"
test-sources = ["pyproject.toml", "tests"]
test-groups = ["test"]

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

[tool.cibuildwheel.ios]
build-frontend = "build"
xbuild-tools = ["cmake", "ninja"]

[tool.ruff.lint]
extend-select = [
"B", # flake8-bugbear
Expand Down
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ int add(int i, int j) {

namespace py = pybind11;

PYBIND11_MODULE(_core, m) {
PYBIND11_MODULE(_core, m, py::mod_gil_not_used(), py::multiple_interpreters::per_interpreter_gil()) {
m.doc() = R"pbdoc(
Pybind11 example plugin
-----------------------
Expand Down
Loading