opthash 0.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,222 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ tags:
8
+ - 'v*'
9
+ pull_request:
10
+ workflow_dispatch:
11
+
12
+ concurrency:
13
+ group: ${{ github.workflow }}-${{ github.ref }}
14
+ cancel-in-progress: ${{ github.event_name == 'pull_request' }}
15
+
16
+ permissions:
17
+ contents: read
18
+
19
+ jobs:
20
+ linux:
21
+ runs-on: ${{ matrix.platform.runner }}
22
+ strategy:
23
+ matrix:
24
+ platform:
25
+ - runner: ubuntu-22.04
26
+ target: x86_64
27
+ - runner: ubuntu-22.04
28
+ target: x86
29
+ - runner: ubuntu-22.04
30
+ target: aarch64
31
+ - runner: ubuntu-22.04
32
+ target: armv7
33
+ - runner: ubuntu-22.04
34
+ target: s390x
35
+ - runner: ubuntu-22.04
36
+ target: ppc64le
37
+ steps:
38
+ - uses: actions/checkout@v6
39
+ - uses: actions/setup-python@v6
40
+ with:
41
+ python-version: 3.9
42
+ - name: Build wheels
43
+ uses: PyO3/maturin-action@v1
44
+ with:
45
+ target: ${{ matrix.platform.target }}
46
+ args: --release --features python --out dist
47
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
48
+ manylinux: auto
49
+ - name: Build free-threaded wheels
50
+ uses: PyO3/maturin-action@v1
51
+ with:
52
+ target: ${{ matrix.platform.target }}
53
+ args: --release --features python --out dist -i python3.14t
54
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
55
+ manylinux: auto
56
+ - name: Upload wheels
57
+ uses: actions/upload-artifact@v6
58
+ with:
59
+ name: wheels-linux-${{ matrix.platform.target }}
60
+ path: dist
61
+
62
+ musllinux:
63
+ runs-on: ${{ matrix.platform.runner }}
64
+ strategy:
65
+ matrix:
66
+ platform:
67
+ - runner: ubuntu-22.04
68
+ target: x86_64
69
+ - runner: ubuntu-22.04
70
+ target: x86
71
+ - runner: ubuntu-22.04
72
+ target: aarch64
73
+ - runner: ubuntu-22.04
74
+ target: armv7
75
+ steps:
76
+ - uses: actions/checkout@v6
77
+ - uses: actions/setup-python@v6
78
+ with:
79
+ python-version: 3.9
80
+ - name: Build wheels
81
+ uses: PyO3/maturin-action@v1
82
+ with:
83
+ target: ${{ matrix.platform.target }}
84
+ args: --release --features python --out dist
85
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
86
+ manylinux: musllinux_1_2
87
+ - name: Build free-threaded wheels
88
+ uses: PyO3/maturin-action@v1
89
+ with:
90
+ target: ${{ matrix.platform.target }}
91
+ args: --release --features python --out dist -i python3.14t
92
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
93
+ manylinux: musllinux_1_2
94
+ - name: Upload wheels
95
+ uses: actions/upload-artifact@v6
96
+ with:
97
+ name: wheels-musllinux-${{ matrix.platform.target }}
98
+ path: dist
99
+
100
+ windows:
101
+ runs-on: ${{ matrix.platform.runner }}
102
+ strategy:
103
+ matrix:
104
+ platform:
105
+ - runner: windows-latest
106
+ target: x64
107
+ python_arch: x64
108
+ - runner: windows-latest
109
+ target: x86
110
+ python_arch: x86
111
+ - runner: windows-11-arm
112
+ target: aarch64
113
+ python_arch: arm64
114
+ steps:
115
+ - uses: actions/checkout@v6
116
+ - uses: actions/setup-python@v6
117
+ with:
118
+ python-version: 3.13
119
+ architecture: ${{ matrix.platform.python_arch }}
120
+ - name: Build wheels
121
+ uses: PyO3/maturin-action@v1
122
+ with:
123
+ target: ${{ matrix.platform.target }}
124
+ args: --release --features python --out dist
125
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
126
+ - uses: actions/setup-python@v6
127
+ with:
128
+ python-version: 3.14t
129
+ architecture: ${{ matrix.platform.python_arch }}
130
+ - name: Build free-threaded wheels
131
+ uses: PyO3/maturin-action@v1
132
+ with:
133
+ target: ${{ matrix.platform.target }}
134
+ args: --release --features python --out dist -i python3.14t
135
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
136
+ - name: Upload wheels
137
+ uses: actions/upload-artifact@v6
138
+ with:
139
+ name: wheels-windows-${{ matrix.platform.target }}
140
+ path: dist
141
+
142
+ macos:
143
+ runs-on: ${{ matrix.platform.runner }}
144
+ strategy:
145
+ matrix:
146
+ platform:
147
+ - runner: macos-15-intel
148
+ target: x86_64
149
+ - runner: macos-latest
150
+ target: aarch64
151
+ steps:
152
+ - uses: actions/checkout@v6
153
+ - uses: actions/setup-python@v6
154
+ with:
155
+ python-version: 3.9
156
+ - name: Build wheels
157
+ uses: PyO3/maturin-action@v1
158
+ with:
159
+ target: ${{ matrix.platform.target }}
160
+ args: --release --features python --out dist
161
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
162
+ - uses: actions/setup-python@v6
163
+ with:
164
+ python-version: 3.14t
165
+ - name: Build free-threaded wheels
166
+ uses: PyO3/maturin-action@v1
167
+ with:
168
+ target: ${{ matrix.platform.target }}
169
+ args: --release --features python --out dist -i python3.14t
170
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
171
+ - name: Upload wheels
172
+ uses: actions/upload-artifact@v6
173
+ with:
174
+ name: wheels-macos-${{ matrix.platform.target }}
175
+ path: dist
176
+
177
+ sdist:
178
+ runs-on: ubuntu-latest
179
+ steps:
180
+ - uses: actions/checkout@v6
181
+ - name: Build sdist
182
+ uses: PyO3/maturin-action@v1
183
+ with:
184
+ command: sdist
185
+ args: --out dist
186
+ - name: Upload sdist
187
+ uses: actions/upload-artifact@v6
188
+ with:
189
+ name: wheels-sdist
190
+ path: dist
191
+
192
+ release:
193
+ name: Release
194
+ runs-on: ubuntu-latest
195
+ if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
196
+ needs: [linux, musllinux, windows, macos, sdist]
197
+ environment:
198
+ name: pypi
199
+ url: https://pypi.org/project/opthash/
200
+ permissions:
201
+ # Required for Trusted Publisher OIDC
202
+ id-token: write
203
+ # Used to upload release artifacts
204
+ contents: write
205
+ # Used to generate artifact attestation
206
+ attestations: write
207
+ steps:
208
+ - uses: actions/download-artifact@v7
209
+ - name: Flatten artifacts into dist/
210
+ run: |
211
+ mkdir -p dist
212
+ find . -type f \( -name '*.whl' -o -name '*.tar.gz' \) -exec mv -t dist {} +
213
+ ls -la dist/
214
+ - name: Generate artifact attestation
215
+ uses: actions/attest-build-provenance@v3
216
+ with:
217
+ subject-path: 'dist/*'
218
+ - name: Publish to PyPI
219
+ if: ${{ startsWith(github.ref, 'refs/tags/') }}
220
+ uses: pypa/gh-action-pypi-publish@release/v1
221
+ with:
222
+ packages-dir: dist/
@@ -0,0 +1,4 @@
1
+ {
2
+ "rust-analyzer.cargo.features": ["python"],
3
+ "rust-analyzer.check.features": ["python"]
4
+ }