Skip to content

Commit 13e8dc8

Browse files
committed
Refine and test use of cibuildwheel
1 parent 5674efa commit 13e8dc8

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

.github/workflows/python_publish.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
name: Build/publish Python Package
22

33
# Adopted from gh:pybind/scikit_build_example
4+
# Read more on https://cibuildwheel.pypa.io/en/stable
45

5-
on:
6+
on: [push, pull-request]
67
workflow_dispatch:
78
pull_request:
89
push:
@@ -25,8 +26,6 @@ jobs:
2526
runs-on: ubuntu-latest
2627
steps:
2728
- uses: actions/checkout@v4
28-
with:
29-
submodules: true
3029

3130
- name: Build SDist
3231
run: pipx run build --sdist
@@ -41,7 +40,7 @@ jobs:
4140

4241

4342
build_wheels:
44-
name: Wheels on ${{ matrix.os }}
43+
name: Build wheels on ${{ matrix.os }}
4544
runs-on: ${{ matrix.os }}
4645
strategy:
4746
fail-fast: false
@@ -50,15 +49,18 @@ jobs:
5049

5150
steps:
5251
- uses: actions/checkout@v4
53-
with:
54-
submodules: true
5552

5653
- uses: astral-sh/setup-uv@v4
5754

58-
- uses: pypa/[email protected]
55+
- name: Build wheels
56+
uses: pypa/[email protected]
5957
env:
6058
CIBW_ENABLE: cpython-prerelease
6159
CIBW_ARCHS_WINDOWS: auto ARM64
60+
with:
61+
package-dir: .
62+
output-dir: wheelhouse
63+
config-file: "{package}/pyproject.toml"
6264

6365
- name: Verify clean directory
6466
run: git diff --exit-code

pyproject.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,15 @@ build-backend = "scikit_build_core.build"
3535
build.verbose = true # cmake --build . -v ## only visible if pip install . -v is used
3636
cmake.args = ["-DCMAKE_POLICY_VERSION_MINIMUM=3.5"] # Necessary for nlohmann_json with cmake>4.0
3737

38-
# gh:pypa/cibuildwheel
3938
# Since we distribute binary wheels we need to build for multiple os using
40-
# cibuildwheel (copied from scikit_build_example
39+
# gh:pypa/cibuildwheel
40+
# You can local test using (requires docker)
41+
# uvx cibuildwheel
4142
[tool.cibuildwheel]
4243
build-frontend = "build[uv]"
4344
test-command = "pytest {project}/tests"
4445
test-extras = ["test"]
46+
skip = "*-musllinux*" # Skip musllinux (conflicts with libcudacxx)
4547

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

0 commit comments

Comments
 (0)