-
Notifications
You must be signed in to change notification settings - Fork 1
74 lines (60 loc) · 1.8 KB
/
Copy pathwheels.yml
File metadata and controls
74 lines (60 loc) · 1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: python build wheels
on:
workflow_dispatch:
workflow_call:
pull_request:
branches: [ master ]
env:
FORCE_COLOR: 3
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build_sdist:
name: Build SDist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: "pip"
# - name: Ruff Check
# run: pipx run ruff check .
- name: Build SDist
run: pipx run build --sdist
- name: Check metadata
run: pipx run twine check dist/*
- uses: actions/upload-artifact@v4
with:
name: wheelhouse-sdist
path: dist/*.tar.gz
overwrite: true
build_wheels:
name: Wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- name: Build wheels
uses: pypa/cibuildwheel@v2.21.3
env:
MACOSX_DEPLOYMENT_TARGET: "10.13"
CIBW_ARCHS_MACOS: universal2
# 3.10-3.11: normal per-version build (nanobind has no stable-ABI
# support below 3.12, it silently builds a regular extension there,
# see CMakeLists.txt). 3.12: built once, tagged cp312-abi3 via
# SKBUILD_WHEEL_PY_API, and that single wheel covers every newer
# interpreter too - so 3.13+ is skipped here to avoid building a
# redundant duplicate wheel.
CIBW_ENVIRONMENT_CP312: "SKBUILD_WHEEL_PY_API=cp312"
# Disable building PyPy wheels on all platforms
CIBW_SKIP: pp*
- uses: actions/upload-artifact@v4
with:
name: wheelhouse-${{ matrix.os }}
path: wheelhouse/*.whl
overwrite: false