Skip to content

Commit 722f609

Browse files
committed
拆分任务,加快编译速度
1 parent e74c311 commit 722f609

File tree

1 file changed

+64
-4
lines changed

1 file changed

+64
-4
lines changed

.github/workflows/ci.yml

Lines changed: 64 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,17 @@ jobs:
3030
path: dist/*.tar.gz
3131

3232

33-
build_wheels:
34-
name: Wheels on ${{ matrix.os }}
33+
build_wheels_x64:
34+
name: x64 Wheels on ${{ matrix.os }}
3535
runs-on: ${{ matrix.os }}
3636
strategy:
3737
fail-fast: false
3838
matrix:
39-
os: [ ubuntu-latest, windows-latest, macos-latest ]
39+
os: [
40+
ubuntu-latest,
41+
windows-latest,
42+
macos-latest
43+
]
4044

4145
steps:
4246
- uses: actions/checkout@v3
@@ -45,8 +49,64 @@ jobs:
4549
- name: Build Wheels
4650
uses: pypa/[email protected]
4751
env:
52+
CIBW_SKIP: "*-musllinux_x86_64 *-musllinux_i686"
4853
CIBW_ARCHS_MACOS: auto
4954
CIBW_ARCHS_WINDOWS: auto64
55+
CIBW_ARCHS_LINUX: auto64
56+
57+
- name: Upload wheels
58+
uses: actions/upload-artifact@v3
59+
with:
60+
path: wheelhouse/*.whl
61+
62+
build_wheels_x86:
63+
name: x86 Wheels on ${{ matrix.os }}
64+
runs-on: ${{ matrix.os }}
65+
strategy:
66+
fail-fast: false
67+
matrix:
68+
os: [
69+
ubuntu-latest,
70+
# windows-latest,
71+
# macos-latest
72+
]
73+
74+
steps:
75+
- uses: actions/checkout@v3
76+
with:
77+
submodules: true
78+
- name: Build Wheels
79+
uses: pypa/[email protected]
80+
env:
81+
CIBW_SKIP: "*-musllinux_x86_64 *-musllinux_i686"
82+
CIBW_ARCHS_MACOS: universal2
83+
CIBW_ARCHS_WINDOWS: auto32
84+
CIBW_ARCHS_LINUX: auto32
85+
86+
- name: Upload wheels
87+
uses: actions/upload-artifact@v3
88+
with:
89+
path: wheelhouse/*.whl
90+
91+
build_wheels_musl:
92+
name: Musl Wheels on ${{ matrix.os }}
93+
runs-on: ${{ matrix.os }}
94+
strategy:
95+
fail-fast: false
96+
matrix:
97+
os: [ ubuntu-latest ]
98+
99+
steps:
100+
- uses: actions/checkout@v3
101+
with:
102+
submodules: true
103+
- name: Build Wheels
104+
uses: pypa/[email protected]
105+
env:
106+
CIBW_BUILD: "*-musllinux_x86_64 *-musllinux_i686"
107+
CIBW_ARCHS_MACOS: universal2
108+
CIBW_ARCHS_WINDOWS: auto32
109+
CIBW_ARCHS_LINUX: auto32
50110

51111
- name: Upload wheels
52112
uses: actions/upload-artifact@v3
@@ -56,7 +116,7 @@ jobs:
56116

57117
upload_all:
58118
name: Upload if release
59-
needs: [ build_wheels, build_sdist ]
119+
needs: [ build_sdist, build_wheels_x64, build_wheels_x86, build_wheels_musl ]
60120
runs-on: ubuntu-latest
61121
if: github.event_name == 'release' && github.event.action == 'published'
62122

0 commit comments

Comments
 (0)