Skip to content

Commit 546d5d1

Browse files
authored
mewnala (#90)
1 parent 5775093 commit 546d5d1

File tree

20 files changed

+1079
-2528
lines changed

20 files changed

+1079
-2528
lines changed

.github/workflows/release.yml

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

0 commit comments

Comments
 (0)