-
Notifications
You must be signed in to change notification settings - Fork 0
114 lines (99 loc) · 2.76 KB
/
wheels.yml
File metadata and controls
114 lines (99 loc) · 2.76 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
name: Build and publish wheels
on:
push:
branches:
- "master"
tags:
- "v*"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- name: Set up uv
uses: astral-sh/setup-uv@v7
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.x"
- name: Build sdist
run: uv build --sdist
- uses: actions/upload-artifact@v7
with:
name: sdist
path: dist/*.tar.gz
build_wheels:
name: Build wheels on ${{ matrix.name }}
runs-on: ${{ matrix.runs_on }}
needs: [build_sdist]
strategy:
fail-fast: true
matrix:
include:
- name: windows-latest
runs_on: windows-latest
artifact_name: windows
cibw_archs_windows: "AMD64 x86"
cibw_skip: ""
setup_qemu: false
- name: windows-11-arm
runs_on: windows-11-arm
artifact_name: windows-arm64
cibw_archs_windows: "ARM64"
cibw_skip: ""
setup_qemu: false
- name: macos-latest
runs_on: macos-latest
artifact_name: macos-latest
cibw_archs_windows: ""
cibw_skip: ""
setup_qemu: false
- name: ubuntu-latest
runs_on: ubuntu-latest
artifact_name: manylinux
cibw_archs_windows: ""
cibw_skip: "*-musllinux*"
setup_qemu: true
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- name: Set up QEMU
if: ${{ matrix.setup_qemu }}
uses: docker/setup-qemu-action@v4
with:
platforms: all
- name: Build wheels
uses: pypa/cibuildwheel@v3.4.1
env:
CIBW_TEST_SKIP: "*"
CIBW_ARCHS_WINDOWS: ${{ matrix.cibw_archs_windows }}
CIBW_SKIP: ${{ matrix.cibw_skip }}
- uses: actions/upload-artifact@v7
with:
name: ${{ matrix.artifact_name }}
path: ./wheelhouse/*.whl
retention-days: 1
publish:
name: Publish to PyPI
runs-on: ubuntu-latest
needs: [build_sdist, build_wheels]
if: ${{ success() && startsWith(github.ref, 'refs/tags/v') }}
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v8
with:
path: dist
merge-multiple: true
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true