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