@@ -20,7 +20,7 @@ defaults:
20
20
21
21
jobs :
22
22
build_wheels :
23
- name : Build wheel for ${{ matrix.python }}- ${{ matrix.buildplat[1] }}
23
+ name : Build wheels for ${{ matrix.buildplat[1] }}
24
24
runs-on : ${{ matrix.buildplat[0] }}
25
25
strategy :
26
26
# Ensure that a wheel builder finishes even if another fails
@@ -29,43 +29,25 @@ jobs:
29
29
# Github Actions doesn't support pairing matrix values together, let's improvise
30
30
# https://github.com/github/feedback/discussions/7835#discussioncomment-1769026
31
31
buildplat :
32
- - [ubuntu-20.04, manylinux_x86_64]
33
- - [ubuntu-20.04, manylinux_aarch64]
34
- - [ubuntu-20.04, manylinux_ppc64le]
35
- - [ubuntu-20.04, manylinux_s390x]
36
- - [ubuntu-20.04, manylinux_i686]
37
- - [windows-2019, win_amd64]
38
- - [windows-2019, win32]
39
- python : ["cp37", "cp38", "cp39", "cp310", "cp311", "cp312"]
40
- include :
41
- - buildplat : [macos-11, macosx_*]
42
- python : " cp37"
43
- - buildplat : [macos-11, macosx_*]
44
- python : " cp38"
45
- - buildplat : [macos-11, macosx_*]
46
- python : " cp39"
47
- - buildplat : [macos-14, macosx_*]
48
- python : " cp310"
49
- - buildplat : [macos-14, macosx_*]
50
- python : " cp311"
51
- - buildplat : [macos-14, macosx_*]
52
- python : " cp312"
32
+ - [ubuntu-20.04, "manylinux_x86_64", "cp3*-manylinux_x86_64"]
33
+ - [ubuntu-20.04, "manylinux_aarch64", "cp3*-manylinux_aarch64"]
34
+ - [ubuntu-20.04, "manylinux_ppc64le", "cp3*-manylinux_ppc64le"]
35
+ - [ubuntu-20.04, "manylinux_s390x", "cp3*-manylinux_s390x"]
36
+ - [ubuntu-20.04, "manylinux_i686", "cp3*-manylinux_i686"]
37
+ - [windows-2019, "win_amd6", "cp3*-win_amd64"]
38
+ - [windows-2019, "win32", "cp3*-win32"]
39
+ - [macos-14, "macos", "cp*-macosx_*"]
53
40
54
41
steps :
55
42
- name : Checkout pymongo
56
43
uses : actions/checkout@v4
57
44
with :
58
45
fetch-depth : 0
59
46
60
- - name : Set up python version
61
- run : |
62
- export PYTHON_VERSION=$(sed 's/^cp3/3./' <<< ${{ matrix.python }} )
63
- echo "PYTHON_VERSION=$PYTHON_VERSION" >> $GITHUB_ENV
64
-
65
47
- uses : actions/setup-python@v5
66
48
with :
67
- python-version : ${{env.PYTHON_VERSION}}
68
49
cache : ' pip'
50
+ python-version : 3.8
69
51
cache-dependency-path : ' pyproject.toml'
70
52
allow-prereleases : true
71
53
@@ -79,75 +61,37 @@ jobs:
79
61
# Note: the default manylinux is manylinux2014
80
62
run : |
81
63
python -m pip install -U pip
82
- python -m pip install "cibuildwheel>=2.4 ,<3"
64
+ python -m pip install "cibuildwheel>=2.17 ,<3"
83
65
84
- - name : Build wheel
85
- if : ${{ matrix.buildplat[0] != 'macos-14' }}
66
+ - name : Build wheels
86
67
env :
87
- CIBW_BUILD : ${{ matrix.python }}-${{ matrix.buildplat[1] }}
88
- MACOS_TEST_SKIP : " *arm64"
68
+ CIBW_BUILD : ${{ matrix.buildplat[2] }}
89
69
run : python -m cibuildwheel --output-dir wheelhouse
90
70
91
- - name : Build wheel on M1
92
- if : ${{ matrix.buildplat[0 ] == 'macos-14 ' }}
71
+ - name : Build manylinux1 wheels
72
+ if : ${{ matrix.buildplat[1 ] == 'manylinux_x86_64' || matrix.buildplat[1] == 'manylinux_i686 ' }}
93
73
env :
94
- CIBW_BUILD : ${{ matrix.python }}-${{ matrix.buildplat[1] }}
74
+ CIBW_MANYLINUX_X86_64_IMAGE : manylinux1
75
+ CIBW_MANYLINUX_I686_IMAGE : manylinux1
76
+ CIBW_BUILD : " cp37-${{ matrix.buildplat[1] }} cp38-${{ matrix.buildplat[1] }} cp39-${{ matrix.buildplat[1] }}"
95
77
run : python -m cibuildwheel --output-dir wheelhouse
96
78
79
+ - name : Assert all versions in wheelhouse
80
+ if : ${{ ! startsWith(matrix.buildplat[1], 'macos') }}
81
+ run : |
82
+ ls wheelhouse/*cp37*.whl
83
+ ls wheelhouse/*cp38*.whl
84
+ ls wheelhouse/*cp39*.whl
85
+ ls wheelhouse/*cp310*.whl
86
+ ls wheelhouse/*cp311*.whl
87
+ ls wheelhouse/*cp312*.whl
88
+
97
89
- uses : actions/upload-artifact@v4
98
90
with :
99
- name : wheel-${{ matrix.python }}-${{ startsWith(matrix.buildplat[1], 'macosx') && 'macosx' || matrix. buildplat[1] }}
91
+ name : wheel-${{ matrix.buildplat[1] }}
100
92
path : ./wheelhouse/*.whl
101
93
if-no-files-found : error
102
94
103
- build_manylinux1_wheels :
104
- runs-on : ubuntu-latest
105
- strategy :
106
- # Ensure that a wheel builder finishes even if another fails
107
- fail-fast : false
108
- matrix :
109
- python : ["cp37", "cp38", "cp39"]
110
- steps :
111
- - name : Checkout pymongo
112
- uses : actions/checkout@v4
113
- with :
114
- fetch-depth : 0
115
-
116
- - name : Set up python version
117
- run : |
118
- export PYTHON_VERSION=$(sed 's/^cp3/3./' <<< ${{ matrix.python }} )
119
- echo "PYTHON_VERSION=$PYTHON_VERSION" >> $GITHUB_ENV
120
-
121
- - uses : actions/setup-python@v5
122
- with :
123
- python-version : ${{env.PYTHON_VERSION}}
124
- cache : ' pip'
125
- cache-dependency-path : ' pyproject.toml'
126
- allow-prereleases : true
127
-
128
- - name : Install cibuildwheel
129
- run : |
130
- python -m pip install -U pip
131
- python -m pip install "cibuildwheel>=2.4,<3"
132
-
133
- - name : Build manylinux_x86_64
134
- env :
135
- CIBW_BUILD : ${{ matrix.python }}-manylinux_x86_64
136
- CIBW_MANYLINUX_X86_64_IMAGE : manylinux1
137
- run : python -m cibuildwheel --output-dir wheelhouse
138
-
139
- - name : Build manylinux_i686
140
- env :
141
- CIBW_BUILD : ${{ matrix.python }}-manylinux_i686
142
- CIBW_MANYLINUX_I686_IMAGE : manylinux1
143
- run : python -m cibuildwheel --output-dir wheelhouse
144
-
145
- - uses : actions/upload-artifact@v4
146
- with :
147
- name : wheel-${{ matrix.python }}-manylinux1
148
- path : ./wheelhouse/*.whl
149
- if-no-files-found : error
150
-
151
95
make_sdist :
152
96
name : Make SDist
153
97
runs-on : macos-13
@@ -180,7 +124,7 @@ jobs:
180
124
181
125
collect_dist :
182
126
runs-on : ubuntu-latest
183
- needs : [build_wheels, build_manylinux1_wheels, make_sdist]
127
+ needs : [build_wheels, make_sdist]
184
128
name : Download Wheels
185
129
steps :
186
130
- name : Download all workflow run artifacts
0 commit comments