Show More
@@ -1,442 +1,445 | |||
|
1 | 1 | # Don't run pipelines on branch "merge", since we're fast-forward only. |
|
2 | 2 | # Gitlab sees a new branch (since e.g. `topic/stable/my-topic` becomes |
|
3 | 3 | # `branch/stable`), but the hash hasn't changed. There is no reason to |
|
4 | 4 | # re-run the CI in our case, since we haven't built up any specific automation. |
|
5 | 5 | # Right now it's just wasted CI and developer time. |
|
6 | 6 | # One can still run the pipeline manually via the web interface, |
|
7 | 7 | # like in the case of releases, to make *extra* sure that the actual branch |
|
8 | 8 | # has succeeded. |
|
9 | 9 | workflow: |
|
10 | 10 | rules: |
|
11 | 11 | - if: $CI_COMMIT_BRANCH =~ /^branch\/.*/ && $CI_PIPELINE_SOURCE != "web" |
|
12 | 12 | when: never |
|
13 | 13 | - if: $CI_PIPELINE_SOURCE == "merge_request_event" |
|
14 | 14 | when: never |
|
15 | 15 | - if: $CI_PIPELINE_SOURCE == "push" |
|
16 | 16 | when: always |
|
17 | 17 | - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS |
|
18 | 18 | when: never |
|
19 | 19 | - if: $CI_COMMIT_BRANCH |
|
20 | 20 | when: always |
|
21 | 21 | |
|
22 | 22 | stages: |
|
23 | 23 | - build |
|
24 | 24 | - checks |
|
25 | 25 | - tests |
|
26 | 26 | - platform-compat |
|
27 | 27 | - py-version-compat |
|
28 | 28 | |
|
29 | 29 | |
|
30 | 30 | image: registry.heptapod.net/mercurial/ci-images/mercurial-core:$HG_CI_IMAGE_TAG |
|
31 | 31 | |
|
32 | 32 | variables: |
|
33 | 33 | PYTHON: python |
|
34 | 34 | HG_CI_IMAGE_TAG: "v2.1" |
|
35 | 35 | # a directory dedicated to creating files and temporary clone |
|
36 | 36 | # with shell runner, its content is not cleaned from one call to the next, |
|
37 | 37 | # so plan for it. |
|
38 | 38 | TMP_WORK_DIR: "${CI_PROJECT_DIR}/../.." |
|
39 | 39 | # we use CIBW_SKIP="pp*" to prevent the building of pypy wheel that are neither |
|
40 | 40 | # needed nor working. |
|
41 | 41 | CIBW_SKIP: "pp*" |
|
42 | 42 | |
|
43 | 43 | .all: |
|
44 | 44 | # help changing all job at once when debugging |
|
45 | 45 | when: on_success |
|
46 | 46 | # make sure jobs from later steps does not wait for anything implicit before |
|
47 | 47 | # starting. |
|
48 | 48 | needs: [] |
|
49 | 49 | |
|
50 | 50 | .build-wheel: |
|
51 | 51 | extends: .all |
|
52 | 52 | image: "registry.heptapod.net/mercurial/ci-images/core-wheel-x86_64-c:v3.0" |
|
53 | 53 | stage: build |
|
54 | 54 | variables: |
|
55 | 55 | WHEEL_TYPE: "" |
|
56 | 56 | FLAVOR: "" |
|
57 | 57 | MERCURIAL_SETUP_FORCE_TRANSLATIONS: "1" |
|
58 | 58 | CI_CLEVER_CLOUD_FLAVOR: "XS" |
|
59 |
|
|
|
59 | script: | |
|
60 | - PLATFORM=`/opt/python/cp313-cp313/bin/python -c 'import sys; print(sys.platform)'` | |
|
60 | 61 | - echo $WHEEL_TYPE |
|
61 | 62 | - test -n "$WHEEL_TYPE" |
|
62 | 63 | - echo $FLAVOR |
|
63 | - mkdir -p wheels/$WHEEL_TYPE/$BUILD_PY_ID | |
|
64 | script: | |
|
64 | - mkdir -p wheels/$PLATFORM/$WHEEL_TYPE/$BUILD_PY_ID | |
|
65 | 65 | - /opt/python/$BUILD_PY_ID/bin/python setup.py bdist_wheel --dist-dir tmp-wheelhouse |
|
66 | - auditwheel repair tmp-wheelhouse/*.whl -w wheels/$WHEEL_TYPE/$BUILD_PY_ID | |
|
66 | - auditwheel repair tmp-wheelhouse/*.whl -w wheels/$PLATFORM/$WHEEL_TYPE/$BUILD_PY_ID | |
|
67 | 67 | artifacts: |
|
68 | 68 | paths: |
|
69 | - wheels/$WHEEL_TYPE/$BUILD_PY_ID | |
|
69 | - wheels/ | |
|
70 | 70 | expire_in: 1 week |
|
71 | 71 | |
|
72 | 72 | build-c-wheel: |
|
73 | 73 | extends: .build-wheel |
|
74 | 74 | variables: |
|
75 | 75 | WHEEL_TYPE: "c" |
|
76 | 76 | parallel: |
|
77 | 77 | matrix: |
|
78 | 78 | - BUILD_PY_ID: |
|
79 | 79 | - cp38-cp38 |
|
80 | 80 | - cp39-cp39 |
|
81 | 81 | - cp310-cp310 |
|
82 | 82 | - cp311-cp311 |
|
83 | 83 | - cp312-cp312 |
|
84 | 84 | - cp313-cp313 |
|
85 | 85 | |
|
86 | 86 | .runtests: |
|
87 | 87 | extends: .all |
|
88 | 88 | stage: tests |
|
89 | 89 | variables: |
|
90 | 90 | SHOW_VERSION_OF: "$PYTHON" |
|
91 | 91 | TEST_HGTESTS_ALLOW_NETIO: "0" |
|
92 | 92 | FILTER: "" |
|
93 | 93 | FLAVOR: "" |
|
94 | 94 | RUNTEST_ARGS: "" |
|
95 | 95 | # The runner made a clone as root. |
|
96 | 96 | # We make a new clone owned by user used to run the step. |
|
97 | 97 | before_script: |
|
98 | 98 | - echo "python used, $PYTHON" |
|
99 | 99 | - for tool in $SHOW_VERSION_OF ; do echo '#' version of $tool; $tool --version; done |
|
100 | 100 | - rm -rf "${TMP_WORK_DIR}"/mercurial-ci/ # Clean slate if not using containers |
|
101 | 101 | - hg clone . "${TMP_WORK_DIR}"/mercurial-ci/ --noupdate --config phases.publish=no |
|
102 | 102 | - hg -R "${TMP_WORK_DIR}"/mercurial-ci/ update `hg log --rev '.' --template '{node}'` |
|
103 | 103 | - cd "${TMP_WORK_DIR}"/mercurial-ci/ |
|
104 | 104 | - ls -1 tests/test-check-*.* > "${TMP_WORK_DIR}"/check-tests.txt |
|
105 | 105 | script: |
|
106 | 106 | - echo "$TEST_HGTESTS_ALLOW_NETIO" |
|
107 | 107 | - echo "$RUNTEST_ARGS" |
|
108 | 108 | - echo "$FILTER" |
|
109 | 109 | - echo "$FLAVOR" |
|
110 | 110 | - echo "$WHEEL_TYPE" |
|
111 | 111 | - PORT_START=`expr 19051 + 1009 '*' $CI_CONCURRENT_ID` |
|
112 | 112 | - PORT_ARG="--port $PORT_START" |
|
113 | 113 | - echo $PORT_ARG |
|
114 | - PLATFORM=`$PYTHON -c 'import sys; print(sys.platform)'` | |
|
115 | - echo $PLATFORM | |
|
114 | 116 | - WHEEL_ARG="" |
|
115 | 117 | - SHARDING_ARGS="" |
|
116 | 118 | - if test -n "$WHEEL_TYPE"; then |
|
117 | 119 | PY_TAG=`$PYTHON -c 'import sys; v=sys.version_info; t=f"cp{v.major}{v.minor}"; print(f"{t}-{t}")'`; |
|
118 | 120 | echo "$PY_TAG"; |
|
119 | 121 | test -n "PY_TAG"; |
|
120 | WHEEL="`ls -1 $CI_PROJECT_DIR/wheels/$WHEEL_TYPE/$PY_TAG/*.whl`"; | |
|
122 | WHEEL="`ls -1 $CI_PROJECT_DIR/wheels/$PLATFORM/$WHEEL_TYPE/$PY_TAG/*.whl`"; | |
|
121 | 123 | test -n "$WHEEL"; |
|
122 | 124 | echo installing from $WHEEL; |
|
123 | 125 | WHEEL_ARG="--hg-wheel $WHEEL"; |
|
124 | 126 | echo disabling flavor as this is currently incompatible with '"--hg-wheel"'; |
|
125 | 127 | FLAVOR=""; |
|
126 | 128 | else |
|
127 | 129 | echo installing from source; |
|
128 | 130 | fi; |
|
129 | 131 | - if [ -n "$CI_NODE_INDEX" ]; then |
|
130 | 132 | echo "Running the test in multiple shard - [$CI_NODE_INDEX/$CI_NODE_TOTAL]"; |
|
131 | 133 | SHARDING_ARGS="--shard-index $CI_NODE_INDEX --shard-total $CI_NODE_TOTAL"; |
|
132 | 134 | echo "sharding... $SHARDING_ARGS"; |
|
133 | 135 | fi |
|
134 | 136 | - HGTESTS_ALLOW_NETIO="$TEST_HGTESTS_ALLOW_NETIO" |
|
135 | 137 | "$PYTHON" tests/run-tests.py |
|
136 | 138 | --color=always |
|
137 | 139 | $PORT_ARG |
|
138 | 140 | $WHEEL_ARG |
|
139 | 141 | $FLAVOR |
|
140 | 142 | $SHARDING_ARGS |
|
141 | 143 | $FILTER |
|
142 | 144 | $RUNTEST_ARGS; |
|
143 | 145 | |
|
144 | 146 | checks: |
|
145 | 147 | extends: .runtests |
|
146 | 148 | stage: checks |
|
147 | 149 | variables: |
|
148 | 150 | SHOW_VERSION_OF: "$PYTHON black clang-format" |
|
149 | 151 | RUNTEST_ARGS: "--time" |
|
150 | 152 | FILTER: "--test-list ${TMP_WORK_DIR}/check-tests.txt" |
|
151 | 153 | CI_CLEVER_CLOUD_FLAVOR: S |
|
152 | 154 | |
|
153 | 155 | rust-cargo-test: |
|
154 | 156 | extends: .all |
|
155 | 157 | stage: checks |
|
156 | 158 | script: |
|
157 | 159 | - make rust-tests |
|
158 | 160 | - make cargo-clippy |
|
159 | 161 | variables: |
|
160 | 162 | CI_CLEVER_CLOUD_FLAVOR: S |
|
161 | 163 | |
|
162 | 164 | .runtests-no-check: |
|
163 | 165 | extends: .runtests |
|
164 | 166 | variables: |
|
165 | 167 | FILTER: "--blacklist ${TMP_WORK_DIR}/check-tests.txt" |
|
166 | 168 | TEST_HGTESTS_ALLOW_NETIO: "1" |
|
167 | 169 | |
|
168 | 170 | .test-c: |
|
169 | 171 | extends: .runtests-no-check |
|
170 | 172 | variables: |
|
171 | 173 | FLAVOR: "--no-rust" |
|
172 | 174 | |
|
173 | 175 | test-c: |
|
174 | 176 | extends: .test-c |
|
175 | 177 | needs: |
|
176 | 178 | - job: build-c-wheel |
|
177 | 179 | parallel: |
|
178 | 180 | matrix: |
|
179 | 181 | - BUILD_PY_ID: "cp311-cp311" |
|
180 | 182 | variables: |
|
181 | 183 | WHEEL_TYPE: "c" |
|
182 | 184 | |
|
183 | 185 | test-pure: |
|
184 | 186 | extends: .runtests-no-check |
|
185 | 187 | variables: |
|
186 | 188 | FLAVOR: "--pure" |
|
187 | 189 | |
|
188 | 190 | test-rust: |
|
189 | 191 | extends: .runtests-no-check |
|
190 | 192 | variables: |
|
191 | 193 | HGWITHRUSTEXT: "cpython" |
|
192 | 194 | FLAVOR: "--rust" |
|
193 | 195 | |
|
194 | 196 | test-rhg: |
|
195 | 197 | extends: .runtests-no-check |
|
196 | 198 | variables: |
|
197 | 199 | HGWITHRUSTEXT: "cpython" |
|
198 | 200 | FLAVOR: "--rust --rhg" |
|
199 | 201 | |
|
200 | 202 | test-chg: |
|
201 | 203 | extends: .runtests-no-check |
|
202 | 204 | variables: |
|
203 | 205 | FLAVOR: "--chg" |
|
204 | 206 | |
|
205 | 207 | # note: we should probably get a full matrix for flavor × py-version, but this |
|
206 | 208 | # is a simple start to be able to check if we break the lowest supported |
|
207 | 209 | # version (and 3.12 have been giving us various troubles) |
|
208 | 210 | test-3.8-c: |
|
209 | 211 | extends: .test-c |
|
210 | 212 | stage: py-version-compat |
|
211 | 213 | when: manual # avoid overloading the CI by default |
|
212 | 214 | variables: |
|
213 | 215 | PYTHON: python3.8 |
|
214 | 216 | WHEEL_TYPE: "c" |
|
215 | 217 | needs: |
|
216 | 218 | - job: build-c-wheel |
|
217 | 219 | parallel: |
|
218 | 220 | matrix: |
|
219 | 221 | - BUILD_PY_ID: "cp38-cp38" |
|
220 | 222 | |
|
221 | 223 | test-3.12-c: |
|
222 | 224 | extends: .test-c |
|
223 | 225 | stage: py-version-compat |
|
224 | 226 | when: manual # avoid overloading the CI by default |
|
225 | 227 | variables: |
|
226 | 228 | PYTHON: python3.12 |
|
227 | 229 | WHEEL_TYPE: "c" |
|
228 | 230 | needs: |
|
229 | 231 | - job: build-c-wheel |
|
230 | 232 | parallel: |
|
231 | 233 | matrix: |
|
232 | 234 | - BUILD_PY_ID: "cp312-cp312" |
|
233 | 235 | |
|
234 | 236 | test-3.12-rust: |
|
235 | 237 | extends: test-rust |
|
236 | 238 | stage: py-version-compat |
|
237 | 239 | when: manual # avoid overloading the CI by default |
|
238 | 240 | variables: |
|
239 | 241 | PYTHON: python3.12 |
|
240 | 242 | |
|
241 | 243 | test-3.13-c: |
|
242 | 244 | extends: .test-c |
|
243 | 245 | stage: py-version-compat |
|
244 | 246 | when: manual # avoid overloading the CI by default |
|
245 | 247 | variables: |
|
246 | 248 | PYTHON: python3.13 |
|
247 | 249 | WHEEL_TYPE: "c" |
|
248 | 250 | needs: |
|
249 | 251 | - job: build-c-wheel |
|
250 | 252 | parallel: |
|
251 | 253 | matrix: |
|
252 | 254 | - BUILD_PY_ID: "cp313-cp313" |
|
253 | 255 | |
|
254 | 256 | test-3.13-rust: |
|
255 | 257 | extends: test-rust |
|
256 | 258 | stage: py-version-compat |
|
257 | 259 | when: manual # avoid overloading the CI by default |
|
258 | 260 | variables: |
|
259 | 261 | PYTHON: python3.13 |
|
260 | 262 | |
|
261 | 263 | check-pytype: |
|
262 | 264 | extends: test-rust |
|
263 | 265 | stage: checks |
|
264 | 266 | before_script: |
|
265 | 267 | - export PATH="/home/ci-runner/vendor/pyenv/pyenv-2.4.7-adf3c2bccf09cdb81febcfd15b186711a33ac7a8/shims:/home/ci-runner/vendor/pyenv/pyenv-2.4.7-adf3c2bccf09cdb81febcfd15b186711a33ac7a8/bin:$PATH" |
|
266 | 268 | - echo "PATH, $PATH" |
|
267 | 269 | - hg clone . "${TMP_WORK_DIR}"/mercurial-ci/ --noupdate --config phases.publish=no |
|
268 | 270 | - hg -R "${TMP_WORK_DIR}"/mercurial-ci/ update `hg log --rev '.' --template '{node}'` |
|
269 | 271 | - cd "${TMP_WORK_DIR}"/mercurial-ci/ |
|
270 | 272 | - make local PYTHON=$PYTHON |
|
271 | 273 | - ./contrib/setup-pytype.sh |
|
272 | 274 | script: |
|
273 | 275 | - echo "Entering script section" |
|
274 | 276 | - sh contrib/check-pytype.sh |
|
275 | 277 | |
|
276 | 278 | # `sh.exe --login` sets a couple of extra environment variables that are defined |
|
277 | 279 | # in the MinGW shell, but switches CWD to /home/$username. The previous value |
|
278 | 280 | # is stored in OLDPWD. Of the added variables, MSYSTEM is crucial to running |
|
279 | 281 | # run-tests.py- it is needed to make run-tests.py generate a `python3` script |
|
280 | 282 | # that satisfies the various shebang lines and delegates to `py -3`. |
|
281 | 283 | |
|
282 | 284 | .windows: |
|
283 | 285 | extends: .all |
|
284 | 286 | when: manual # we don't have any Windows runners anymore at the moment |
|
285 | 287 | tags: |
|
286 | 288 | - windows |
|
287 | 289 | before_script: |
|
288 | 290 | - C:/hgdev/MinGW/msys/1.0/bin/sh.exe --login -c 'cd "$OLDPWD" && ls -1 tests/test-check-*.* > "${TMP_WORK_DIR}"/check-tests.txt' |
|
289 | 291 | # TODO: find/install cvs, bzr, perforce, gpg, sqlite3 |
|
290 | 292 | variables: |
|
291 | 293 | PYTHON: C:/hgdev/venvs/python39-x64/Scripts/python.exe |
|
292 | 294 | |
|
293 | 295 | |
|
294 | 296 | # a dummy job that only serve to trigger the wider windows build |
|
295 | 297 | trigger-wheel-windows: |
|
296 | 298 | extends: .all |
|
297 | 299 | # smallest I know of |
|
298 | 300 | image: busybox |
|
299 | 301 | when: manual |
|
300 | 302 | stage: build |
|
301 | 303 | variables: |
|
302 | 304 | GIT_STRATEGY: none |
|
303 | 305 | CI_CLEVER_CLOUD_FLAVOR: "XS" |
|
304 | 306 | script: |
|
305 | 307 | - echo 'let us build some wheels.' |
|
306 | 308 | |
|
307 | 309 | build-c-wheel-windows: |
|
308 | 310 | extends: .windows |
|
309 | 311 | stage: build |
|
310 | 312 | # wait for someone to click on "trigger-wheel-windows" |
|
311 | 313 | when: on_success |
|
312 | 314 | needs: |
|
313 | 315 | - "trigger-wheel-windows" |
|
314 | 316 | variables: |
|
315 | 317 | MERCURIAL_SETUP_FORCE_TRANSLATIONS: "1" |
|
316 | 318 | script: |
|
317 | 319 | - echo "Entering script section" |
|
318 | 320 | - echo "python used, $Env:PYTHON" |
|
319 | 321 | - Invoke-Expression "$Env:PYTHON -V" |
|
320 | 322 | - echo "$Env:RUNTEST_ARGS" |
|
321 | 323 | - echo "$Env:TMP" |
|
322 | 324 | - echo "$Env:TEMP" |
|
323 | 325 | - "C:/hgdev/venvs/python39-x64/Scripts/python.exe -m cibuildwheel --output-dir wheels/win32" |
|
324 | 326 | artifacts: |
|
325 | 327 | paths: |
|
326 | 328 | - wheels |
|
327 | 329 | expire_in: 1 week |
|
328 | 330 | parallel: |
|
329 | 331 | matrix: |
|
330 | 332 | # "cp39" is first as it unlock the tests |
|
331 | 333 | - CIBW_BUILD: |
|
332 | 334 | - "cp39-*" |
|
333 | 335 | - "cp38-*" |
|
334 | 336 | - "cp310-*" |
|
335 | 337 | - "cp311-*" |
|
336 | 338 | - "cp312-*" |
|
337 | 339 | - "cp313-*" |
|
338 | 340 | CIBW_ARCHS: |
|
339 | 341 | - "AMD64" |
|
340 | 342 | - "x86" |
|
341 | 343 | |
|
342 | 344 | |
|
343 | 345 | .windows-runtests: |
|
344 | 346 | extends: .windows |
|
345 | 347 | stage: platform-compat |
|
346 | 348 | # the UX for manual parallel jobs is quite awful, and the job que depends |
|
347 | 349 | # upon are manual anyway, so we can make this start automatically once the |
|
348 | 350 | # associated wheel is ready. |
|
349 | 351 | when: on_success |
|
350 | 352 | parallel: 20 |
|
351 | 353 | script: |
|
352 | 354 | - echo "Entering script section" |
|
353 | 355 | - echo "python used, $Env:PYTHON" |
|
354 | 356 | - Invoke-Expression "$Env:PYTHON -V" |
|
355 | 357 | - echo "$Env:HGTESTS_ALLOW_NETIO" |
|
356 | 358 | - echo "$Env:WHEEL_ARG" |
|
357 | 359 | - echo "$Env:FLAVOR" |
|
358 | 360 | - echo "$Env:FILTER" |
|
359 | 361 | - echo "$Env:RUNTEST_ARGS" |
|
360 | 362 | - echo "$Env:TMP" |
|
361 | 363 | - echo "$Env:TEMP" |
|
362 | 364 | # This test is hanging the worker and not that important, so lets skip |
|
363 | 365 | # it for now |
|
364 | 366 | - C:/hgdev/MinGW/msys/1.0/bin/sh.exe -c 'cd "$OLDPWD" && echo tests/test-clonebundles-autogen.t > $TMP_WORK_DIR/windows-skip.txt' |
|
365 | 367 | |
|
366 | 368 | - C:/hgdev/MinGW/msys/1.0/bin/sh.exe |
|
367 | 369 | --login -c 'cd "$OLDPWD" |
|
368 | 370 | && HGTESTS_ALLOW_NETIO="$TEST_HGTESTS_ALLOW_NETIO" |
|
369 | 371 | $PYTHON tests/run-tests.py |
|
370 | 372 | --color=always |
|
371 | 373 | $WHEEL_ARG |
|
372 | 374 | $FLAVOR |
|
373 | 375 | --port `expr 19051 + 1009 "*" $CI_CONCURRENT_ID` |
|
374 | 376 | --shard-index $CI_NODE_INDEX --shard-total $CI_NODE_TOTAL |
|
375 | 377 | $FILTER |
|
376 | 378 | $RUNTEST_ARGS; |
|
377 | 379 | ' |
|
378 | 380 | variables: |
|
379 | 381 | WHEEL_ARG: "" |
|
380 | 382 | RUNTEST_ARGS: "" |
|
381 | 383 | FLAVOR: "" |
|
382 | 384 | FILTER: "--blacklist ${TMP_WORK_DIR}/check-tests.txt --blacklist ${TMP_WORK_DIR}/windows-skip.txt" |
|
383 | 385 | |
|
384 | 386 | windows: |
|
385 | 387 | extends: .windows-runtests |
|
386 | 388 | variables: |
|
387 | 389 | RUNTEST_ARGS: "-j 8" |
|
388 | 390 | WHEEL_ARG: "--hg-wheel wheels/win32/mercurial-*-cp39-cp39-win_amd64.whl" |
|
389 | 391 | needs: |
|
390 | 392 | - job: build-c-wheel-windows |
|
391 | 393 | parallel: |
|
392 | 394 | matrix: |
|
393 | 395 | - CIBW_BUILD: "cp39-*" |
|
394 | 396 | CIBW_ARCHS: "AMD64" |
|
395 | 397 | |
|
396 | 398 | windows-pyox: |
|
397 | 399 | extends: .windows-runtests |
|
398 | 400 | when: manual # pyoxidizer builds seem broken with --no-use-pep517 |
|
399 | 401 | variables: |
|
400 | 402 | FLAVOR: "--pyoxidized" |
|
401 | 403 | |
|
402 | 404 | macos: |
|
403 | 405 | extends: .test-c |
|
404 | 406 | stage: platform-compat |
|
405 | 407 | # run the test in multiple shard to help spread the load between concurrent |
|
406 | 408 | # MR as the macos runner is a shell runner there is not startup overhead |
|
407 | 409 | # for tests. |
|
408 | 410 | parallel: 10 |
|
409 | 411 | tags: |
|
410 | 412 | - macos |
|
411 | 413 | variables: |
|
412 | 414 | WHEEL_TYPE: "c" |
|
413 | 415 | needs: |
|
414 | 416 | - build-c-wheel-macos |
|
415 | 417 | |
|
416 | 418 | # We could use CIBW_BUILD="cp310-*" to only build the Python 3.10 wheel for now as |
|
417 | 419 | # this is the only one we need to test. However testing that build work on all |
|
418 | 420 | # version is useful and match what we do with Linux. |
|
419 | 421 | # |
|
420 | 422 | # CIBW_SKIP is set globally at the start of the file. See comment there. |
|
421 | 423 | # |
|
422 | 424 | # The weird directory structure match the one we use for Linux to deal with the |
|
423 | 425 | # multiple jobs. (all this might be unnecessary) |
|
424 | 426 | build-c-wheel-macos: |
|
425 | 427 | when: manual # avoid overloading the CI by default |
|
426 | 428 | stage: build |
|
427 | 429 | tags: |
|
428 | 430 | - macos |
|
429 | 431 | variables: |
|
430 | 432 | MERCURIAL_SETUP_FORCE_TRANSLATIONS: "1" |
|
431 | 433 | script: |
|
434 | - PLATFORM=`$PYTHON -c 'import sys; print(sys.platform)'` | |
|
432 | 435 | - rm -rf tmp-wheels |
|
433 | 436 | - cibuildwheel --output-dir tmp-wheels/ |
|
434 | 437 | - for py_version in cp38-cp38 cp39-cp39 cp310-cp310 cp311-cp311 cp312-cp312 cp313-cp313; do |
|
435 | mkdir -p wheels/c/$py_version/; | |
|
436 | mv tmp-wheels/*$py_version*.whl wheels/c/$py_version/; | |
|
438 | mkdir -p wheels/$PLATFORM/c/$py_version/; | |
|
439 | mv tmp-wheels/*$py_version*.whl wheels/$PLATFORM/c/$py_version/; | |
|
437 | 440 | done |
|
438 | 441 | - rm -rf tmp-wheels |
|
439 | 442 | artifacts: |
|
440 | 443 | paths: |
|
441 | 444 | - wheels |
|
442 | 445 | expire_in: 1 week |
General Comments 0
You need to be logged in to leave comments.
Login now