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