1- # This file is autogenerated by maturin v1.9.0 and manually patched for 'ring' crate compatibility
2- name : Release PyPi
1+ name : Release PyPI
32
43on :
54 push :
65 tags :
7- - " v*" # Trigger on tags starting with "v"
8- workflow_dispatch : # Allows manual triggering
6+ - " v*"
7+ workflow_dispatch :
98
109permissions :
1110 contents : read
1211
1312jobs :
13+ # Job for Linux (manylinux) and Alpine (musllinux)
1414 linux :
15- runs-on : ${{ matrix.platform.runner }}
15+ runs-on : ubuntu-latest
1616 strategy :
1717 matrix :
18- platform :
19- - runner : ubuntu-22.04
20- target : x86_64
21- - runner : ubuntu-22.04
22- target : x86
23- - runner : ubuntu-22.04
24- target : aarch64
25- - runner : ubuntu-22.04
26- target : armv7
27- - runner : ubuntu-22.04
28- target : ppc64le
29- # Added 3.14 to the list
30- python-version : ["3.11", "3.12", "3.13", "3.14"]
18+ target : [x86_64, aarch64, x86, armv7]
19+ # manylinux_2_28 is the 2026 baseline for glibc systems
20+ # musllinux_1_2 is the baseline for Alpine
21+ libc : [manylinux_2_28, musllinux_1_2]
3122 steps :
3223 - uses : actions/checkout@v4
33- - uses : actions/setup-python@v5
34- with :
35- python-version : ${{ matrix.python-version }}
3624 - name : Build wheels
3725 uses : PyO3/maturin-action@v1
3826 env :
39- # Fixes for 'ring' crate assembly on cross-compilation
27+ # Optimization for 'ring' crate assembly
4028 CFLAGS_aarch64_unknown_linux_gnu : " -march=armv8-a"
41- CFLAGS_armv7_unknown_linux_gnueabihf : " -march=armv7-a"
42- CFLAGS_powerpc64le_unknown_linux_gnu : " -mcpu=power8"
43- with :
44- target : ${{ matrix.platform.target }}
45- args : --release --out dist --find-interpreter
46- sccache : ${{ !startsWith(github.ref, 'refs/tags/') }}
47- manylinux : auto
48- - name : Upload wheels
49- uses : actions/upload-artifact@v4
50- with :
51- name : wheels-linux-${{ matrix.platform.target }}-${{ matrix.python-version }}
52- path : dist
53-
54- musllinux :
55- runs-on : ${{ matrix.platform.runner }}
56- strategy :
57- matrix :
58- platform :
59- - runner : ubuntu-22.04
60- target : x86_64
61- - runner : ubuntu-22.04
62- target : x86
63- - runner : ubuntu-22.04
64- target : aarch64
65- - runner : ubuntu-22.04
66- target : armv7
67- python-version : ["3.11", "3.12", "3.13", "3.14"]
68- steps :
69- - uses : actions/checkout@v4
70- - uses : actions/setup-python@v5
71- with :
72- python-version : ${{ matrix.python-version }}
73- - name : Build wheels
74- uses : PyO3/maturin-action@v1
75- env :
76- # Fixes for 'ring' crate assembly on musl cross-compilation
7729 CFLAGS_aarch64_unknown_linux_musl : " -march=armv8-a"
30+ CFLAGS_armv7_unknown_linux_gnueabihf : " -march=armv7-a"
7831 CFLAGS_armv7_unknown_linux_musleabihf : " -march=armv7-a"
7932 with :
80- target : ${{ matrix.platform. target }}
81- args : --release --out dist --find-interpreter
82- sccache : ${{ !startsWith(github.ref, 'refs/tags/') }}
83- manylinux : musllinux_1_2
33+ target : ${{ matrix.target }}
34+ # One build per arch thanks to abi3
35+ args : --release --out dist --features python
36+ manylinux : ${{ matrix.libc }}
8437 - name : Upload wheels
8538 uses : actions/upload-artifact@v4
8639 with :
87- name : wheels-musllinux -${{ matrix.platform. target }}-${{ matrix.python-version }}
40+ name : wheels-linux -${{ matrix.target }}-${{ matrix.libc }}
8841 path : dist
8942
9043 windows :
91- runs-on : ${{ matrix.platform.runner }}
44+ runs-on : windows-latest
9245 strategy :
9346 matrix :
94- platform :
95- - runner : windows-latest
96- target : x64
97- - runner : windows-latest
98- target : x86
99- python-version : ["3.11", "3.12", "3.13", "3.14"]
47+ target : [x64, arm64] # ARM64 is essential for Windows in 2026
10048 steps :
10149 - uses : actions/checkout@v4
102- - uses : actions/setup-python@v5
103- with :
104- python-version : ${{ matrix.python-version }}
105- architecture : ${{ matrix.platform.target }}
10650 - name : Build wheels
10751 uses : PyO3/maturin-action@v1
10852 with :
109- target : ${{ matrix.platform.target }}
110- args : --release --out dist --find-interpreter
111- sccache : ${{ !startsWith(github.ref, 'refs/tags/') }}
53+ target : ${{ matrix.target }}
54+ args : --release --out dist --features python
11255 - name : Upload wheels
11356 uses : actions/upload-artifact@v4
11457 with :
115- name : wheels-windows-${{ matrix.platform. target }}-${{ matrix.python-version }}
58+ name : wheels-windows-${{ matrix.target }}
11659 path : dist
11760
11861 macos :
119- runs-on : ${{ matrix.platform.runner }}
62+ runs-on : macos-latest
12063 strategy :
12164 matrix :
122- platform :
123- - runner : macos-14
124- target : aarch64
125- - runner : macos-13
126- target : x86_64
127- python-version : ["3.11", "3.12", "3.13", "3.14"]
65+ target : [universal2] # Creates one wheel for both Intel and Apple Silicon
12866 steps :
12967 - uses : actions/checkout@v4
130- - uses : actions/setup-python@v5
131- with :
132- python-version : ${{ matrix.python-version }}
13368 - name : Build wheels
13469 uses : PyO3/maturin-action@v1
13570 with :
136- target : ${{ matrix.platform.target }}
137- args : --release --out dist --find-interpreter
138- sccache : ${{ !startsWith(github.ref, 'refs/tags/') }}
71+ target : ${{ matrix.target }}
72+ args : --release --out dist --features python
13973 - name : Upload wheels
14074 uses : actions/upload-artifact@v4
14175 with :
142- name : wheels-macos-${{ matrix.platform. target }}-${{ matrix.python-version }}
76+ name : wheels-macos-${{ matrix.target }}
14377 path : dist
14478
14579 sdist :
@@ -160,21 +94,31 @@ jobs:
16094 release :
16195 name : Release
16296 runs-on : ubuntu-latest
163- if : ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
164- needs : [linux, musllinux, windows, macos, sdist]
97+ if : startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch'
98+ needs : [linux, windows, macos, sdist]
16599 permissions :
166- id-token : write
167- contents : write
168- attestations : write
100+ id-token : write # Required for Trusted Publishing
101+ contents : write # Required for GitHub Release
102+ attestations : write # Required for Build Provenance
169103 steps :
170104 - uses : actions/download-artifact@v4
105+ with :
106+ pattern : wheels-*
107+ path : .
108+ merge-multiple : true
109+
171110 - name : Generate artifact attestation
172111 uses : actions/attest-build-provenance@v2
173112 with :
174- subject-path : " wheels-*/*"
113+ subject-path : " *"
114+
175115 - name : Publish to PyPI
176- if : ${{ startsWith(github.ref, 'refs/tags/') }}
177- uses : PyO3/maturin-action@v1
116+ uses : pypa/gh-action-pypi-publish@release/v1
117+ with :
118+ print-hash : true
119+
120+ - name : Create GitHub Release
121+ uses : softprops/action-gh-release@v2
178122 with :
179- command : upload
180- args : --non-interactive --skip-existing wheels-*/*
123+ files : " * "
124+ generate_release_notes : true
0 commit comments