Skip to content

Commit 5ad5c11

Browse files
committed
checkpoint
1 parent 19ae274 commit 5ad5c11

2 files changed

Lines changed: 46 additions & 44 deletions

File tree

.github/workflows/packages.yml

Lines changed: 38 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -2,81 +2,75 @@ 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 }}
12-
cancel-in-progress: true
28+
cancel-in-progress: false
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:
1936
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" ]
37+
platform: ${{ fromJSON(inputs.platform) }}
3238

3339
steps:
34-
- name: Checkout source
35-
uses: actions/checkout@v5
40+
- uses: actions/checkout@v6
3641
with:
37-
fetch-depth: 150
38-
fetch-tags: true
3942
persist-credentials: false
4043

4144
- name: Build wheels
4245
uses: pypa/cibuildwheel@v3.1.4
46+
with:
47+
extras: uv
4348
env:
44-
CIBW_BUILD: ${{ inputs.CIBW_BUILD }}
49+
# CIBW_PLATFORM: ${{ matrix.platform }}
50+
CIBW_BUILD: ${{ inputs.build }}
51+
CIBW_ARCHS: ${{ inputs.archs }}
4552

46-
- uses: actions/upload-artifact@v4
53+
- uses: actions/upload-artifact@v6
4754
with:
48-
name: wheels-${{ matrix.platform[0] }}
55+
name: wheels-${{ matrix.platform }}
4956
path: ./wheelhouse/*.whl
5057

5158
sdist:
5259
name: Source Distribution
60+
if: inputs.sdist == true
5361
runs-on: ubuntu-latest
5462
steps:
55-
- uses: actions/checkout@v5
63+
- uses: actions/checkout@v6
5664
with:
57-
fetch-depth: 150
58-
fetch-tags: true
5965
persist-credentials: false
60-
66+
67+
- uses: astral-sh/setup-uv@v7
68+
6169
- name: Build sdist
62-
run: pipx run build --sdist
70+
run: uv build --sdist
6371

64-
- uses: actions/upload-artifact@v4
72+
- uses: actions/upload-artifact@v6
6573
with:
6674
name: sdist
6775
path: dist/*.tar.gz
6876

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: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,14 @@ 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]"

0 commit comments

Comments
 (0)