Show More
@@ -1,340 +1,340 | |||||
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: " |
|
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 | - WHEEL_ARG="" |
|
108 | - WHEEL_ARG="" | |
109 | - if test -n "$WHEEL_TYPE"; then |
|
109 | - if test -n "$WHEEL_TYPE"; then | |
110 | PY_TAG=`$PYTHON -c 'import sys; v=sys.version_info; t=f"cp{v.major}{v.minor}"; print(f"{t}-{t}")'`; |
|
110 | PY_TAG=`$PYTHON -c 'import sys; v=sys.version_info; t=f"cp{v.major}{v.minor}"; print(f"{t}-{t}")'`; | |
111 | echo "$PY_TAG"; |
|
111 | echo "$PY_TAG"; | |
112 | test -n "PY_TAG"; |
|
112 | test -n "PY_TAG"; | |
113 | WHEEL="`ls -1 $CI_PROJECT_DIR/wheels/$WHEEL_TYPE/$PY_TAG/*.whl`"; |
|
113 | WHEEL="`ls -1 $CI_PROJECT_DIR/wheels/$WHEEL_TYPE/$PY_TAG/*.whl`"; | |
114 | test -n "$WHEEL"; |
|
114 | test -n "$WHEEL"; | |
115 | echo installing from $WHEEL; |
|
115 | echo installing from $WHEEL; | |
116 | WHEEL_ARG="--hg-wheel $WHEEL"; |
|
116 | WHEEL_ARG="--hg-wheel $WHEEL"; | |
117 | echo disabling flavor as this is currently incompatible with '"--hg-wheel"'; |
|
117 | echo disabling flavor as this is currently incompatible with '"--hg-wheel"'; | |
118 | FLAVOR=""; |
|
118 | FLAVOR=""; | |
119 | else |
|
119 | else | |
120 | echo installing from source; |
|
120 | echo installing from source; | |
121 | fi; |
|
121 | fi; | |
122 | - HGTESTS_ALLOW_NETIO="$TEST_HGTESTS_ALLOW_NETIO" |
|
122 | - HGTESTS_ALLOW_NETIO="$TEST_HGTESTS_ALLOW_NETIO" | |
123 | "$PYTHON" tests/run-tests.py |
|
123 | "$PYTHON" tests/run-tests.py | |
124 | --color=always |
|
124 | --color=always | |
125 | $WHEEL_ARG |
|
125 | $WHEEL_ARG | |
126 | $FLAVOR |
|
126 | $FLAVOR | |
127 | $FILTER |
|
127 | $FILTER | |
128 | $RUNTEST_ARGS; |
|
128 | $RUNTEST_ARGS; | |
129 |
|
129 | |||
130 | checks: |
|
130 | checks: | |
131 | extends: .runtests |
|
131 | extends: .runtests | |
132 | stage: checks |
|
132 | stage: checks | |
133 | variables: |
|
133 | variables: | |
134 | SHOW_VERSION_OF: "$PYTHON black clang-format" |
|
134 | SHOW_VERSION_OF: "$PYTHON black clang-format" | |
135 | RUNTEST_ARGS: "--time" |
|
135 | RUNTEST_ARGS: "--time" | |
136 | FILTER: "--test-list ${TMP_WORK_DIR}/check-tests.txt" |
|
136 | FILTER: "--test-list ${TMP_WORK_DIR}/check-tests.txt" | |
137 | CI_CLEVER_CLOUD_FLAVOR: S |
|
137 | CI_CLEVER_CLOUD_FLAVOR: S | |
138 |
|
138 | |||
139 | rust-cargo-test: |
|
139 | rust-cargo-test: | |
140 | extends: .all |
|
140 | extends: .all | |
141 | stage: checks |
|
141 | stage: checks | |
142 | script: |
|
142 | script: | |
143 | - make rust-tests |
|
143 | - make rust-tests | |
144 | - make cargo-clippy |
|
144 | - make cargo-clippy | |
145 | variables: |
|
145 | variables: | |
146 | CI_CLEVER_CLOUD_FLAVOR: S |
|
146 | CI_CLEVER_CLOUD_FLAVOR: S | |
147 |
|
147 | |||
148 | .runtests-no-check: |
|
148 | .runtests-no-check: | |
149 | extends: .runtests |
|
149 | extends: .runtests | |
150 | variables: |
|
150 | variables: | |
151 | FILTER: "--blacklist ${TMP_WORK_DIR}/check-tests.txt" |
|
151 | FILTER: "--blacklist ${TMP_WORK_DIR}/check-tests.txt" | |
152 | TEST_HGTESTS_ALLOW_NETIO: "1" |
|
152 | TEST_HGTESTS_ALLOW_NETIO: "1" | |
153 |
|
153 | |||
154 | .test-c: |
|
154 | .test-c: | |
155 | extends: .runtests-no-check |
|
155 | extends: .runtests-no-check | |
156 | variables: |
|
156 | variables: | |
157 | FLAVOR: "--no-rust" |
|
157 | FLAVOR: "--no-rust" | |
158 |
|
158 | |||
159 | test-c: |
|
159 | test-c: | |
160 | extends: .test-c |
|
160 | extends: .test-c | |
161 | needs: |
|
161 | needs: | |
162 | - job: build-c-wheel |
|
162 | - job: build-c-wheel | |
163 | parallel: |
|
163 | parallel: | |
164 | matrix: |
|
164 | matrix: | |
165 | - BUILD_PY_ID: "cp311-cp311" |
|
165 | - BUILD_PY_ID: "cp311-cp311" | |
166 | variables: |
|
166 | variables: | |
167 | WHEEL_TYPE: "c" |
|
167 | WHEEL_TYPE: "c" | |
168 |
|
168 | |||
169 | test-pure: |
|
169 | test-pure: | |
170 | extends: .runtests-no-check |
|
170 | extends: .runtests-no-check | |
171 | variables: |
|
171 | variables: | |
172 | FLAVOR: "--pure" |
|
172 | FLAVOR: "--pure" | |
173 |
|
173 | |||
174 | test-rust: |
|
174 | test-rust: | |
175 | extends: .runtests-no-check |
|
175 | extends: .runtests-no-check | |
176 | variables: |
|
176 | variables: | |
177 | HGWITHRUSTEXT: "cpython" |
|
177 | HGWITHRUSTEXT: "cpython" | |
178 | FLAVOR: "--rust" |
|
178 | FLAVOR: "--rust" | |
179 |
|
179 | |||
180 | test-rhg: |
|
180 | test-rhg: | |
181 | extends: .runtests-no-check |
|
181 | extends: .runtests-no-check | |
182 | variables: |
|
182 | variables: | |
183 | HGWITHRUSTEXT: "cpython" |
|
183 | HGWITHRUSTEXT: "cpython" | |
184 | FLAVOR: "--rust --rhg" |
|
184 | FLAVOR: "--rust --rhg" | |
185 |
|
185 | |||
186 | test-chg: |
|
186 | test-chg: | |
187 | extends: .runtests-no-check |
|
187 | extends: .runtests-no-check | |
188 | variables: |
|
188 | variables: | |
189 | FLAVOR: "--chg" |
|
189 | FLAVOR: "--chg" | |
190 |
|
190 | |||
191 | # note: we should probably get a full matrix for flavor Γ py-version, but this |
|
191 | # note: we should probably get a full matrix for flavor Γ py-version, but this | |
192 | # is a simple start to be able to check if we break the lowest supported |
|
192 | # is a simple start to be able to check if we break the lowest supported | |
193 | # version (and 3.12 have been giving us various troubles) |
|
193 | # version (and 3.12 have been giving us various troubles) | |
194 | test-3.8-c: |
|
194 | test-3.8-c: | |
195 | extends: .test-c |
|
195 | extends: .test-c | |
196 | stage: py-version-compat |
|
196 | stage: py-version-compat | |
197 | when: manual # avoid overloading the CI by default |
|
197 | when: manual # avoid overloading the CI by default | |
198 | variables: |
|
198 | variables: | |
199 | PYTHON: python3.8 |
|
199 | PYTHON: python3.8 | |
200 | WHEEL_TYPE: "c" |
|
200 | WHEEL_TYPE: "c" | |
201 | needs: |
|
201 | needs: | |
202 | - job: build-c-wheel |
|
202 | - job: build-c-wheel | |
203 | parallel: |
|
203 | parallel: | |
204 | matrix: |
|
204 | matrix: | |
205 | - BUILD_PY_ID: "cp38-cp38" |
|
205 | - BUILD_PY_ID: "cp38-cp38" | |
206 |
|
206 | |||
207 | test-3.12-c: |
|
207 | test-3.12-c: | |
208 | extends: .test-c |
|
208 | extends: .test-c | |
209 | stage: py-version-compat |
|
209 | stage: py-version-compat | |
210 | when: manual # avoid overloading the CI by default |
|
210 | when: manual # avoid overloading the CI by default | |
211 | variables: |
|
211 | variables: | |
212 | PYTHON: python3.12 |
|
212 | PYTHON: python3.12 | |
213 | WHEEL_TYPE: "c" |
|
213 | WHEEL_TYPE: "c" | |
214 | needs: |
|
214 | needs: | |
215 | - job: build-c-wheel |
|
215 | - job: build-c-wheel | |
216 | parallel: |
|
216 | parallel: | |
217 | matrix: |
|
217 | matrix: | |
218 | - BUILD_PY_ID: "cp312-cp312" |
|
218 | - BUILD_PY_ID: "cp312-cp312" | |
219 |
|
219 | |||
220 | test-3.12-rust: |
|
220 | test-3.12-rust: | |
221 | extends: test-rust |
|
221 | extends: test-rust | |
222 | stage: py-version-compat |
|
222 | stage: py-version-compat | |
223 | when: manual # avoid overloading the CI by default |
|
223 | when: manual # avoid overloading the CI by default | |
224 | variables: |
|
224 | variables: | |
225 | PYTHON: python3.12 |
|
225 | PYTHON: python3.12 | |
226 |
|
226 | |||
227 | test-3.13-c: |
|
227 | test-3.13-c: | |
228 | extends: .test-c |
|
228 | extends: .test-c | |
229 | stage: py-version-compat |
|
229 | stage: py-version-compat | |
230 | when: manual # avoid overloading the CI by default |
|
230 | when: manual # avoid overloading the CI by default | |
231 | variables: |
|
231 | variables: | |
232 | PYTHON: python3.13 |
|
232 | PYTHON: python3.13 | |
233 | WHEEL_TYPE: "c" |
|
233 | WHEEL_TYPE: "c" | |
234 | needs: |
|
234 | needs: | |
235 | - job: build-c-wheel |
|
235 | - job: build-c-wheel | |
236 | parallel: |
|
236 | parallel: | |
237 | matrix: |
|
237 | matrix: | |
238 | - BUILD_PY_ID: "cp313-cp313" |
|
238 | - BUILD_PY_ID: "cp313-cp313" | |
239 |
|
239 | |||
240 | test-3.13-rust: |
|
240 | test-3.13-rust: | |
241 | extends: test-rust |
|
241 | extends: test-rust | |
242 | stage: py-version-compat |
|
242 | stage: py-version-compat | |
243 | when: manual # avoid overloading the CI by default |
|
243 | when: manual # avoid overloading the CI by default | |
244 | variables: |
|
244 | variables: | |
245 | PYTHON: python3.13 |
|
245 | PYTHON: python3.13 | |
246 |
|
246 | |||
247 | check-pytype: |
|
247 | check-pytype: | |
248 | extends: test-rust |
|
248 | extends: test-rust | |
249 | stage: checks |
|
249 | stage: checks | |
250 | before_script: |
|
250 | before_script: | |
251 | - 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" |
|
251 | - 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" | |
252 | - echo "PATH, $PATH" |
|
252 | - echo "PATH, $PATH" | |
253 | - hg clone . "${TMP_WORK_DIR}"/mercurial-ci/ --noupdate --config phases.publish=no |
|
253 | - hg clone . "${TMP_WORK_DIR}"/mercurial-ci/ --noupdate --config phases.publish=no | |
254 | - hg -R "${TMP_WORK_DIR}"/mercurial-ci/ update `hg log --rev '.' --template '{node}'` |
|
254 | - hg -R "${TMP_WORK_DIR}"/mercurial-ci/ update `hg log --rev '.' --template '{node}'` | |
255 | - cd "${TMP_WORK_DIR}"/mercurial-ci/ |
|
255 | - cd "${TMP_WORK_DIR}"/mercurial-ci/ | |
256 | - make local PYTHON=$PYTHON |
|
256 | - make local PYTHON=$PYTHON | |
257 | - ./contrib/setup-pytype.sh |
|
257 | - ./contrib/setup-pytype.sh | |
258 | script: |
|
258 | script: | |
259 | - echo "Entering script section" |
|
259 | - echo "Entering script section" | |
260 | - sh contrib/check-pytype.sh |
|
260 | - sh contrib/check-pytype.sh | |
261 |
|
261 | |||
262 | # `sh.exe --login` sets a couple of extra environment variables that are defined |
|
262 | # `sh.exe --login` sets a couple of extra environment variables that are defined | |
263 | # in the MinGW shell, but switches CWD to /home/$username. The previous value |
|
263 | # in the MinGW shell, but switches CWD to /home/$username. The previous value | |
264 | # is stored in OLDPWD. Of the added variables, MSYSTEM is crucial to running |
|
264 | # is stored in OLDPWD. Of the added variables, MSYSTEM is crucial to running | |
265 | # run-tests.py- it is needed to make run-tests.py generate a `python3` script |
|
265 | # run-tests.py- it is needed to make run-tests.py generate a `python3` script | |
266 | # that satisfies the various shebang lines and delegates to `py -3`. |
|
266 | # that satisfies the various shebang lines and delegates to `py -3`. | |
267 | .windows-runtests: |
|
267 | .windows-runtests: | |
268 | extends: .all |
|
268 | extends: .all | |
269 | when: manual # we don't have any Windows runners anymore at the moment |
|
269 | when: manual # we don't have any Windows runners anymore at the moment | |
270 | stage: platform-compat |
|
270 | stage: platform-compat | |
271 | before_script: |
|
271 | before_script: | |
272 | - C:/hgdev/MinGW/msys/1.0/bin/sh.exe --login -c 'cd "$OLDPWD" && ls -1 tests/test-check-*.* > "${TMP_WORK_DIR}"/check-tests.txt' |
|
272 | - C:/hgdev/MinGW/msys/1.0/bin/sh.exe --login -c 'cd "$OLDPWD" && ls -1 tests/test-check-*.* > "${TMP_WORK_DIR}"/check-tests.txt' | |
273 | # TODO: find/install cvs, bzr, perforce, gpg, sqlite3 |
|
273 | # TODO: find/install cvs, bzr, perforce, gpg, sqlite3 | |
274 |
|
274 | |||
275 | script: |
|
275 | script: | |
276 | - echo "Entering script section" |
|
276 | - echo "Entering script section" | |
277 | - echo "python used, $Env:PYTHON" |
|
277 | - echo "python used, $Env:PYTHON" | |
278 | - Invoke-Expression "$Env:PYTHON -V" |
|
278 | - Invoke-Expression "$Env:PYTHON -V" | |
279 | - echo "$Env:RUNTEST_ARGS" |
|
279 | - echo "$Env:RUNTEST_ARGS" | |
280 | - echo "$Env:TMP" |
|
280 | - echo "$Env:TMP" | |
281 | - echo "$Env:TEMP" |
|
281 | - echo "$Env:TEMP" | |
282 |
|
282 | |||
283 | - 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' |
|
283 | - 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' | |
284 | variables: |
|
284 | variables: | |
285 | TMP_WORK_DIR: "C:/hgdev/tmp" |
|
285 | TMP_WORK_DIR: "C:/hgdev/tmp" | |
286 |
|
286 | |||
287 | windows: |
|
287 | windows: | |
288 | extends: .windows-runtests |
|
288 | extends: .windows-runtests | |
289 | when: manual |
|
289 | when: manual | |
290 | tags: |
|
290 | tags: | |
291 | - windows |
|
291 | - windows | |
292 | variables: |
|
292 | variables: | |
293 | RUNTEST_ARGS: "-j 8 --blacklist ${TMP_WORK_DIR}/check-tests.txt" |
|
293 | RUNTEST_ARGS: "-j 8 --blacklist ${TMP_WORK_DIR}/check-tests.txt" | |
294 | PYTHON: C:/hgdev/venvs/python39-x64/Scripts/python.exe |
|
294 | PYTHON: C:/hgdev/venvs/python39-x64/Scripts/python.exe | |
295 |
|
295 | |||
296 | windows-pyox: |
|
296 | windows-pyox: | |
297 | extends: .windows-runtests |
|
297 | extends: .windows-runtests | |
298 | when: manual # pyoxidizer builds seem broken with --no-use-pep517 |
|
298 | when: manual # pyoxidizer builds seem broken with --no-use-pep517 | |
299 | tags: |
|
299 | tags: | |
300 | - windows |
|
300 | - windows | |
301 | variables: |
|
301 | variables: | |
302 | RUNTEST_ARGS: "--blacklist ${TMP_WORK_DIR}/check-tests.txt --pyoxidized" |
|
302 | RUNTEST_ARGS: "--blacklist ${TMP_WORK_DIR}/check-tests.txt --pyoxidized" | |
303 | PYTHON: C:/hgdev/venvs/python39-x64/Scripts/python.exe |
|
303 | PYTHON: C:/hgdev/venvs/python39-x64/Scripts/python.exe | |
304 |
|
304 | |||
305 | macos: |
|
305 | macos: | |
306 | extends: .test-c |
|
306 | extends: .test-c | |
307 | stage: platform-compat |
|
307 | stage: platform-compat | |
308 | when: manual # avoid overloading the CI by default |
|
308 | when: manual # avoid overloading the CI by default | |
309 | tags: |
|
309 | tags: | |
310 | - macos |
|
310 | - macos | |
311 | variables: |
|
311 | variables: | |
312 | WHEEL_TYPE: "c" |
|
312 | WHEEL_TYPE: "c" | |
313 | needs: |
|
313 | needs: | |
314 | - build-c-wheel-macos |
|
314 | - build-c-wheel-macos | |
315 |
|
315 | |||
316 | # we use CIBW_SKIP="pp*" to prevent the building of pypy wheel that are neither |
|
316 | # we use CIBW_SKIP="pp*" to prevent the building of pypy wheel that are neither | |
317 | # needed nor working. |
|
317 | # needed nor working. | |
318 | # |
|
318 | # | |
319 | # We could use CIBW_BUILD="cp310-*" to only build the Python 3.10 wheel for now as |
|
319 | # We could use CIBW_BUILD="cp310-*" to only build the Python 3.10 wheel for now as | |
320 | # 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. |
|
320 | # 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. | |
321 | # |
|
321 | # | |
322 | # The weird directory structure match the one we use for Linux to deal with the |
|
322 | # The weird directory structure match the one we use for Linux to deal with the | |
323 | # multiple jobs. (all this might be unnecessary) |
|
323 | # multiple jobs. (all this might be unnecessary) | |
324 | build-c-wheel-macos: |
|
324 | build-c-wheel-macos: | |
325 | when: manual # avoid overloading the CI by default |
|
325 | when: manual # avoid overloading the CI by default | |
326 | stage: build |
|
326 | stage: build | |
327 | tags: |
|
327 | tags: | |
328 | - macos |
|
328 | - macos | |
329 | script: |
|
329 | script: | |
330 | - rm -rf tmp-wheels |
|
330 | - rm -rf tmp-wheels | |
331 | - CIBW_SKIP="pp*" cibuildwheel --output-dir tmp-wheels/ |
|
331 | - CIBW_SKIP="pp*" cibuildwheel --output-dir tmp-wheels/ | |
332 | - for py_version in cp38-cp38 cp39-cp39 cp310-cp310 cp311-cp311 cp312-cp312 cp313-cp313; do |
|
332 | - for py_version in cp38-cp38 cp39-cp39 cp310-cp310 cp311-cp311 cp312-cp312 cp313-cp313; do | |
333 | mkdir -p wheels/c/$py_version/; |
|
333 | mkdir -p wheels/c/$py_version/; | |
334 | mv tmp-wheels/*$py_version*.whl wheels/c/$py_version/; |
|
334 | mv tmp-wheels/*$py_version*.whl wheels/c/$py_version/; | |
335 | done |
|
335 | done | |
336 | - rm -rf tmp-wheels |
|
336 | - rm -rf tmp-wheels | |
337 | artifacts: |
|
337 | artifacts: | |
338 | paths: |
|
338 | paths: | |
339 | - wheels |
|
339 | - wheels | |
340 | expire_in: 1 week |
|
340 | expire_in: 1 week |
General Comments 0
You need to be logged in to leave comments.
Login now