Skip to content

Commit 4d16962

Browse files
authored
Update workflow (#9)
* Update workflow * Fix typo * Give non-matrix job a unique name * Add concurrency * Job-index may duplicate
1 parent 30151ff commit 4d16962

File tree

1 file changed

+37
-22
lines changed

1 file changed

+37
-22
lines changed

.github/workflows/build_and_upload_wheels.yml

Lines changed: 37 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,37 +5,43 @@ on:
55
branches: ["main"]
66
pull_request:
77

8+
concurrency:
9+
group: ${{ github.event.pull_request.number }}
10+
cancel-in-progress: true
11+
812
jobs:
913
macos_wheel_m:
10-
runs-on: macos-14
14+
runs-on: macos-latest
1115

1216
steps:
13-
- uses: actions/checkout@v3
17+
- uses: actions/checkout@v4
1418
with:
1519
submodules: recursive
1620
- name: build wheels
17-
uses: pypa/cibuildwheel@v2.19
21+
uses: pypa/cibuildwheel@v2.23
1822
env:
1923
CIBW_ARCHS: "arm64"
2024

21-
- uses: actions/upload-artifact@v3
25+
- uses: actions/upload-artifact@v4
2226
with:
27+
name: wheels-macos-latest
2328
path: ./wheelhouse/*.whl
2429

2530
macos_wheel_intel:
2631
runs-on: macos-13
2732

2833
steps:
29-
- uses: actions/checkout@v3
34+
- uses: actions/checkout@v4
3035
with:
3136
submodules: recursive
3237
- name: build wheels
33-
uses: pypa/cibuildwheel@v2.19
38+
uses: pypa/cibuildwheel@v2.23
3439
env:
3540
CIBW_ARCHS: "x86_64"
3641

37-
- uses: actions/upload-artifact@v3
42+
- uses: actions/upload-artifact@v4
3843
with:
44+
name: wheels-macos-13
3945
path: ./wheelhouse/*.whl
4046

4147

@@ -48,35 +54,40 @@ jobs:
4854

4955

5056
steps:
51-
- uses: actions/checkout@v3
57+
- uses: actions/checkout@v4
5258
with:
5359
submodules: recursive
5460
- name: build wheels
55-
uses: pypa/cibuildwheel@v2.19
61+
uses: pypa/cibuildwheel@v2.23
5662
env:
5763
CIBW_ARCHS: ${{ matrix.arch }}
5864
CIBW_BUILD: ${{ matrix.cw_build }}
5965

60-
- uses: actions/upload-artifact@v3
66+
- uses: actions/upload-artifact@v4
6167
with:
68+
name: wheels-linux-${{ strategy.job-index }}
6269
path: ./wheelhouse/*.whl
6370

6471
linux_wheel_qemu:
6572
runs-on: ubuntu-latest
6673
strategy:
6774
matrix:
6875
arch: [aarch64, ppc64le]
69-
cw_build: ["cp37*many*", "cp38*many*", "cp39*many*", "cp310*many*", "cp311*many*", "cp312*many*", "pp37*many*", "pp38*many*", "pp39*many*"]
76+
cw_build: ["cp37*many*", "cp38*many*", "cp39*many*", "cp310*many*", "cp311*many*", "cp312*many*", "cp313*many*", "pp37*many*", "pp38*many*", "pp39*many*", "pp310*many*", "pp311*many*"]
7077
exclude:
7178
- arch: ppc64le
7279
cw_build: "pp37*many*"
7380
- arch: ppc64le
7481
cw_build: "pp38*many*"
7582
- arch: ppc64le
7683
cw_build: "pp39*many*"
84+
- arch: ppc64le
85+
cw_build: "pp310*many*"
86+
- arch: ppc64le
87+
cw_build: "pp311*many*"
7788

7889
steps:
79-
- uses: actions/checkout@v3
90+
- uses: actions/checkout@v4
8091
with:
8192
submodules: recursive
8293

@@ -87,52 +98,55 @@ jobs:
8798
platforms: arm64, ppc64le
8899

89100
- name: build wheels
90-
uses: pypa/cibuildwheel@v2.16.2
101+
uses: pypa/cibuildwheel@v2.23
91102
env:
92103
CIBW_ARCHS: ${{ matrix.arch }}
93104
CIBW_BUILD: ${{ matrix.cw_build }}
94105
CIBW_TEST_SKIP: "*-*linux_{aarch64,ppc64le,s390x}"
95106

96-
- uses: actions/upload-artifact@v3
107+
- uses: actions/upload-artifact@v4
97108
with:
109+
name: wheels-linux-qemu-${{ strategy.job-index }}
98110
path: ./wheelhouse/*.whl
99111

100112

101-
102113
windows_wheel:
103114
runs-on: windows-latest
104115
strategy:
105116
matrix:
106117
arch: [x86, AMD64, ARM64]
107118

108119
steps:
109-
- uses: actions/checkout@v3
120+
- uses: actions/checkout@v4
110121
with:
111122
submodules: recursive
112123
- name: build wheels
113-
uses: pypa/cibuildwheel@v2.19
124+
uses: pypa/cibuildwheel@v2.23
114125
env:
115126
CIBW_ARCHS: ${{ matrix.arch }}
116127
CIBW_SKIP: "pp*"
117128

118129

119-
- uses: actions/upload-artifact@v3
130+
- uses: actions/upload-artifact@v4
120131
with:
132+
name: wheels-windows-${{ strategy.job-index }}
121133
path: ./wheelhouse/*.whl
122134

123135

124136
source_dist:
125137
runs-on: ubuntu-latest
126138
steps:
127-
- uses: actions/checkout@v3
139+
- uses: actions/checkout@v4
128140
with:
129141
submodules: recursive
130142

131143
- name: Build sdist
132144
run: pipx run build --sdist
133145

134-
- uses: actions/upload-artifact@v3
146+
- uses: actions/upload-artifact@v4
135147
with:
148+
# technically not a wheel
149+
name: wheels-source
136150
path: ./dist/*
137151

138152
upload_pypi:
@@ -141,9 +155,10 @@ jobs:
141155
# try to publish only if this is a push to stable branch
142156
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
143157
steps:
144-
- uses: actions/download-artifact@v3
158+
- uses: actions/download-artifact@v4
145159
with:
146-
name: artifact
160+
pattern: wheels-*
161+
merge-multiple: true
147162
path: dist
148163

149164
- uses: pypa/[email protected]

0 commit comments

Comments
 (0)