Skip to content

Commit 7c1e303

Browse files
committed
more fixes
1 parent 37aa487 commit 7c1e303

File tree

2 files changed

+226
-2
lines changed

2 files changed

+226
-2
lines changed
Lines changed: 224 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,224 @@
1+
# This file is autogenerated by maturin v1.8.3
2+
# To update, run
3+
#
4+
# maturin generate-ci github --platform all
5+
#
6+
name: CI
7+
8+
on:
9+
push:
10+
branches:
11+
- main
12+
- master
13+
tags:
14+
- '*'
15+
pull_request:
16+
workflow_dispatch:
17+
18+
permissions:
19+
contents: read
20+
21+
jobs:
22+
linux:
23+
runs-on: ${{ matrix.platform.runner }}
24+
strategy:
25+
matrix:
26+
platform:
27+
- runner: ubuntu-22.04
28+
target: x86_64
29+
- runner: ubuntu-22.04
30+
target: x86
31+
- runner: ubuntu-22.04
32+
target: aarch64
33+
- runner: ubuntu-22.04
34+
target: armv7
35+
- runner: ubuntu-22.04
36+
target: s390x
37+
- runner: ubuntu-22.04
38+
target: ppc64le
39+
steps:
40+
- uses: actions/checkout@v4
41+
- uses: actions/setup-python@v5
42+
with:
43+
python-version: 3.x
44+
- name: Build wheels
45+
uses: PyO3/maturin-action@v1
46+
with:
47+
target: ${{ matrix.platform.target }}
48+
args: --release --out dist --find-interpreter
49+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
50+
manylinux: auto
51+
- name: Upload wheels
52+
uses: actions/upload-artifact@v4
53+
with:
54+
name: wheels-linux-${{ matrix.platform.target }}
55+
path: dist
56+
57+
musllinux:
58+
runs-on: ${{ matrix.platform.runner }}
59+
strategy:
60+
matrix:
61+
platform:
62+
- runner: ubuntu-22.04
63+
target: x86_64
64+
- runner: ubuntu-22.04
65+
target: x86
66+
- runner: ubuntu-22.04
67+
target: aarch64
68+
- runner: ubuntu-22.04
69+
target: armv7
70+
steps:
71+
- uses: actions/checkout@v4
72+
- uses: actions/setup-python@v5
73+
with:
74+
python-version: 3.x
75+
- name: Build wheels
76+
uses: PyO3/maturin-action@v1
77+
with:
78+
target: ${{ matrix.platform.target }}
79+
args: --release --out dist --find-interpreter
80+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
81+
manylinux: musllinux_1_2
82+
- name: Upload wheels
83+
uses: actions/upload-artifact@v4
84+
with:
85+
name: wheels-musllinux-${{ matrix.platform.target }}
86+
path: dist
87+
88+
windows:
89+
runs-on: ${{ matrix.platform.runner }}
90+
strategy:
91+
matrix:
92+
platform:
93+
- runner: windows-latest
94+
target: x64
95+
- runner: windows-latest
96+
target: x86
97+
steps:
98+
- uses: actions/checkout@v4
99+
- uses: actions/setup-python@v5
100+
with:
101+
python-version: 3.x
102+
architecture: ${{ matrix.platform.target }}
103+
- name: Build wheels
104+
uses: PyO3/maturin-action@v1
105+
with:
106+
target: ${{ matrix.platform.target }}
107+
args: --release --out dist --find-interpreter
108+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
109+
- name: Upload wheels
110+
uses: actions/upload-artifact@v4
111+
with:
112+
name: wheels-windows-${{ matrix.platform.target }}
113+
path: dist
114+
115+
macos:
116+
runs-on: ${{ matrix.platform.runner }}
117+
strategy:
118+
matrix:
119+
platform:
120+
- runner: macos-13
121+
target: x86_64
122+
- runner: macos-14
123+
target: aarch64
124+
steps:
125+
- uses: actions/checkout@v4
126+
- uses: actions/setup-python@v5
127+
with:
128+
python-version: 3.x
129+
- name: Build wheels
130+
uses: PyO3/maturin-action@v1
131+
with:
132+
target: ${{ matrix.platform.target }}
133+
args: --release --out dist --find-interpreter
134+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
135+
- name: Upload wheels
136+
uses: actions/upload-artifact@v4
137+
with:
138+
name: wheels-macos-${{ matrix.platform.target }}
139+
path: dist
140+
141+
emscripten:
142+
runs-on: ${{ matrix.platform.runner }}
143+
strategy:
144+
matrix:
145+
platform:
146+
- runner: ubuntu-22.04
147+
target: wasm32-unknown-emscripten
148+
steps:
149+
- uses: actions/checkout@v4
150+
- run: pip install pyodide-build
151+
- name: Get Emscripten and Python version info
152+
shell: bash
153+
run: |
154+
echo EMSCRIPTEN_VERSION=$(pyodide config get emscripten_version) >> $GITHUB_ENV
155+
echo PYTHON_VERSION=$(pyodide config get python_version | cut -d '.' -f 1-2) >> $GITHUB_ENV
156+
pip uninstall -y pyodide-build
157+
- uses: mymindstorm/setup-emsdk@v12
158+
with:
159+
version: ${{ env.EMSCRIPTEN_VERSION }}
160+
actions-cache-folder: emsdk-cache
161+
- uses: actions/setup-python@v5
162+
with:
163+
python-version: ${{ env.PYTHON_VERSION }}
164+
- run: pip install pyodide-build
165+
- name: Build wheels
166+
uses: PyO3/maturin-action@v1
167+
with:
168+
target: ${{ matrix.platform.target }}
169+
args: --release --out dist -i ${{ env.PYTHON_VERSION }}
170+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
171+
rust-toolchain: nightly
172+
- name: Upload wheels
173+
uses: actions/upload-artifact@v4
174+
with:
175+
name: wasm-wheels
176+
path: dist
177+
178+
sdist:
179+
runs-on: ubuntu-latest
180+
steps:
181+
- uses: actions/checkout@v4
182+
- name: Build sdist
183+
uses: PyO3/maturin-action@v1
184+
with:
185+
command: sdist
186+
args: --out dist
187+
- name: Upload sdist
188+
uses: actions/upload-artifact@v4
189+
with:
190+
name: wheels-sdist
191+
path: dist
192+
193+
release:
194+
name: Release
195+
runs-on: ubuntu-latest
196+
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
197+
needs: [linux, musllinux, windows, macos, emscripten, sdist]
198+
permissions:
199+
# Use to sign the release artifacts
200+
id-token: write
201+
# Used to upload release artifacts
202+
contents: write
203+
# Used to generate artifact attestation
204+
attestations: write
205+
steps:
206+
- uses: actions/download-artifact@v4
207+
- name: Generate artifact attestation
208+
uses: actions/attest-build-provenance@v2
209+
with:
210+
subject-path: 'wheels-*/*'
211+
- name: Publish to PyPI
212+
if: ${{ startsWith(github.ref, 'refs/tags/') }}
213+
uses: PyO3/maturin-action@v1
214+
env:
215+
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
216+
with:
217+
command: upload
218+
args: --non-interactive --skip-existing wheels-*/*
219+
- name: Upload to GitHub Release
220+
uses: softprops/action-gh-release@v1
221+
with:
222+
files: |
223+
wasm-wheels/*.whl
224+
prerelease: ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') }}

.github/workflows/recorder-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,8 @@ jobs:
180180
if: matrix.name == 'windows-amd64'
181181
shell: pwsh
182182
run: |
183-
& "$env:PYTHON" -m pip install --upgrade pip
184-
& "$env:PYTHON" -m pip install "maturin>=1.5,<2"
183+
& "${{ steps.win_py312.outputs.python-path }}" -m pip install --upgrade pip
184+
& "${{ steps.win_py312.outputs.python-path }}" -m pip install "maturin>=1.5,<2"
185185
186186
- name: Build artefacts (macOS targets)
187187
if: startsWith(matrix.name, 'macos-')

0 commit comments

Comments
 (0)