Skip to content

Commit db753a3

Browse files
committed
checkpoint
1 parent 19ae274 commit db753a3

2 files changed

Lines changed: 50 additions & 44 deletions

File tree

.github/workflows/packages.yml

Lines changed: 39 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -2,81 +2,76 @@ name: Build Packages
22
on:
33
workflow_call:
44
inputs:
5-
CIBW_BUILD:
5+
platform:
66
required: false
77
type: string
8-
default: "cp310-* cp311-* cp312-* cp313-*"
8+
default: '["ubuntu-latest", "macos-latest", "macos-15-intel", "windows-latest", "windows-11-arm"]'
9+
build:
10+
required: false
11+
type: string
12+
default: ''
13+
archs:
14+
required: false
15+
type: string
16+
default: ''
17+
wheels:
18+
required: false
19+
type: boolean
20+
default: true
21+
sdist:
22+
required: false
23+
type: boolean
24+
default: true
925

1026
concurrency:
1127
group: ${{ github.workflow}}-${{ github.head_ref }}
1228
cancel-in-progress: true
1329

1430
jobs:
1531
wheels:
16-
name: ${{ matrix.platform[0] }} Wheels
17-
runs-on: ${{ matrix.platform[1] }}
32+
name: ${{ matrix.platform }} Wheels
33+
if: inputs.wheels == true
34+
runs-on: ${{ matrix.platform }}
1835
strategy:
36+
fail-fast: false
1937
matrix:
20-
platform:
21-
- ["Linux-x64", "ubuntu-latest"]
22-
- ["Linux-arm64", "ubuntu-24.04-arm"]
23-
- ["Windows-x64", "windows-latest"]
24-
- ["Windows-arm64", "windows-11-arm"]
25-
- ["macOS-x64", "macos-15-intel"]
26-
- ["macOS-arm64", "macos-latest"]
27-
# python-version:
28-
# - [ "CPython 3.10", "cp310" ]
29-
# - [ "CPython 3.11", "cp311" ]
30-
# - [ "CPython 3.12", "cp312" ]
31-
# - [ "CPython 3.13", "cp313" ]
38+
platform: ${{ fromJSON(inputs.platform) }}
3239

3340
steps:
34-
- name: Checkout source
35-
uses: actions/checkout@v5
41+
- uses: actions/checkout@v6
3642
with:
37-
fetch-depth: 150
38-
fetch-tags: true
3943
persist-credentials: false
4044

45+
- uses: astral-sh/setup-uv@v7
46+
4147
- name: Build wheels
42-
uses: pypa/cibuildwheel@v3.1.4
48+
uses: pypa/cibuildwheel@v3.3.1
4349
env:
44-
CIBW_BUILD: ${{ inputs.CIBW_BUILD }}
50+
# CIBW_PLATFORM: ${{ matrix.platform }}
51+
CIBW_BUILD: ${{ inputs.build }}
52+
CIBW_ARCHS: ${{ inputs.archs }}
4553

46-
- uses: actions/upload-artifact@v4
54+
- uses: actions/upload-artifact@v6
4755
with:
48-
name: wheels-${{ matrix.platform[0] }}
56+
name: wheels-${{ matrix.platform }}
4957
path: ./wheelhouse/*.whl
5058

5159
sdist:
5260
name: Source Distribution
61+
if: inputs.sdist == true
5362
runs-on: ubuntu-latest
5463
steps:
55-
- uses: actions/checkout@v5
64+
- uses: actions/checkout@v6
5665
with:
57-
fetch-depth: 150
58-
fetch-tags: true
5966
persist-credentials: false
60-
67+
68+
- uses: astral-sh/setup-uv@v7
69+
6170
- name: Build sdist
62-
run: pipx run build --sdist
71+
run: uv build --sdist
6372

64-
- uses: actions/upload-artifact@v4
73+
- uses: actions/upload-artifact@v6
6574
with:
6675
name: sdist
6776
path: dist/*.tar.gz
6877

69-
gather:
70-
name: Gather Packages
71-
needs: [wheels, sdist]
72-
runs-on: ubuntu-latest
73-
steps:
74-
- uses: actions/download-artifact@v5
75-
with:
76-
path: dist
77-
merge-multiple: true
78-
79-
- uses: actions/upload-artifact@v4
80-
with:
81-
name: dist
82-
path: dist

pyproject.toml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,17 @@ max-complexity = 61
177177
[tool.ruff.lint.pydocstyle]
178178
convention = "numpy"
179179

180+
[tool.uv]
181+
required-version = ">=0.9"
182+
180183
[tool.scikit-build]
181184
metadata.version.provider = "scikit_build_core.metadata.setuptools_scm"
182185
cmake.source-dir = "src"
186+
187+
[tool.cibuildwheel]
188+
build = "cp311-* cp312-* cp313-* cp314-*"
189+
archs = "auto"
190+
build-frontend = "build[uv]"
191+
192+
[tool.cibuildwheel.macos]
193+
environment = { MACOSX_DEPLOYMENT_TARGET="10.13" }

0 commit comments

Comments
 (0)