Skip to content

Commit 90d7dde

Browse files
committed
ci: fix and enable CI for python wheel
1 parent 4450e0c commit 90d7dde

File tree

1 file changed

+19
-8
lines changed

1 file changed

+19
-8
lines changed

.github/workflows/pypi.yml

+19-8
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
1-
name: Build and Publish to PyPI
1+
name: Python Wheel
22
on:
33
push:
4+
branches:
5+
- v6
46
tags:
57
- v[0-9]+.*
68
- test-release.*
9+
workflow_dispatch:
10+
pull_request:
11+
merge_group:
712

813
jobs:
914
windows-build:
@@ -15,7 +20,7 @@ jobs:
1520
- uses: actions/checkout@v3
1621
- name: Install Rust stable
1722
uses: dtolnay/rust-toolchain@stable
18-
- uses: actions/setup-python@v4
23+
- uses: actions/setup-python@v5
1924
with:
2025
python-version: ${{ matrix.pyversion }}
2126
architecture: x64
@@ -45,26 +50,32 @@ jobs:
4550
macos-build:
4651
strategy:
4752
matrix:
48-
pyversion: ["3.11"]
53+
include:
54+
- pyversion: "3.11"
55+
arch: "x86_64"
56+
abbr-arch: x64
57+
- pyversion: "3.11"
58+
arch: "aarch64"
59+
abbr-arch: arm64
4960
runs-on: "macos-latest"
5061
steps:
5162
- uses: actions/checkout@v3
5263
- name: Install Rust stable
5364
uses: dtolnay/rust-toolchain@stable
54-
- uses: actions/setup-python@v4
65+
- uses: actions/setup-python@v5
5566
with:
5667
python-version: ${{ matrix.pyversion }}
57-
architecture: x64
68+
architecture: ${{ matrix.abbr-arch }}
5869
- name: Build Wheel (PyO3 Binding)
5970
uses: messense/maturin-action@v1
6071
with:
61-
target: x86_64
72+
target: ${{ matrix.arch }}
6273
command: build
6374
args: --release --strip -F python --bindings pyo3 --interpreter python --manifest-path Cargo.toml --out dist-pyo3
6475
- name: Build Wheel (Bin Binding)
6576
uses: messense/maturin-action@v1
6677
with:
67-
target: x86_64
78+
target: ${{ matrix.arch }}
6879
command: build
6980
args: --release --strip -F binary --bindings bin --interpreter python --manifest-path Cargo.toml --out dist-bin
7081
- name: Merge Wheels
@@ -90,7 +101,7 @@ jobs:
90101
# with:
91102
# toolchain: stable
92103
# override: true
93-
# - uses: actions/setup-python@v4
104+
# - uses: actions/setup-python@v5
94105
# with:
95106
# python-version: ${{ matrix.pyversion }}
96107
# architecture: x64

0 commit comments

Comments
 (0)