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