Skip to content

Commit 2f41496

Browse files
committed
Update build_and_publish.yml
1 parent fd105ec commit 2f41496

1 file changed

Lines changed: 127 additions & 127 deletions

File tree

.github/workflows/build_and_publish.yml

Lines changed: 127 additions & 127 deletions
Original file line numberDiff line numberDiff line change
@@ -9,98 +9,98 @@ permissions:
99
contents: read
1010

1111
jobs:
12-
# linux:
13-
# runs-on: ${{ matrix.platform.runner }}
14-
# strategy:
15-
# matrix:
16-
# platform:
17-
# - runner: ubuntu-latest
18-
# target: x86_64
19-
# - runner: ubuntu-latest
20-
# target: x86
21-
# - runner: ubuntu-latest
22-
# target: aarch64
23-
# - runner: ubuntu-latest
24-
# target: armv7
25-
# - runner: ubuntu-latest
26-
# target: s390x
27-
# - runner: ubuntu-latest
28-
# target: ppc64le
29-
# steps:
30-
# - uses: actions/checkout@v4
31-
# - uses: actions/setup-python@v5
32-
# with:
33-
# python-version: 3.x
34-
# - name: Build wheels
35-
# uses: PyO3/maturin-action@v1
36-
# with:
37-
# target: ${{ matrix.platform.target }}
38-
# args: --release --out dist --find-interpreter
39-
# sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
40-
# manylinux: auto
41-
# - name: Upload wheels
42-
# uses: actions/upload-artifact@v4
43-
# with:
44-
# name: wheels-linux-${{ matrix.platform.target }}
45-
# path: dist
12+
linux:
13+
runs-on: ${{ matrix.platform.runner }}
14+
strategy:
15+
matrix:
16+
platform:
17+
- runner: ubuntu-latest
18+
target: x86_64
19+
- runner: ubuntu-latest
20+
target: x86
21+
- runner: ubuntu-latest
22+
target: aarch64
23+
- runner: ubuntu-latest
24+
target: armv7
25+
- runner: ubuntu-latest
26+
target: s390x
27+
- runner: ubuntu-latest
28+
target: ppc64le
29+
steps:
30+
- uses: actions/checkout@v4
31+
- uses: actions/setup-python@v5
32+
with:
33+
python-version: 3.x
34+
- name: Build wheels
35+
uses: PyO3/maturin-action@v1
36+
with:
37+
target: ${{ matrix.platform.target }}
38+
args: --release --out dist --find-interpreter
39+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
40+
manylinux: auto
41+
- name: Upload wheels
42+
uses: actions/upload-artifact@v4
43+
with:
44+
name: wheels-linux-${{ matrix.platform.target }}
45+
path: dist
4646

47-
# musllinux:
48-
# runs-on: ${{ matrix.platform.runner }}
49-
# strategy:
50-
# matrix:
51-
# platform:
52-
# - runner: ubuntu-latest
53-
# target: x86_64
54-
# - runner: ubuntu-latest
55-
# target: x86
56-
# - runner: ubuntu-latest
57-
# target: aarch64
58-
# - runner: ubuntu-latest
59-
# target: armv7
60-
# steps:
61-
# - uses: actions/checkout@v4
62-
# - uses: actions/setup-python@v5
63-
# with:
64-
# python-version: 3.x
65-
# - name: Build wheels
66-
# uses: PyO3/maturin-action@v1
67-
# with:
68-
# target: ${{ matrix.platform.target }}
69-
# args: --release --out dist --find-interpreter
70-
# sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
71-
# manylinux: musllinux_1_2
72-
# - name: Upload wheels
73-
# uses: actions/upload-artifact@v4
74-
# with:
75-
# name: wheels-musllinux-${{ matrix.platform.target }}
76-
# path: dist
47+
musllinux:
48+
runs-on: ${{ matrix.platform.runner }}
49+
strategy:
50+
matrix:
51+
platform:
52+
- runner: ubuntu-latest
53+
target: x86_64
54+
- runner: ubuntu-latest
55+
target: x86
56+
- runner: ubuntu-latest
57+
target: aarch64
58+
- runner: ubuntu-latest
59+
target: armv7
60+
steps:
61+
- uses: actions/checkout@v4
62+
- uses: actions/setup-python@v5
63+
with:
64+
python-version: 3.x
65+
- name: Build wheels
66+
uses: PyO3/maturin-action@v1
67+
with:
68+
target: ${{ matrix.platform.target }}
69+
args: --release --out dist --find-interpreter
70+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
71+
manylinux: musllinux_1_2
72+
- name: Upload wheels
73+
uses: actions/upload-artifact@v4
74+
with:
75+
name: wheels-musllinux-${{ matrix.platform.target }}
76+
path: dist
7777

78-
# windows:
79-
# runs-on: ${{ matrix.platform.runner }}
80-
# strategy:
81-
# matrix:
82-
# platform:
83-
# - runner: windows-latest
84-
# target: x64
85-
# - runner: windows-latest
86-
# target: x86
87-
# steps:
88-
# - uses: actions/checkout@v4
89-
# - uses: actions/setup-python@v5
90-
# with:
91-
# python-version: 3.x
92-
# architecture: ${{ matrix.platform.target }}
93-
# - name: Build wheels
94-
# uses: PyO3/maturin-action@v1
95-
# with:
96-
# target: ${{ matrix.platform.target }}
97-
# args: --release --out dist --find-interpreter
98-
# sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
99-
# - name: Upload wheels
100-
# uses: actions/upload-artifact@v4
101-
# with:
102-
# name: wheels-windows-${{ matrix.platform.target }}
103-
# path: dist
78+
windows:
79+
runs-on: ${{ matrix.platform.runner }}
80+
strategy:
81+
matrix:
82+
platform:
83+
- runner: windows-latest
84+
target: x64
85+
- runner: windows-latest
86+
target: x86
87+
steps:
88+
- uses: actions/checkout@v4
89+
- uses: actions/setup-python@v5
90+
with:
91+
python-version: 3.x
92+
architecture: ${{ matrix.platform.target }}
93+
- name: Build wheels
94+
uses: PyO3/maturin-action@v1
95+
with:
96+
target: ${{ matrix.platform.target }}
97+
args: --release --out dist --find-interpreter
98+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
99+
- name: Upload wheels
100+
uses: actions/upload-artifact@v4
101+
with:
102+
name: wheels-windows-${{ matrix.platform.target }}
103+
path: dist
104104

105105
macos:
106106
runs-on: ${{ matrix.platform.runner }}
@@ -158,41 +158,41 @@ jobs:
158158
name: wheels-macos-${{ matrix.platform.target }}
159159
path: dist
160160

161-
# sdist:
162-
# runs-on: ubuntu-latest
163-
# steps:
164-
# - uses: actions/checkout@v4
165-
# - name: Build sdist
166-
# uses: PyO3/maturin-action@v1
167-
# with:
168-
# command: sdist
169-
# args: --out dist
170-
# - name: Upload sdist
171-
# uses: actions/upload-artifact@v4
172-
# with:
173-
# name: wheels-sdist
174-
# path: dist
161+
sdist:
162+
runs-on: ubuntu-latest
163+
steps:
164+
- uses: actions/checkout@v4
165+
- name: Build sdist
166+
uses: PyO3/maturin-action@v1
167+
with:
168+
command: sdist
169+
args: --out dist
170+
- name: Upload sdist
171+
uses: actions/upload-artifact@v4
172+
with:
173+
name: wheels-sdist
174+
path: dist
175175

176-
# release:
177-
# name: Release
178-
# runs-on: ubuntu-latest
179-
# needs: [linux, musllinux, windows, macos, sdist]
180-
# environment: pypi
181-
# permissions:
182-
# # Use to sign the release artifacts
183-
# id-token: write
184-
# # Used to upload release artifacts
185-
# contents: write
186-
# # Used to generate artifact attestation
187-
# attestations: write
188-
# steps:
189-
# - uses: actions/download-artifact@v4
190-
# - name: Generate artifact attestation
191-
# uses: actions/attest-build-provenance@v2
192-
# with:
193-
# subject-path: 'wheels-*/*'
194-
# - name: Publish to PyPI
195-
# uses: PyO3/maturin-action@v1
196-
# with:
197-
# command: upload
198-
# args: --non-interactive --skip-existing wheels-*/*
176+
release:
177+
name: Release
178+
runs-on: ubuntu-latest
179+
needs: [linux, musllinux, windows, macos, sdist]
180+
environment: pypi
181+
permissions:
182+
# Use to sign the release artifacts
183+
id-token: write
184+
# Used to upload release artifacts
185+
contents: write
186+
# Used to generate artifact attestation
187+
attestations: write
188+
steps:
189+
- uses: actions/download-artifact@v4
190+
- name: Generate artifact attestation
191+
uses: actions/attest-build-provenance@v2
192+
with:
193+
subject-path: 'wheels-*/*'
194+
- name: Publish to PyPI
195+
uses: PyO3/maturin-action@v1
196+
with:
197+
command: upload
198+
args: --non-interactive --skip-existing wheels-*/*

0 commit comments

Comments
 (0)