Skip to content

Commit 36c56fb

Browse files
committed
Stubs and CI.
1 parent 9ecd2dc commit 36c56fb

File tree

12 files changed

+1472
-2260
lines changed

12 files changed

+1472
-2260
lines changed

.github/workflows/release.yml

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags: ['v*']
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
linux:
13+
runs-on: ubuntu-22.04
14+
strategy:
15+
matrix:
16+
target: [x86_64, aarch64]
17+
steps:
18+
- uses: actions/checkout@v4
19+
- uses: actions/setup-python@v5
20+
with:
21+
python-version: '3.x'
22+
- name: Setup QEMU
23+
if: matrix.target == 'aarch64'
24+
uses: docker/setup-qemu-action@v3
25+
- name: Build wheels
26+
uses: PyO3/maturin-action@v1
27+
with:
28+
target: ${{ matrix.target }}
29+
args: --release --out dist --find-interpreter
30+
manylinux: 2_28
31+
before-script-linux: |
32+
dnf install -y cmake gcc-c++ \
33+
libX11-devel libXrandr-devel libXinerama-devel libXcursor-devel libXi-devel \
34+
wayland-devel libxkbcommon-devel
35+
working-directory: crates/processing_pyo3
36+
- uses: actions/upload-artifact@v4
37+
with:
38+
name: wheels-linux-${{ matrix.target }}
39+
path: crates/processing_pyo3/dist
40+
41+
macos:
42+
runs-on: ${{ matrix.runner }}
43+
strategy:
44+
matrix:
45+
include:
46+
- runner: macos-14
47+
target: aarch64
48+
- runner: macos-13
49+
target: x86_64
50+
steps:
51+
- uses: actions/checkout@v4
52+
- uses: actions/setup-python@v5
53+
with:
54+
python-version: '3.x'
55+
- name: Build wheels
56+
uses: PyO3/maturin-action@v1
57+
with:
58+
target: ${{ matrix.target }}
59+
args: --release --out dist --find-interpreter
60+
working-directory: crates/processing_pyo3
61+
- uses: actions/upload-artifact@v4
62+
with:
63+
name: wheels-macos-${{ matrix.target }}
64+
path: crates/processing_pyo3/dist
65+
66+
windows:
67+
runs-on: windows-latest
68+
steps:
69+
- uses: actions/checkout@v4
70+
- uses: actions/setup-python@v5
71+
with:
72+
python-version: '3.x'
73+
- name: Build wheels
74+
uses: PyO3/maturin-action@v1
75+
with:
76+
target: x64
77+
args: --release --out dist --find-interpreter
78+
working-directory: crates/processing_pyo3
79+
- uses: actions/upload-artifact@v4
80+
with:
81+
name: wheels-windows-x64
82+
path: crates/processing_pyo3/dist
83+
84+
sdist:
85+
runs-on: ubuntu-latest
86+
steps:
87+
- uses: actions/checkout@v4
88+
- name: Build sdist
89+
uses: PyO3/maturin-action@v1
90+
with:
91+
command: sdist
92+
args: --out dist
93+
working-directory: crates/processing_pyo3
94+
- uses: actions/upload-artifact@v4
95+
with:
96+
name: wheels-sdist
97+
path: crates/processing_pyo3/dist
98+
99+
publish:
100+
name: Publish to PyPI
101+
runs-on: ubuntu-latest
102+
if: startsWith(github.ref, 'refs/tags/')
103+
needs: [linux, macos, windows, sdist]
104+
permissions:
105+
id-token: write
106+
environment: pypi
107+
steps:
108+
- uses: actions/download-artifact@v4
109+
with:
110+
pattern: wheels-*
111+
merge-multiple: true
112+
path: dist
113+
- name: Publish to PyPI
114+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)