Show More
@@ -1,376 +1,421 | |||||
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 | ||||
|
294 | # a dummy job that only serve to trigger the wider windows build | |||
|
295 | trigger-wheel-windows: | |||
|
296 | extends: .all | |||
|
297 | # smallest I know of | |||
|
298 | image: busybox | |||
|
299 | when: manual | |||
|
300 | stage: build | |||
|
301 | variables: | |||
|
302 | GIT_STRATEGY: none | |||
|
303 | CI_CLEVER_CLOUD_FLAVOR: "XS" | |||
|
304 | script: | |||
|
305 | - echo 'let us build some wheels.' | |||
|
306 | ||||
|
307 | build-c-wheel-windows: | |||
|
308 | extends: .windows | |||
|
309 | stage: build | |||
|
310 | # wait for someone to click on "trigger-wheel-windows" | |||
|
311 | when: on_success | |||
|
312 | needs: | |||
|
313 | - "trigger-wheel-windows" | |||
|
314 | script: | |||
|
315 | - echo "Entering script section" | |||
|
316 | - echo "python used, $Env:PYTHON" | |||
|
317 | - Invoke-Expression "$Env:PYTHON -V" | |||
|
318 | - echo "$Env:RUNTEST_ARGS" | |||
|
319 | - echo "$Env:TMP" | |||
|
320 | - echo "$Env:TEMP" | |||
|
321 | - "C:/hgdev/venvs/python39-x64/Scripts/python.exe -m cibuildwheel --output-dir wheels/win32" | |||
|
322 | artifacts: | |||
|
323 | paths: | |||
|
324 | - wheels | |||
|
325 | expire_in: 1 week | |||
|
326 | parallel: | |||
|
327 | matrix: | |||
|
328 | # "cp39" is first as it unlock the tests | |||
|
329 | - CIBW_BUILD: | |||
|
330 | - "cp39-*" | |||
|
331 | - "cp38-*" | |||
|
332 | - "cp310-*" | |||
|
333 | - "cp311-*" | |||
|
334 | - "cp312-*" | |||
|
335 | - "cp313-*" | |||
|
336 | ||||
|
337 | ||||
293 | .windows-runtests: |
|
338 | .windows-runtests: | |
294 | extends: .windows |
|
339 | extends: .windows | |
295 | stage: platform-compat |
|
340 | stage: platform-compat | |
296 | script: |
|
341 | script: | |
297 | - echo "Entering script section" |
|
342 | - echo "Entering script section" | |
298 | - echo "python used, $Env:PYTHON" |
|
343 | - echo "python used, $Env:PYTHON" | |
299 | - Invoke-Expression "$Env:PYTHON -V" |
|
344 | - Invoke-Expression "$Env:PYTHON -V" | |
300 | - echo "$Env:HGTESTS_ALLOW_NETIO" |
|
345 | - echo "$Env:HGTESTS_ALLOW_NETIO" | |
301 | - echo "$Env:FLAVOR" |
|
346 | - echo "$Env:FLAVOR" | |
302 | - echo "$Env:FILTER" |
|
347 | - echo "$Env:FILTER" | |
303 | - echo "$Env:RUNTEST_ARGS" |
|
348 | - echo "$Env:RUNTEST_ARGS" | |
304 | - echo "$Env:TMP" |
|
349 | - echo "$Env:TMP" | |
305 | - echo "$Env:TEMP" |
|
350 | - echo "$Env:TEMP" | |
306 | # This test is hanging the worker and not that important, so lets skip |
|
351 | # This test is hanging the worker and not that important, so lets skip | |
307 | # it for now |
|
352 | # it for now | |
308 | - C:/hgdev/MinGW/msys/1.0/bin/sh.exe -c 'cd "$OLDPWD" && echo tests/test-clonebundles-autogen.t > $TMP_WORK_DIR/windows-skip.txt' |
|
353 | - C:/hgdev/MinGW/msys/1.0/bin/sh.exe -c 'cd "$OLDPWD" && echo tests/test-clonebundles-autogen.t > $TMP_WORK_DIR/windows-skip.txt' | |
309 |
|
354 | |||
310 | - C:/hgdev/MinGW/msys/1.0/bin/sh.exe |
|
355 | - C:/hgdev/MinGW/msys/1.0/bin/sh.exe | |
311 | --login -c 'cd "$OLDPWD" |
|
356 | --login -c 'cd "$OLDPWD" | |
312 | && HGTESTS_ALLOW_NETIO="$TEST_HGTESTS_ALLOW_NETIO" |
|
357 | && HGTESTS_ALLOW_NETIO="$TEST_HGTESTS_ALLOW_NETIO" | |
313 | $PYTHON tests/run-tests.py |
|
358 | $PYTHON tests/run-tests.py | |
314 | --color=always |
|
359 | --color=always | |
315 | $FLAVOR |
|
360 | $FLAVOR | |
316 | --port `expr 19051 + 1009 "*" $CI_CONCURRENT_ID` |
|
361 | --port `expr 19051 + 1009 "*" $CI_CONCURRENT_ID` | |
317 | $FILTER |
|
362 | $FILTER | |
318 | $RUNTEST_ARGS; |
|
363 | $RUNTEST_ARGS; | |
319 | ' |
|
364 | ' | |
320 | variables: |
|
365 | variables: | |
321 | RUNTEST_ARGS: "" |
|
366 | RUNTEST_ARGS: "" | |
322 | FLAVOR: "" |
|
367 | FLAVOR: "" | |
323 | FILTER: "--blacklist ${TMP_WORK_DIR}/check-tests.txt --blacklist ${TMP_WORK_DIR}/windows-skip.txt" |
|
368 | FILTER: "--blacklist ${TMP_WORK_DIR}/check-tests.txt --blacklist ${TMP_WORK_DIR}/windows-skip.txt" | |
324 |
|
369 | |||
325 | windows: |
|
370 | windows: | |
326 | extends: .windows-runtests |
|
371 | extends: .windows-runtests | |
327 | variables: |
|
372 | variables: | |
328 | RUNTEST_ARGS: "-j 8" |
|
373 | RUNTEST_ARGS: "-j 8" | |
329 |
|
374 | |||
330 | windows-pyox: |
|
375 | windows-pyox: | |
331 | extends: .windows-runtests |
|
376 | extends: .windows-runtests | |
332 | when: manual # pyoxidizer builds seem broken with --no-use-pep517 |
|
377 | when: manual # pyoxidizer builds seem broken with --no-use-pep517 | |
333 | variables: |
|
378 | variables: | |
334 | FLAVOR: "--pyoxidized" |
|
379 | FLAVOR: "--pyoxidized" | |
335 |
|
380 | |||
336 | macos: |
|
381 | macos: | |
337 | extends: .test-c |
|
382 | extends: .test-c | |
338 | stage: platform-compat |
|
383 | stage: platform-compat | |
339 | # run the test in multiple shard to help spread the load between concurrent |
|
384 | # run the test in multiple shard to help spread the load between concurrent | |
340 | # MR as the macos runner is a shell runner there is not startup overhead |
|
385 | # MR as the macos runner is a shell runner there is not startup overhead | |
341 | # for tests. |
|
386 | # for tests. | |
342 | parallel: 10 |
|
387 | parallel: 10 | |
343 | tags: |
|
388 | tags: | |
344 | - macos |
|
389 | - macos | |
345 | variables: |
|
390 | variables: | |
346 | WHEEL_TYPE: "c" |
|
391 | WHEEL_TYPE: "c" | |
347 | needs: |
|
392 | needs: | |
348 | - build-c-wheel-macos |
|
393 | - build-c-wheel-macos | |
349 |
|
394 | |||
350 | # We could use CIBW_BUILD="cp310-*" to only build the Python 3.10 wheel for now as |
|
395 | # We could use CIBW_BUILD="cp310-*" to only build the Python 3.10 wheel for now as | |
351 | # this is the only one we need to test. However testing that build work on all |
|
396 | # this is the only one we need to test. However testing that build work on all | |
352 | # version is useful and match what we do with Linux. |
|
397 | # version is useful and match what we do with Linux. | |
353 | # |
|
398 | # | |
354 | # CIBW_SKIP is set globally at the start of the file. See comment there. |
|
399 | # CIBW_SKIP is set globally at the start of the file. See comment there. | |
355 | # |
|
400 | # | |
356 | # The weird directory structure match the one we use for Linux to deal with the |
|
401 | # The weird directory structure match the one we use for Linux to deal with the | |
357 | # multiple jobs. (all this might be unnecessary) |
|
402 | # multiple jobs. (all this might be unnecessary) | |
358 | build-c-wheel-macos: |
|
403 | build-c-wheel-macos: | |
359 | when: manual # avoid overloading the CI by default |
|
404 | when: manual # avoid overloading the CI by default | |
360 | stage: build |
|
405 | stage: build | |
361 | tags: |
|
406 | tags: | |
362 | - macos |
|
407 | - macos | |
363 | variables: |
|
408 | variables: | |
364 | MERCURIAL_SETUP_FORCE_TRANSLATIONS: "1" |
|
409 | MERCURIAL_SETUP_FORCE_TRANSLATIONS: "1" | |
365 | script: |
|
410 | script: | |
366 | - rm -rf tmp-wheels |
|
411 | - rm -rf tmp-wheels | |
367 | - cibuildwheel --output-dir tmp-wheels/ |
|
412 | - cibuildwheel --output-dir tmp-wheels/ | |
368 | - for py_version in cp38-cp38 cp39-cp39 cp310-cp310 cp311-cp311 cp312-cp312 cp313-cp313; do |
|
413 | - for py_version in cp38-cp38 cp39-cp39 cp310-cp310 cp311-cp311 cp312-cp312 cp313-cp313; do | |
369 | mkdir -p wheels/c/$py_version/; |
|
414 | mkdir -p wheels/c/$py_version/; | |
370 | mv tmp-wheels/*$py_version*.whl wheels/c/$py_version/; |
|
415 | mv tmp-wheels/*$py_version*.whl wheels/c/$py_version/; | |
371 | done |
|
416 | done | |
372 | - rm -rf tmp-wheels |
|
417 | - rm -rf tmp-wheels | |
373 | artifacts: |
|
418 | artifacts: | |
374 | paths: |
|
419 | paths: | |
375 | - wheels |
|
420 | - wheels | |
376 | expire_in: 1 week |
|
421 | expire_in: 1 week |
General Comments 0
You need to be logged in to leave comments.
Login now