Skip to content

Commit 9e9d7d9

Browse files
fix: test all python releases individually, use manylinux 2_34 (#533)
1 parent 10c6ec3 commit 9e9d7d9

File tree

3 files changed

+200
-5
lines changed

3 files changed

+200
-5
lines changed

.github/action-common-python-release/action.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ inputs:
88

99
artifact-key:
1010
description: "Unique upload-artifact key. Example: 'macos' or 'linux-x86_64'"
11+
python-version:
12+
description: "Python version used for script steps and wheel"
1113
python-architecture:
1214
description: "Python architecture used for script steps"
1315
rust-target:
@@ -27,7 +29,7 @@ runs:
2729
steps:
2830
- uses: actions/setup-python@v4
2931
with:
30-
python-version: "3.12"
32+
python-version: ${{ inputs.python-version }}
3133
architecture: ${{ inputs.python-architecture }}
3234
- name: Install Rust toolchain
3335
uses: actions-rs/toolchain@v1
@@ -42,17 +44,17 @@ runs:
4244
name: Maturin - Build
4345
uses: messense/maturin-action@v1
4446
with:
45-
manylinux: '2_28'
47+
manylinux: '2_34'
4648
command: ${{ inputs.maturin-command }}
4749
target: ${{ inputs.maturin-target }}
4850
container: ${{ inputs.maturin-container }}
49-
args: -i 3.8 3.9 3.10 3.11 3.12 --release --manifest-path crates/python/Cargo.toml --out dist ${{ inputs.package-name == 'qcs-sdk-python-grpc-web' && '-F grpc-web' || '' }}
51+
args: -i ${{ inputs.python-version }} --release --manifest-path crates/python/Cargo.toml --out dist ${{ inputs.package-name == 'qcs-sdk-python-grpc-web' && '-F grpc-web' || '' }}
5052
docker-options: -e CI
5153
- if: inputs.maturin-command == 'sdist'
5254
name: Maturin - Source Distribution
5355
uses: messense/maturin-action@v1
5456
with:
55-
manylinux: '2_28'
57+
manylinux: '2_34'
5658
command: ${{ inputs.maturin-command }}
5759
target: ${{ inputs.maturin-target }}
5860
container: ${{ inputs.maturin-container }}
@@ -67,5 +69,5 @@ runs:
6769
- name: Upload wheels
6870
uses: actions/upload-artifact@v4
6971
with:
70-
name: wheels_${{ inputs.package-name }}-${{ inputs.artifact-key }}
72+
name: wheels_${{ inputs.package-name }}-${{ inputs.python-version }}-${{ inputs.artifact-key }}
7173
path: dist/
Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
# use this for testing when necessary
2+
name: Check Release Python
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
macos:
11+
runs-on: macos-latest
12+
env:
13+
CXXFLAGS: "-std=c++11 -stdlib=libc++"
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
package-name: [qcs-sdk-python, qcs-sdk-python-grpc-web]
18+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
19+
steps:
20+
- uses: actions/checkout@v4
21+
- name: Install protoc
22+
uses: arduino/setup-protoc@v1
23+
with:
24+
repo-token: ${{ secrets.GITHUB_TOKEN }}
25+
version: '3.20.1'
26+
- uses: ./.github/action-common-python-release
27+
with:
28+
artifact-key: macos
29+
package-name: ${{ matrix.package-name }}
30+
python-version: ${{ matrix.python-version }}
31+
maturin-target: universal2-apple-darwin
32+
maturin-container: ghcr.io/rust-cross/manylinux_2_28-cross:aarch64
33+
34+
linux-x86_64:
35+
runs-on: ubuntu-latest
36+
env:
37+
CXXFLAGS: "-std=c++11"
38+
strategy:
39+
fail-fast: false
40+
matrix:
41+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
42+
steps:
43+
- uses: actions/checkout@v4
44+
- name: Install protoc
45+
uses: arduino/setup-protoc@v1
46+
with:
47+
repo-token: ${{ secrets.GITHUB_TOKEN }}
48+
version: '3.20.1'
49+
- uses: ./.github/action-common-python-release
50+
with:
51+
artifact-key: linux-x86_64
52+
package-name: qcs-sdk-python
53+
python-version: ${{ matrix.python-version }}
54+
maturin-target: x86_64
55+
maturin-container: quay.io/pypa/manylinux_2_34_x86_64:latest
56+
57+
linux-aarch64:
58+
runs-on: ubuntu-24.04-arm
59+
env:
60+
CXXFLAGS: "-std=c++11"
61+
strategy:
62+
fail-fast: false
63+
matrix:
64+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
65+
steps:
66+
- uses: actions/checkout@v4
67+
- name: Install protoc
68+
uses: arduino/setup-protoc@v1
69+
with:
70+
repo-token: ${{ secrets.GITHUB_TOKEN }}
71+
version: '3.20.1'
72+
- uses: ./.github/action-common-python-release
73+
with:
74+
artifact-key: linux-aarch64
75+
package-name: qcs-sdk-python
76+
python-version: ${{ matrix.python-version }}
77+
maturin-target: aarch64
78+
79+
linux-grpc-web-x86_64:
80+
runs-on: ubuntu-latest
81+
env:
82+
CXXFLAGS: "-std=c++11"
83+
strategy:
84+
fail-fast: false
85+
matrix:
86+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
87+
steps:
88+
- uses: actions/checkout@v4
89+
- name: Install protoc
90+
uses: arduino/setup-protoc@v1
91+
with:
92+
repo-token: ${{ secrets.GITHUB_TOKEN }}
93+
version: '3.20.1'
94+
- uses: ./.github/action-common-python-release
95+
with:
96+
artifact-key: linux-grpc-web-x86_64
97+
package-name: qcs-sdk-python-grpc-web
98+
python-version: ${{ matrix.python-version }}
99+
maturin-target: x86_64
100+
101+
linux-grpc-web-ppc64le:
102+
runs-on: ubuntu-latest
103+
env:
104+
CXXFLAGS: "-std=c++11"
105+
strategy:
106+
fail-fast: false
107+
matrix:
108+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
109+
steps:
110+
- uses: actions/checkout@v4
111+
- name: Install protoc
112+
uses: arduino/setup-protoc@v1
113+
with:
114+
repo-token: ${{ secrets.GITHUB_TOKEN }}
115+
version: '3.20.1'
116+
- uses: ./.github/action-common-python-release
117+
with:
118+
artifact-key: linux-grpc-web-ppc64le
119+
package-name: qcs-sdk-python-grpc-web
120+
python-version: ${{ matrix.python-version }}
121+
maturin-target: ppc64le
122+
maturin-container: ghcr.io/rust-cross/manylinux_2_28-cross:ppc64le
123+
124+
windows:
125+
runs-on: windows-latest
126+
strategy:
127+
fail-fast: false
128+
matrix:
129+
package-name: [qcs-sdk-python, qcs-sdk-python-grpc-web]
130+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
131+
steps:
132+
- name: Enable long path support
133+
run: |
134+
reg add "HKLM\SYSTEM\CurrentControlSet\Control\FileSystem" /v LongPathsEnabled /t REG_DWORD /d 1 /f
135+
git config --system core.longpaths true
136+
- uses: actions/checkout@v4
137+
- name: Install protoc
138+
uses: arduino/setup-protoc@v1
139+
with:
140+
repo-token: ${{ secrets.GITHUB_TOKEN }}
141+
version: '3.20.1'
142+
- uses: ./.github/action-common-python-release
143+
with:
144+
artifact-key: windows
145+
package-name: ${{ matrix.package-name }}
146+
python-version: ${{ matrix.python-version }}
147+
python-architecture: x64
148+
rust-target: x86_64-pc-windows-msvc
149+
150+
sdist:
151+
runs-on: ubuntu-latest
152+
env:
153+
CXXFLAGS: "-std=c++11"
154+
strategy:
155+
fail-fast: false
156+
matrix:
157+
package-name: [qcs-sdk-python, qcs-sdk-python-grpc-web]
158+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
159+
steps:
160+
- uses: actions/checkout@v4
161+
- name: Install protoc
162+
uses: arduino/setup-protoc@v1
163+
with:
164+
repo-token: ${{ secrets.GITHUB_TOKEN }}
165+
version: '3.20.1'
166+
- uses: ./.github/action-common-python-release
167+
with:
168+
artifact-key: sdist
169+
package-name: ${{ matrix.package-name }}
170+
python-version: ${{ matrix.python-version }}
171+
maturin-command: sdist

.github/workflows/release-python.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ jobs:
3131
strategy:
3232
matrix:
3333
package-name: [qcs-sdk-python, qcs-sdk-python-grpc-web]
34+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
3435
steps:
3536
- uses: actions/checkout@v4
3637
- name: Install protoc
@@ -42,6 +43,7 @@ jobs:
4243
with:
4344
artifact-key: macos
4445
package-name: ${{ matrix.package-name }}
46+
python-version: ${{ matrix.python-version }}
4547
maturin-target: universal2-apple-darwin
4648
maturin-container: ghcr.io/rust-cross/manylinux_2_28-cross:aarch64
4749

@@ -50,6 +52,9 @@ jobs:
5052
needs: [is-python-release, should-publish-wheels]
5153
env:
5254
CXXFLAGS: "-std=c++11"
55+
strategy:
56+
matrix:
57+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
5358
steps:
5459
- uses: actions/checkout@v4
5560
- name: Install protoc
@@ -61,13 +66,17 @@ jobs:
6166
with:
6267
artifact-key: linux-x86_64
6368
package-name: qcs-sdk-python
69+
python-version: ${{ matrix.python-version }}
6470
maturin-target: x86_64
6571

6672
linux-aarch64:
6773
runs-on: ubuntu-24.04-arm
6874
needs: [is-python-release, should-publish-wheels]
6975
env:
7076
CXXFLAGS: "-std=c++11"
77+
strategy:
78+
matrix:
79+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
7180
steps:
7281
- uses: actions/checkout@v4
7382
- name: Install protoc
@@ -79,13 +88,17 @@ jobs:
7988
with:
8089
artifact-key: linux-aarch64
8190
package-name: qcs-sdk-python
91+
python-version: ${{ matrix.python-version }}
8292
maturin-target: aarch64
8393

8494
linux-grpc-web-x86_64:
8595
runs-on: ubuntu-latest
8696
needs: [is-python-release, should-publish-wheels]
8797
env:
8898
CXXFLAGS: "-std=c++11"
99+
strategy:
100+
matrix:
101+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
89102
steps:
90103
- uses: actions/checkout@v4
91104
- name: Install protoc
@@ -97,13 +110,17 @@ jobs:
97110
with:
98111
artifact-key: linux-grpc-web-x86_64
99112
package-name: qcs-sdk-python-grpc-web
113+
python-version: ${{ matrix.python-version }}
100114
maturin-target: x86_64
101115

102116
linux-grpc-web-ppc64le:
103117
runs-on: ubuntu-latest
104118
needs: [is-python-release, should-publish-wheels]
105119
env:
106120
CXXFLAGS: "-std=c++11"
121+
strategy:
122+
matrix:
123+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
107124
steps:
108125
- uses: actions/checkout@v4
109126
- name: Install protoc
@@ -115,6 +132,7 @@ jobs:
115132
with:
116133
artifact-key: linux-grpc-web-ppc64le
117134
package-name: qcs-sdk-python-grpc-web
135+
python-version: ${{ matrix.python-version }}
118136
maturin-target: ppc64le
119137
maturin-container: ghcr.io/rust-cross/manylinux_2_28-cross:ppc64le
120138

@@ -124,6 +142,7 @@ jobs:
124142
strategy:
125143
matrix:
126144
package-name: [qcs-sdk-python, qcs-sdk-python-grpc-web]
145+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
127146
steps:
128147
- name: Enable long path support
129148
run: |
@@ -139,6 +158,7 @@ jobs:
139158
with:
140159
artifact-key: windows
141160
package-name: ${{ matrix.package-name }}
161+
python-version: ${{ matrix.python-version }}
142162
python-architecture: x64
143163
rust-target: x86_64-pc-windows-msvc
144164

@@ -150,6 +170,7 @@ jobs:
150170
strategy:
151171
matrix:
152172
package-name: [qcs-sdk-python, qcs-sdk-python-grpc-web]
173+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
153174
steps:
154175
- uses: actions/checkout@v4
155176
- name: Install protoc
@@ -161,6 +182,7 @@ jobs:
161182
with:
162183
artifact-key: sdist
163184
package-name: ${{ matrix.package-name }}
185+
python-version: ${{ matrix.python-version }}
164186
maturin-command: sdist
165187

166188
publish:

0 commit comments

Comments
 (0)