-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (70 loc) · 2.07 KB
/
python-wheels.yml
File metadata and controls
81 lines (70 loc) · 2.07 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
name: Build Python wheels
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
build-wheels:
name: Build wheels (${{ matrix.platform }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-22.04
platform: manylinux_x86_64
target: x86_64-unknown-linux-gnu
- os: ubuntu-22.04
platform: manylinux_aarch64
target: aarch64-unknown-linux-gnu
cflags_aarch64: "-march=armv8-a -D__ARM_ARCH=8"
- os: macos-14
platform: macos_aarch64
target: aarch64-apple-darwin
- os: windows-2022
platform: windows_x86_64
target: x86_64-pc-windows-msvc
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Set ring flags (linux aarch64)
if: ${{ matrix.target == 'aarch64-unknown-linux-gnu' && startsWith(matrix.platform, 'manylinux') }}
run: |
echo "CFLAGS_aarch64_unknown_linux_gnu=${{ matrix.cflags_aarch64 }}" >> $GITHUB_ENV
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
command: build
args: --release --out dist -F python-ffi
maturin-version: "1.5.1"
manylinux: auto
target: ${{ matrix.target }}
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.platform }}
path: dist/*.whl
sdist:
name: Build sdist
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Build sdist
uses: PyO3/maturin-action@v1
with:
command: sdist
args: --out dist
maturin-version: "1.5.1"
- name: Upload sdist
uses: actions/upload-artifact@v4
with:
name: sdist
path: dist/*.tar.gz