Skip to content

Commit 32cb770

Browse files
move build to separate workflow and call from release
so i can test the building of wheels here
1 parent 1156624 commit 32cb770

File tree

2 files changed

+163
-147
lines changed

2 files changed

+163
-147
lines changed

.github/workflows/build.yml

Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
name: build
2+
3+
on:
4+
workflow_call:
5+
workflow_dispatch:
6+
7+
concurrency:
8+
group: build-${{ github.head_ref }}
9+
cancel-in-progress: true
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
linux:
16+
runs-on: ${{ matrix.platform.runner }}
17+
strategy:
18+
matrix:
19+
platform:
20+
- runner: ubuntu-22.04
21+
target: x86_64
22+
- runner: ubuntu-22.04
23+
target: x86
24+
- runner: ubuntu-22.04
25+
target: aarch64
26+
- runner: ubuntu-22.04
27+
target: armv7
28+
- runner: ubuntu-22.04
29+
target: s390x
30+
- runner: ubuntu-22.04
31+
target: ppc64le
32+
steps:
33+
- uses: actions/checkout@v4
34+
35+
- uses: actions/setup-python@v5
36+
with:
37+
python-version: 3.x
38+
39+
- name: Build wheels
40+
uses: PyO3/maturin-action@v1
41+
with:
42+
target: ${{ matrix.platform.target }}
43+
args: --release --out dist --find-interpreter
44+
sccache: "true"
45+
manylinux: auto
46+
47+
- name: Upload wheels
48+
uses: actions/upload-artifact@v4
49+
with:
50+
name: wheels-linux-${{ matrix.platform.target }}
51+
path: dist
52+
53+
musllinux:
54+
runs-on: ${{ matrix.platform.runner }}
55+
strategy:
56+
matrix:
57+
platform:
58+
- runner: ubuntu-22.04
59+
target: x86_64
60+
- runner: ubuntu-22.04
61+
target: x86
62+
- runner: ubuntu-22.04
63+
target: aarch64
64+
- runner: ubuntu-22.04
65+
target: armv7
66+
steps:
67+
- uses: actions/checkout@v4
68+
69+
- uses: actions/setup-python@v5
70+
with:
71+
python-version: 3.x
72+
73+
- name: Build wheels
74+
uses: PyO3/maturin-action@v1
75+
with:
76+
target: ${{ matrix.platform.target }}
77+
args: --release --out dist --find-interpreter
78+
manylinux: musllinux_1_2
79+
80+
- name: Upload wheels
81+
uses: actions/upload-artifact@v4
82+
with:
83+
name: wheels-musllinux-${{ matrix.platform.target }}
84+
path: dist
85+
86+
windows:
87+
runs-on: ${{ matrix.platform.runner }}
88+
strategy:
89+
matrix:
90+
platform:
91+
- runner: windows-latest
92+
target: x64
93+
- runner: windows-latest
94+
target: x86
95+
steps:
96+
- uses: actions/checkout@v4
97+
98+
- uses: actions/setup-python@v5
99+
with:
100+
python-version: 3.x
101+
architecture: ${{ matrix.platform.target }}
102+
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: "true"
109+
110+
- name: Upload wheels
111+
uses: actions/upload-artifact@v4
112+
with:
113+
name: wheels-windows-${{ matrix.platform.target }}
114+
path: dist
115+
116+
macos:
117+
runs-on: ${{ matrix.platform.runner }}
118+
strategy:
119+
matrix:
120+
platform:
121+
- runner: macos-13
122+
target: x86_64
123+
- runner: macos-14
124+
target: aarch64
125+
steps:
126+
- uses: actions/checkout@v4
127+
128+
- uses: actions/setup-python@v5
129+
with:
130+
python-version: 3.x
131+
132+
- name: Build wheels
133+
uses: PyO3/maturin-action@v1
134+
with:
135+
target: ${{ matrix.platform.target }}
136+
args: --release --out dist --find-interpreter
137+
sccache: "true"
138+
139+
- name: Upload wheels
140+
uses: actions/upload-artifact@v4
141+
with:
142+
name: wheels-macos-${{ matrix.platform.target }}
143+
path: dist
144+
145+
sdist:
146+
runs-on: ubuntu-latest
147+
steps:
148+
- uses: actions/checkout@v4
149+
150+
- name: Build sdist
151+
uses: PyO3/maturin-action@v1
152+
with:
153+
command: sdist
154+
args: --out dist
155+
156+
- name: Upload sdist
157+
uses: actions/upload-artifact@v4
158+
with:
159+
name: wheels-sdist
160+
path: dist

.github/workflows/release.yml

Lines changed: 3 additions & 147 deletions
Original file line numberDiff line numberDiff line change
@@ -20,152 +20,8 @@ permissions:
2020
contents: read
2121

2222
jobs:
23-
linux:
24-
runs-on: ${{ matrix.platform.runner }}
25-
strategy:
26-
matrix:
27-
platform:
28-
- runner: ubuntu-22.04
29-
target: x86_64
30-
- runner: ubuntu-22.04
31-
target: x86
32-
- runner: ubuntu-22.04
33-
target: aarch64
34-
- runner: ubuntu-22.04
35-
target: armv7
36-
- runner: ubuntu-22.04
37-
target: s390x
38-
- runner: ubuntu-22.04
39-
target: ppc64le
40-
steps:
41-
- uses: actions/checkout@v4
42-
43-
- uses: actions/setup-python@v5
44-
with:
45-
python-version: 3.x
46-
47-
- name: Build wheels
48-
uses: PyO3/maturin-action@v1
49-
with:
50-
target: ${{ matrix.platform.target }}
51-
args: --release --out dist --find-interpreter
52-
sccache: "true"
53-
manylinux: auto
54-
55-
- name: Upload wheels
56-
uses: actions/upload-artifact@v4
57-
with:
58-
name: wheels-linux-${{ matrix.platform.target }}
59-
path: dist
60-
61-
musllinux:
62-
runs-on: ${{ matrix.platform.runner }}
63-
strategy:
64-
matrix:
65-
platform:
66-
- runner: ubuntu-22.04
67-
target: x86_64
68-
- runner: ubuntu-22.04
69-
target: x86
70-
- runner: ubuntu-22.04
71-
target: aarch64
72-
- runner: ubuntu-22.04
73-
target: armv7
74-
steps:
75-
- uses: actions/checkout@v4
76-
77-
- uses: actions/setup-python@v5
78-
with:
79-
python-version: 3.x
80-
81-
- name: Build wheels
82-
uses: PyO3/maturin-action@v1
83-
with:
84-
target: ${{ matrix.platform.target }}
85-
args: --release --out dist --find-interpreter
86-
manylinux: musllinux_1_2
87-
88-
- name: Upload wheels
89-
uses: actions/upload-artifact@v4
90-
with:
91-
name: wheels-musllinux-${{ matrix.platform.target }}
92-
path: dist
93-
94-
windows:
95-
runs-on: ${{ matrix.platform.runner }}
96-
strategy:
97-
matrix:
98-
platform:
99-
- runner: windows-latest
100-
target: x64
101-
- runner: windows-latest
102-
target: x86
103-
steps:
104-
- uses: actions/checkout@v4
105-
106-
- uses: actions/setup-python@v5
107-
with:
108-
python-version: 3.x
109-
architecture: ${{ matrix.platform.target }}
110-
111-
- name: Build wheels
112-
uses: PyO3/maturin-action@v1
113-
with:
114-
target: ${{ matrix.platform.target }}
115-
args: --release --out dist --find-interpreter
116-
sccache: "true"
117-
118-
- name: Upload wheels
119-
uses: actions/upload-artifact@v4
120-
with:
121-
name: wheels-windows-${{ matrix.platform.target }}
122-
path: dist
123-
124-
macos:
125-
runs-on: ${{ matrix.platform.runner }}
126-
strategy:
127-
matrix:
128-
platform:
129-
- runner: macos-13
130-
target: x86_64
131-
- runner: macos-14
132-
target: aarch64
133-
steps:
134-
- uses: actions/checkout@v4
135-
136-
- uses: actions/setup-python@v5
137-
with:
138-
python-version: 3.x
139-
140-
- name: Build wheels
141-
uses: PyO3/maturin-action@v1
142-
with:
143-
target: ${{ matrix.platform.target }}
144-
args: --release --out dist --find-interpreter
145-
sccache: "true"
146-
147-
- name: Upload wheels
148-
uses: actions/upload-artifact@v4
149-
with:
150-
name: wheels-macos-${{ matrix.platform.target }}
151-
path: dist
152-
153-
sdist:
154-
runs-on: ubuntu-latest
155-
steps:
156-
- uses: actions/checkout@v4
157-
158-
- name: Build sdist
159-
uses: PyO3/maturin-action@v1
160-
with:
161-
command: sdist
162-
args: --out dist
163-
164-
- name: Upload sdist
165-
uses: actions/upload-artifact@v4
166-
with:
167-
name: wheels-sdist
168-
path: dist
23+
build:
24+
uses: ./.github/workflows/build.yml
16925

17026
test:
17127
uses: ./.github/workflows/test.yml
@@ -176,7 +32,7 @@ jobs:
17632
release:
17733
runs-on: ubuntu-latest
17834
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
179-
needs: [linux, musllinux, windows, macos, sdist, test]
35+
needs: [build, test]
18036
environment: release
18137
permissions:
18238
# Use to sign the release artifacts

0 commit comments

Comments
 (0)