Skip to content
This repository was archived by the owner on Apr 6, 2026. It is now read-only.

Commit d63d5c1

Browse files
authored
Add kernel-abi-check-python release workflow (#228)
1 parent 051fbc3 commit d63d5c1

7 files changed

Lines changed: 219 additions & 7 deletions

File tree

Lines changed: 212 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,212 @@
1+
# This file is autogenerated by maturin v1.9.3
2+
# To update, run
3+
#
4+
# maturin generate-ci github -m kernel-abi-check/bindings/python/Cargo.toml -o .github/workflows/kernel_abi_python_release.yaml
5+
#
6+
name: CI
7+
8+
on:
9+
push:
10+
branches:
11+
- main
12+
- master
13+
tags:
14+
- "*"
15+
pull_request:
16+
workflow_dispatch:
17+
18+
permissions:
19+
contents: read
20+
21+
jobs:
22+
linux:
23+
runs-on: ${{ matrix.platform.runner }}
24+
strategy:
25+
matrix:
26+
platform:
27+
- runner: ubuntu-22.04
28+
target: x86_64
29+
- runner: ubuntu-22.04
30+
target: x86
31+
- runner: ubuntu-22.04
32+
target: aarch64
33+
- runner: ubuntu-22.04
34+
target: armv7
35+
- runner: ubuntu-22.04
36+
target: s390x
37+
- runner: ubuntu-22.04
38+
target: ppc64le
39+
steps:
40+
- uses: actions/checkout@v4
41+
- uses: actions/setup-python@v5
42+
with:
43+
python-version: 3.x
44+
- name: Build wheels
45+
uses: PyO3/maturin-action@v1
46+
with:
47+
target: ${{ matrix.platform.target }}
48+
args: --release --out dist --manifest-path kernel-abi-check/bindings/python/Cargo.toml
49+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
50+
manylinux: auto
51+
- name: Build free-threaded wheels
52+
uses: PyO3/maturin-action@v1
53+
with:
54+
target: ${{ matrix.platform.target }}
55+
args: --release --out dist --manifest-path kernel-abi-check/bindings/python/Cargo.toml -i python3.13t
56+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
57+
manylinux: auto
58+
- name: Upload wheels
59+
uses: actions/upload-artifact@v4
60+
with:
61+
name: wheels-linux-${{ matrix.platform.target }}
62+
path: dist
63+
64+
musllinux:
65+
runs-on: ${{ matrix.platform.runner }}
66+
strategy:
67+
matrix:
68+
platform:
69+
- runner: ubuntu-22.04
70+
target: x86_64
71+
- runner: ubuntu-22.04
72+
target: x86
73+
- runner: ubuntu-22.04
74+
target: aarch64
75+
- runner: ubuntu-22.04
76+
target: armv7
77+
steps:
78+
- uses: actions/checkout@v4
79+
- uses: actions/setup-python@v5
80+
with:
81+
python-version: 3.x
82+
- name: Build wheels
83+
uses: PyO3/maturin-action@v1
84+
with:
85+
target: ${{ matrix.platform.target }}
86+
args: --release --out dist --manifest-path kernel-abi-check/bindings/python/Cargo.toml
87+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
88+
manylinux: musllinux_1_2
89+
- name: Build free-threaded wheels
90+
uses: PyO3/maturin-action@v1
91+
with:
92+
target: ${{ matrix.platform.target }}
93+
args: --release --out dist --manifest-path kernel-abi-check/bindings/python/Cargo.toml -i python3.13t
94+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
95+
manylinux: musllinux_1_2
96+
- name: Upload wheels
97+
uses: actions/upload-artifact@v4
98+
with:
99+
name: wheels-musllinux-${{ matrix.platform.target }}
100+
path: dist
101+
102+
windows:
103+
runs-on: ${{ matrix.platform.runner }}
104+
strategy:
105+
matrix:
106+
platform:
107+
- runner: windows-latest
108+
target: x64
109+
- runner: windows-latest
110+
target: x86
111+
steps:
112+
- uses: actions/checkout@v4
113+
- uses: actions/setup-python@v5
114+
with:
115+
python-version: 3.x
116+
architecture: ${{ matrix.platform.target }}
117+
- name: Build wheels
118+
uses: PyO3/maturin-action@v1
119+
with:
120+
target: ${{ matrix.platform.target }}
121+
args: --release --out dist --manifest-path kernel-abi-check/bindings/python/Cargo.toml
122+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
123+
- uses: actions/setup-python@v5
124+
with:
125+
python-version: 3.13t
126+
architecture: ${{ matrix.platform.target }}
127+
- name: Build free-threaded wheels
128+
uses: PyO3/maturin-action@v1
129+
with:
130+
target: ${{ matrix.platform.target }}
131+
args: --release --out dist --manifest-path kernel-abi-check/bindings/python/Cargo.toml -i python3.13t
132+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
133+
- name: Upload wheels
134+
uses: actions/upload-artifact@v4
135+
with:
136+
name: wheels-windows-${{ matrix.platform.target }}
137+
path: dist
138+
139+
macos:
140+
runs-on: ${{ matrix.platform.runner }}
141+
strategy:
142+
matrix:
143+
platform:
144+
- runner: macos-13
145+
target: x86_64
146+
- runner: macos-14
147+
target: aarch64
148+
steps:
149+
- uses: actions/checkout@v4
150+
- uses: actions/setup-python@v5
151+
with:
152+
python-version: 3.x
153+
- name: Build wheels
154+
uses: PyO3/maturin-action@v1
155+
with:
156+
target: ${{ matrix.platform.target }}
157+
args: --release --out dist --manifest-path kernel-abi-check/bindings/python/Cargo.toml
158+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
159+
- name: Build free-threaded wheels
160+
uses: PyO3/maturin-action@v1
161+
with:
162+
target: ${{ matrix.platform.target }}
163+
args: --release --out dist --manifest-path kernel-abi-check/bindings/python/Cargo.toml -i python3.13t
164+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
165+
- name: Upload wheels
166+
uses: actions/upload-artifact@v4
167+
with:
168+
name: wheels-macos-${{ matrix.platform.target }}
169+
path: dist
170+
171+
sdist:
172+
runs-on: ubuntu-latest
173+
steps:
174+
- uses: actions/checkout@v4
175+
- name: Build sdist
176+
uses: PyO3/maturin-action@v1
177+
with:
178+
command: sdist
179+
args: --out dist --manifest-path kernel-abi-check/bindings/python/Cargo.toml
180+
- name: Upload sdist
181+
uses: actions/upload-artifact@v4
182+
with:
183+
name: wheels-sdist
184+
path: dist
185+
186+
release:
187+
name: Release
188+
runs-on: ubuntu-latest
189+
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
190+
needs: [linux, musllinux, windows, macos, sdist]
191+
environment:
192+
name: pypi
193+
url: https://pypi.org/p/kernel-abi-check
194+
permissions:
195+
# Use to sign the release artifacts
196+
id-token: write
197+
# Used to upload release artifacts
198+
contents: write
199+
# Used to generate artifact attestation
200+
attestations: write
201+
steps:
202+
- uses: actions/download-artifact@v4
203+
- name: Generate artifact attestation
204+
uses: actions/attest-build-provenance@v2
205+
with:
206+
subject-path: "wheels-*/*"
207+
- name: Publish to PyPI
208+
if: ${{ startsWith(github.ref, 'refs/tags/') }}
209+
uses: PyO3/maturin-action@v1
210+
with:
211+
command: upload
212+
args: --non-interactive --skip-existing wheels-*/*

β€Žbuild2cmake/Cargo.lockβ€Ž

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žbuild2cmake/Cargo.tomlβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "build2cmake"
3-
version = "0.6.1"
3+
version = "0.6.2-dev0"
44
edition = "2021"
55
description = "Generate CMake files for kernel-builder projects"
66
homepage = "https://github.com/huggingface/kernel-builder"

β€Žkernel-abi-check/bindings/python/Cargo.lockβ€Ž

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žkernel-abi-check/bindings/python/Cargo.tomlβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "kernel-abi-check-python"
3-
version = "0.1.0"
3+
version = "0.6.2-dev0"
44
edition = "2024"
55
description = "Check the ABI of Hub Kernels"
66
homepage = "https://github.com/huggingface/kernel-builder"

β€Žkernel-abi-check/kernel-abi-check/Cargo.lockβ€Ž

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žkernel-abi-check/kernel-abi-check/Cargo.tomlβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "kernel-abi-check"
3-
version = "0.6.1"
3+
version = "0.6.2-dev0"
44
edition = "2021"
55
description = "Check the ABI of Hub Kernels"
66
homepage = "https://github.com/huggingface/kernel-builder"

0 commit comments

Comments
Β (0)