Show More
@@ -1,132 +1,133 | |||||
1 | #!/bin/sh |
|
1 | #!/bin/bash | |
2 |
|
2 | |||
3 | set -e |
|
3 | set -e | |
4 | set -u |
|
4 | set -u | |
|
5 | set -o pipefail | |||
5 |
|
6 | |||
6 | cd "$(hg root)" |
|
7 | cd "$(hg root)" | |
7 |
|
8 | |||
8 | printf "pytype version: " |
|
9 | printf "pytype version: " | |
9 | pytype --version |
|
10 | pytype --version | |
10 |
|
11 | |||
11 | # Many of the individual files that are excluded here confuse pytype |
|
12 | # Many of the individual files that are excluded here confuse pytype | |
12 | # because they do a mix of Python 2 and Python 3 things |
|
13 | # because they do a mix of Python 2 and Python 3 things | |
13 | # conditionally. There's no good way to help it out with that as far as |
|
14 | # conditionally. There's no good way to help it out with that as far as | |
14 | # I can tell, so let's just hide those files from it for now. We should |
|
15 | # I can tell, so let's just hide those files from it for now. We should | |
15 | # endeavor to empty this list out over time, as some of these are |
|
16 | # endeavor to empty this list out over time, as some of these are | |
16 | # probably hiding real problems. |
|
17 | # probably hiding real problems. | |
17 | # |
|
18 | # | |
18 | # hgext/absorb.py # [attribute-error] |
|
19 | # hgext/absorb.py # [attribute-error] | |
19 | # hgext/bugzilla.py # [pyi-error], [attribute-error] |
|
20 | # hgext/bugzilla.py # [pyi-error], [attribute-error] | |
20 | # hgext/convert/bzr.py # [attribute-error] |
|
21 | # hgext/convert/bzr.py # [attribute-error] | |
21 | # hgext/convert/cvs.py # [attribute-error], [wrong-arg-types] |
|
22 | # hgext/convert/cvs.py # [attribute-error], [wrong-arg-types] | |
22 | # hgext/convert/cvsps.py # [attribute-error] |
|
23 | # hgext/convert/cvsps.py # [attribute-error] | |
23 | # hgext/convert/p4.py # [wrong-arg-types] (__file: mercurial.utils.procutil._pfile -> IO) |
|
24 | # hgext/convert/p4.py # [wrong-arg-types] (__file: mercurial.utils.procutil._pfile -> IO) | |
24 | # hgext/convert/subversion.py # [attribute-error], [name-error], [pyi-error] |
|
25 | # hgext/convert/subversion.py # [attribute-error], [name-error], [pyi-error] | |
25 | # hgext/fastannotate/context.py # no linelog.copyfrom() |
|
26 | # hgext/fastannotate/context.py # no linelog.copyfrom() | |
26 | # hgext/fastannotate/formatter.py # [unsupported-operands] |
|
27 | # hgext/fastannotate/formatter.py # [unsupported-operands] | |
27 | # hgext/fsmonitor/__init__.py # [name-error] |
|
28 | # hgext/fsmonitor/__init__.py # [name-error] | |
28 | # hgext/git/__init__.py # [attribute-error] |
|
29 | # hgext/git/__init__.py # [attribute-error] | |
29 | # hgext/githelp.py # [attribute-error] [wrong-arg-types] |
|
30 | # hgext/githelp.py # [attribute-error] [wrong-arg-types] | |
30 | # hgext/hgk.py # [attribute-error] |
|
31 | # hgext/hgk.py # [attribute-error] | |
31 | # hgext/histedit.py # [attribute-error], [wrong-arg-types] |
|
32 | # hgext/histedit.py # [attribute-error], [wrong-arg-types] | |
32 | # hgext/keyword.py # [attribute-error] |
|
33 | # hgext/keyword.py # [attribute-error] | |
33 | # hgext/largefiles/storefactory.py # [attribute-error] |
|
34 | # hgext/largefiles/storefactory.py # [attribute-error] | |
34 | # hgext/lfs/__init__.py # [attribute-error] |
|
35 | # hgext/lfs/__init__.py # [attribute-error] | |
35 | # hgext/narrow/narrowbundle2.py # [attribute-error] |
|
36 | # hgext/narrow/narrowbundle2.py # [attribute-error] | |
36 | # hgext/narrow/narrowcommands.py # [attribute-error], [name-error] |
|
37 | # hgext/narrow/narrowcommands.py # [attribute-error], [name-error] | |
37 | # hgext/rebase.py # [attribute-error] |
|
38 | # hgext/rebase.py # [attribute-error] | |
38 | # hgext/remotefilelog/basepack.py # [attribute-error], [wrong-arg-count] |
|
39 | # hgext/remotefilelog/basepack.py # [attribute-error], [wrong-arg-count] | |
39 | # hgext/remotefilelog/basestore.py # [attribute-error] |
|
40 | # hgext/remotefilelog/basestore.py # [attribute-error] | |
40 | # hgext/remotefilelog/contentstore.py # [missing-parameter], [wrong-keyword-args], [attribute-error] |
|
41 | # hgext/remotefilelog/contentstore.py # [missing-parameter], [wrong-keyword-args], [attribute-error] | |
41 | # hgext/remotefilelog/fileserverclient.py # [attribute-error] |
|
42 | # hgext/remotefilelog/fileserverclient.py # [attribute-error] | |
42 | # hgext/remotefilelog/shallowbundle.py # [attribute-error] |
|
43 | # hgext/remotefilelog/shallowbundle.py # [attribute-error] | |
43 | # hgext/remotefilelog/remotefilectx.py # [module-attr] (This is an actual bug) |
|
44 | # hgext/remotefilelog/remotefilectx.py # [module-attr] (This is an actual bug) | |
44 | # hgext/sqlitestore.py # [attribute-error] |
|
45 | # hgext/sqlitestore.py # [attribute-error] | |
45 | # hgext/zeroconf/__init__.py # bytes vs str; tests fail on macOS |
|
46 | # hgext/zeroconf/__init__.py # bytes vs str; tests fail on macOS | |
46 | # |
|
47 | # | |
47 | # mercurial/context.py # many [attribute-error] |
|
48 | # mercurial/context.py # many [attribute-error] | |
48 | # mercurial/crecord.py # tons of [attribute-error], [module-attr] |
|
49 | # mercurial/crecord.py # tons of [attribute-error], [module-attr] | |
49 | # mercurial/debugcommands.py # [wrong-arg-types] |
|
50 | # mercurial/debugcommands.py # [wrong-arg-types] | |
50 | # mercurial/dispatch.py # initstdio: No attribute ... on TextIO [attribute-error] |
|
51 | # mercurial/dispatch.py # initstdio: No attribute ... on TextIO [attribute-error] | |
51 | # mercurial/exchange.py # [attribute-error] |
|
52 | # mercurial/exchange.py # [attribute-error] | |
52 | # mercurial/hgweb/hgweb_mod.py # [attribute-error], [name-error], [wrong-arg-types] |
|
53 | # mercurial/hgweb/hgweb_mod.py # [attribute-error], [name-error], [wrong-arg-types] | |
53 | # mercurial/hgweb/server.py # [attribute-error], [name-error], [module-attr] |
|
54 | # mercurial/hgweb/server.py # [attribute-error], [name-error], [module-attr] | |
54 | # mercurial/hgweb/wsgicgi.py # confused values in os.environ |
|
55 | # mercurial/hgweb/wsgicgi.py # confused values in os.environ | |
55 | # mercurial/httppeer.py # [attribute-error], [wrong-arg-types] |
|
56 | # mercurial/httppeer.py # [attribute-error], [wrong-arg-types] | |
56 | # mercurial/interfaces # No attribute 'capabilities' on peer [attribute-error] |
|
57 | # mercurial/interfaces # No attribute 'capabilities' on peer [attribute-error] | |
57 | # mercurial/keepalive.py # [attribute-error] |
|
58 | # mercurial/keepalive.py # [attribute-error] | |
58 | # mercurial/localrepo.py # [attribute-error] |
|
59 | # mercurial/localrepo.py # [attribute-error] | |
59 | # mercurial/minirst.py # [unsupported-operands], [attribute-error] |
|
60 | # mercurial/minirst.py # [unsupported-operands], [attribute-error] | |
60 | # mercurial/pure/parsers.py # [attribute-error] |
|
61 | # mercurial/pure/parsers.py # [attribute-error] | |
61 | # mercurial/repoview.py # [attribute-error] |
|
62 | # mercurial/repoview.py # [attribute-error] | |
62 | # mercurial/testing/storage.py # tons of [attribute-error] |
|
63 | # mercurial/testing/storage.py # tons of [attribute-error] | |
63 | # mercurial/win32.py # [not-callable] |
|
64 | # mercurial/win32.py # [not-callable] | |
64 | # mercurial/wireprotov1server.py # BUG?: BundleValueError handler accesses subclass's attrs |
|
65 | # mercurial/wireprotov1server.py # BUG?: BundleValueError handler accesses subclass's attrs | |
65 |
|
66 | |||
66 | # TODO: use --no-cache on test server? Caching the files locally helps during |
|
67 | # TODO: use --no-cache on test server? Caching the files locally helps during | |
67 | # development, but may be a hinderance for CI testing. |
|
68 | # development, but may be a hinderance for CI testing. | |
68 |
|
69 | |||
69 | # TODO: include hgext and hgext3rd |
|
70 | # TODO: include hgext and hgext3rd | |
70 |
|
71 | |||
71 | # use ts to produce some timing if available |
|
72 | # use ts to produce some timing if available | |
72 | if ! command -v ts; then |
|
73 | if ! command -v ts; then | |
73 | ts() { |
|
74 | ts() { | |
74 | cat |
|
75 | cat | |
75 | } |
|
76 | } | |
76 | fi |
|
77 | fi | |
77 |
|
78 | |||
78 | pytype --keep-going --jobs auto \ |
|
79 | pytype --keep-going --jobs auto \ | |
79 | doc/check-seclevel.py hgdemandimport hgext mercurial \ |
|
80 | doc/check-seclevel.py hgdemandimport hgext mercurial \ | |
80 | -x hgext/absorb.py \ |
|
81 | -x hgext/absorb.py \ | |
81 | -x hgext/bugzilla.py \ |
|
82 | -x hgext/bugzilla.py \ | |
82 | -x hgext/convert/bzr.py \ |
|
83 | -x hgext/convert/bzr.py \ | |
83 | -x hgext/convert/cvs.py \ |
|
84 | -x hgext/convert/cvs.py \ | |
84 | -x hgext/convert/cvsps.py \ |
|
85 | -x hgext/convert/cvsps.py \ | |
85 | -x hgext/convert/p4.py \ |
|
86 | -x hgext/convert/p4.py \ | |
86 | -x hgext/convert/subversion.py \ |
|
87 | -x hgext/convert/subversion.py \ | |
87 | -x hgext/fastannotate/context.py \ |
|
88 | -x hgext/fastannotate/context.py \ | |
88 | -x hgext/fastannotate/formatter.py \ |
|
89 | -x hgext/fastannotate/formatter.py \ | |
89 | -x hgext/fsmonitor/__init__.py \ |
|
90 | -x hgext/fsmonitor/__init__.py \ | |
90 | -x hgext/git/__init__.py \ |
|
91 | -x hgext/git/__init__.py \ | |
91 | -x hgext/githelp.py \ |
|
92 | -x hgext/githelp.py \ | |
92 | -x hgext/hgk.py \ |
|
93 | -x hgext/hgk.py \ | |
93 | -x hgext/histedit.py \ |
|
94 | -x hgext/histedit.py \ | |
94 | -x hgext/keyword.py \ |
|
95 | -x hgext/keyword.py \ | |
95 | -x hgext/largefiles/storefactory.py \ |
|
96 | -x hgext/largefiles/storefactory.py \ | |
96 | -x hgext/lfs/__init__.py \ |
|
97 | -x hgext/lfs/__init__.py \ | |
97 | -x hgext/narrow/narrowbundle2.py \ |
|
98 | -x hgext/narrow/narrowbundle2.py \ | |
98 | -x hgext/narrow/narrowcommands.py \ |
|
99 | -x hgext/narrow/narrowcommands.py \ | |
99 | -x hgext/rebase.py \ |
|
100 | -x hgext/rebase.py \ | |
100 | -x hgext/remotefilelog/basepack.py \ |
|
101 | -x hgext/remotefilelog/basepack.py \ | |
101 | -x hgext/remotefilelog/basestore.py \ |
|
102 | -x hgext/remotefilelog/basestore.py \ | |
102 | -x hgext/remotefilelog/contentstore.py \ |
|
103 | -x hgext/remotefilelog/contentstore.py \ | |
103 | -x hgext/remotefilelog/fileserverclient.py \ |
|
104 | -x hgext/remotefilelog/fileserverclient.py \ | |
104 | -x hgext/remotefilelog/remotefilectx.py \ |
|
105 | -x hgext/remotefilelog/remotefilectx.py \ | |
105 | -x hgext/remotefilelog/shallowbundle.py \ |
|
106 | -x hgext/remotefilelog/shallowbundle.py \ | |
106 | -x hgext/sqlitestore.py \ |
|
107 | -x hgext/sqlitestore.py \ | |
107 | -x hgext/zeroconf/__init__.py \ |
|
108 | -x hgext/zeroconf/__init__.py \ | |
108 | -x mercurial/context.py \ |
|
109 | -x mercurial/context.py \ | |
109 | -x mercurial/crecord.py \ |
|
110 | -x mercurial/crecord.py \ | |
110 | -x mercurial/debugcommands.py \ |
|
111 | -x mercurial/debugcommands.py \ | |
111 | -x mercurial/dispatch.py \ |
|
112 | -x mercurial/dispatch.py \ | |
112 | -x mercurial/exchange.py \ |
|
113 | -x mercurial/exchange.py \ | |
113 | -x mercurial/hgweb/hgweb_mod.py \ |
|
114 | -x mercurial/hgweb/hgweb_mod.py \ | |
114 | -x mercurial/hgweb/server.py \ |
|
115 | -x mercurial/hgweb/server.py \ | |
115 | -x mercurial/hgweb/wsgicgi.py \ |
|
116 | -x mercurial/hgweb/wsgicgi.py \ | |
116 | -x mercurial/httppeer.py \ |
|
117 | -x mercurial/httppeer.py \ | |
117 | -x mercurial/interfaces \ |
|
118 | -x mercurial/interfaces \ | |
118 | -x mercurial/keepalive.py \ |
|
119 | -x mercurial/keepalive.py \ | |
119 | -x mercurial/localrepo.py \ |
|
120 | -x mercurial/localrepo.py \ | |
120 | -x mercurial/minirst.py \ |
|
121 | -x mercurial/minirst.py \ | |
121 | -x mercurial/pure/parsers.py \ |
|
122 | -x mercurial/pure/parsers.py \ | |
122 | -x mercurial/repoview.py \ |
|
123 | -x mercurial/repoview.py \ | |
123 | -x mercurial/testing/storage.py \ |
|
124 | -x mercurial/testing/storage.py \ | |
124 | -x mercurial/thirdparty \ |
|
125 | -x mercurial/thirdparty \ | |
125 | -x mercurial/win32.py \ |
|
126 | -x mercurial/win32.py \ | |
126 | -x mercurial/wireprotov1server.py \ |
|
127 | -x mercurial/wireprotov1server.py \ | |
127 | | ts -i "(%.s)" | ts -s "%.s" |
|
128 | | ts -i "(%.s)" | ts -s "%.s" | |
128 |
|
129 | |||
129 | if find .pytype/pyi -name '*.pyi' | xargs grep -ql '# Caught error'; then |
|
130 | if find .pytype/pyi -name '*.pyi' | xargs grep -ql '# Caught error'; then | |
130 | echo 'pytype crashed while generating the following type stubs:' |
|
131 | echo 'pytype crashed while generating the following type stubs:' | |
131 | find .pytype/pyi -name '*.pyi' | xargs grep -l '# Caught error' | sort |
|
132 | find .pytype/pyi -name '*.pyi' | xargs grep -l '# Caught error' | sort | |
132 | fi |
|
133 | fi |
@@ -1,730 +1,730 | |||||
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 | - nightly-trigger |
|
23 | - nightly-trigger | |
24 | - build |
|
24 | - build | |
25 | - checks |
|
25 | - checks | |
26 | - tests |
|
26 | - tests | |
27 | - platform-compat |
|
27 | - platform-compat | |
28 | - py-version-compat |
|
28 | - py-version-compat | |
29 | - upload |
|
29 | - upload | |
30 |
|
30 | |||
31 |
|
31 | |||
32 | image: registry.heptapod.net/mercurial/ci-images/mercurial-core:$HG_CI_IMAGE_TAG |
|
32 | image: registry.heptapod.net/mercurial/ci-images/mercurial-core:$HG_CI_IMAGE_TAG | |
33 |
|
33 | |||
34 | variables: |
|
34 | variables: | |
35 | # to debug use: |
|
35 | # to debug use: | |
36 | # |
|
36 | # | |
37 | # RE_BRANCH: '/^topic/.+/.+$/' |
|
37 | # RE_BRANCH: '/^topic/.+/.+$/' | |
38 | # RE_TOPIC: '/^xxx/' |
|
38 | # RE_TOPIC: '/^xxx/' | |
39 | # |
|
39 | # | |
40 | # Instead of the two following lines: |
|
40 | # Instead of the two following lines: | |
41 | RE_BRANCH: '/^branch/.+$/' |
|
41 | RE_BRANCH: '/^branch/.+$/' | |
42 | RE_TOPIC: '/^topic/.+/.+$/' |
|
42 | RE_TOPIC: '/^topic/.+/.+$/' | |
43 | PYTHON: python |
|
43 | PYTHON: python | |
44 | HG_CI_IMAGE_TAG: "v2.1" |
|
44 | HG_CI_IMAGE_TAG: "v2.1" | |
45 | # a directory dedicated to creating files and temporary clone |
|
45 | # a directory dedicated to creating files and temporary clone | |
46 | # with shell runner, its content is not cleaned from one call to the next, |
|
46 | # with shell runner, its content is not cleaned from one call to the next, | |
47 | # so plan for it. |
|
47 | # so plan for it. | |
48 | TMP_WORK_DIR: "${CI_PROJECT_DIR}/../.." |
|
48 | TMP_WORK_DIR: "${CI_PROJECT_DIR}/../.." | |
49 | # we use CIBW_SKIP="pp*" to prevent the building of pypy wheel that are neither |
|
49 | # we use CIBW_SKIP="pp*" to prevent the building of pypy wheel that are neither | |
50 | # needed nor working. |
|
50 | # needed nor working. | |
51 | CIBW_SKIP: "pp*" |
|
51 | CIBW_SKIP: "pp*" | |
52 |
|
52 | |||
53 | .all: |
|
53 | .all: | |
54 | # help changing all job at once when debugging |
|
54 | # help changing all job at once when debugging | |
55 | when: on_success |
|
55 | when: on_success | |
56 | # make sure jobs from later steps does not wait for anything implicit before |
|
56 | # make sure jobs from later steps does not wait for anything implicit before | |
57 | # starting. |
|
57 | # starting. | |
58 | needs: [] |
|
58 | needs: [] | |
59 |
|
59 | |||
60 | # dummy job that serve dependencies purpose |
|
60 | # dummy job that serve dependencies purpose | |
61 | .dummy: |
|
61 | .dummy: | |
62 | # smallest I know of |
|
62 | # smallest I know of | |
63 | image: busybox |
|
63 | image: busybox | |
64 | variables: |
|
64 | variables: | |
65 | GIT_STRATEGY: none |
|
65 | GIT_STRATEGY: none | |
66 | CI_CLEVER_CLOUD_FLAVOR: "XS" |
|
66 | CI_CLEVER_CLOUD_FLAVOR: "XS" | |
67 | script: |
|
67 | script: | |
68 | - echo 'nothing to see here' |
|
68 | - echo 'nothing to see here' | |
69 |
|
69 | |||
70 |
|
70 | |||
71 | # a dummy job that only serve to trigger others |
|
71 | # a dummy job that only serve to trigger others | |
72 | # |
|
72 | # | |
73 | # This is useful for two reasons: |
|
73 | # This is useful for two reasons: | |
74 | # - the UX around parallel jobs is awful so manually starting them is unpractical |
|
74 | # - the UX around parallel jobs is awful so manually starting them is unpractical | |
75 | # - manual starting job cannot make the pipeline "fails" and block a merge, |
|
75 | # - manual starting job cannot make the pipeline "fails" and block a merge, | |
76 | # while "on_success" job depending on manual trigger works fine in that regard. |
|
76 | # while "on_success" job depending on manual trigger works fine in that regard. | |
77 | .trigger: |
|
77 | .trigger: | |
78 | extends: |
|
78 | extends: | |
79 | - .all |
|
79 | - .all | |
80 | - .dummy |
|
80 | - .dummy | |
81 | when: manual |
|
81 | when: manual | |
82 |
|
82 | |||
83 |
|
83 | |||
84 | trigger-nightly-build: |
|
84 | trigger-nightly-build: | |
85 | extends: .trigger |
|
85 | extends: .trigger | |
86 | stage: nightly-trigger |
|
86 | stage: nightly-trigger | |
87 | rules: |
|
87 | rules: | |
88 | - if: $CI_COMMIT_BRANCH =~ $RE_BRANCH |
|
88 | - if: $CI_COMMIT_BRANCH =~ $RE_BRANCH | |
89 | when: manual |
|
89 | when: manual | |
90 | allow_failure: true |
|
90 | allow_failure: true | |
91 | - if: $CI_COMMIT_BRANCH =~ $RE_TOPIC |
|
91 | - if: $CI_COMMIT_BRANCH =~ $RE_TOPIC | |
92 | when: never |
|
92 | when: never | |
93 |
|
93 | |||
94 | .build-wheel: |
|
94 | .build-wheel: | |
95 | extends: .all |
|
95 | extends: .all | |
96 | image: "registry.heptapod.net/mercurial/ci-images/core-wheel-x86_64-c:v3.0" |
|
96 | image: "registry.heptapod.net/mercurial/ci-images/core-wheel-x86_64-c:v3.0" | |
97 | stage: build |
|
97 | stage: build | |
98 | variables: |
|
98 | variables: | |
99 | WHEEL_TYPE: "" |
|
99 | WHEEL_TYPE: "" | |
100 | FLAVOR: "" |
|
100 | FLAVOR: "" | |
101 | MERCURIAL_SETUP_FORCE_TRANSLATIONS: "1" |
|
101 | MERCURIAL_SETUP_FORCE_TRANSLATIONS: "1" | |
102 | CI_CLEVER_CLOUD_FLAVOR: "XS" |
|
102 | CI_CLEVER_CLOUD_FLAVOR: "XS" | |
103 | script: |
|
103 | script: | |
104 | - PLATFORM=`/opt/python/cp313-cp313/bin/python -c 'import sys; print(sys.platform)'` |
|
104 | - PLATFORM=`/opt/python/cp313-cp313/bin/python -c 'import sys; print(sys.platform)'` | |
105 | - echo $WHEEL_TYPE |
|
105 | - echo $WHEEL_TYPE | |
106 | - test -n "$WHEEL_TYPE" |
|
106 | - test -n "$WHEEL_TYPE" | |
107 | - echo $FLAVOR |
|
107 | - echo $FLAVOR | |
108 | - mkdir -p wheels/$PLATFORM/$WHEEL_TYPE/$BUILD_PY_ID |
|
108 | - mkdir -p wheels/$PLATFORM/$WHEEL_TYPE/$BUILD_PY_ID | |
109 | - contrib/build-one-linux-wheel.sh $BUILD_PY_ID wheels/$PLATFORM/$WHEEL_TYPE/$BUILD_PY_ID |
|
109 | - contrib/build-one-linux-wheel.sh $BUILD_PY_ID wheels/$PLATFORM/$WHEEL_TYPE/$BUILD_PY_ID | |
110 | artifacts: |
|
110 | artifacts: | |
111 | paths: |
|
111 | paths: | |
112 | - wheels/ |
|
112 | - wheels/ | |
113 | expire_in: 1 week |
|
113 | expire_in: 1 week | |
114 |
|
114 | |||
115 |
|
115 | |||
116 | # build linux wheel for amd64 |
|
116 | # build linux wheel for amd64 | |
117 | build-c-wheel: |
|
117 | build-c-wheel: | |
118 | extends: .build-wheel |
|
118 | extends: .build-wheel | |
119 | variables: |
|
119 | variables: | |
120 | WHEEL_TYPE: "c" |
|
120 | WHEEL_TYPE: "c" | |
121 | parallel: |
|
121 | parallel: | |
122 | matrix: |
|
122 | matrix: | |
123 | - BUILD_PY_ID: |
|
123 | - BUILD_PY_ID: | |
124 | - cp38-cp38 |
|
124 | - cp38-cp38 | |
125 | - cp39-cp39 |
|
125 | - cp39-cp39 | |
126 | - cp310-cp310 |
|
126 | - cp310-cp310 | |
127 | - cp311-cp311 |
|
127 | - cp311-cp311 | |
128 | - cp312-cp312 |
|
128 | - cp312-cp312 | |
129 | - cp313-cp313 |
|
129 | - cp313-cp313 | |
130 |
|
130 | |||
131 | trigger-wheel-musl: |
|
131 | trigger-wheel-musl: | |
132 | extends: .trigger |
|
132 | extends: .trigger | |
133 | stage: build |
|
133 | stage: build | |
134 | rules: |
|
134 | rules: | |
135 | - if: $CI_COMMIT_BRANCH =~ $RE_BRANCH |
|
135 | - if: $CI_COMMIT_BRANCH =~ $RE_BRANCH | |
136 | when: never |
|
136 | when: never | |
137 | - if: $CI_COMMIT_BRANCH =~ $RE_TOPIC |
|
137 | - if: $CI_COMMIT_BRANCH =~ $RE_TOPIC | |
138 | when: manual |
|
138 | when: manual | |
139 | allow_failure: true |
|
139 | allow_failure: true | |
140 |
|
140 | |||
141 | build-c-wheel-musl: |
|
141 | build-c-wheel-musl: | |
142 | extends: build-c-wheel |
|
142 | extends: build-c-wheel | |
143 | image: "registry.heptapod.net/mercurial/ci-images/core-wheel-x86_64-musl-c:v3.0" |
|
143 | image: "registry.heptapod.net/mercurial/ci-images/core-wheel-x86_64-musl-c:v3.0" | |
144 | rules: |
|
144 | rules: | |
145 | - if: $CI_COMMIT_BRANCH =~ $RE_BRANCH |
|
145 | - if: $CI_COMMIT_BRANCH =~ $RE_BRANCH | |
146 | needs: |
|
146 | needs: | |
147 | - trigger-nightly-build |
|
147 | - trigger-nightly-build | |
148 | - if: $CI_COMMIT_BRANCH =~ $RE_TOPIC |
|
148 | - if: $CI_COMMIT_BRANCH =~ $RE_TOPIC | |
149 | needs: |
|
149 | needs: | |
150 | - "trigger-wheel-musl" |
|
150 | - "trigger-wheel-musl" | |
151 |
|
151 | |||
152 | trigger-wheel-i686: |
|
152 | trigger-wheel-i686: | |
153 | extends: .trigger |
|
153 | extends: .trigger | |
154 | stage: build |
|
154 | stage: build | |
155 | rules: |
|
155 | rules: | |
156 | - if: $CI_COMMIT_BRANCH =~ $RE_BRANCH |
|
156 | - if: $CI_COMMIT_BRANCH =~ $RE_BRANCH | |
157 | when: never |
|
157 | when: never | |
158 | - if: $CI_COMMIT_BRANCH =~ $RE_TOPIC |
|
158 | - if: $CI_COMMIT_BRANCH =~ $RE_TOPIC | |
159 | when: manual |
|
159 | when: manual | |
160 | allow_failure: true |
|
160 | allow_failure: true | |
161 |
|
161 | |||
162 | build-c-wheel-i686: |
|
162 | build-c-wheel-i686: | |
163 | extends: build-c-wheel |
|
163 | extends: build-c-wheel | |
164 | image: "registry.heptapod.net/mercurial/ci-images/core-wheel-i686-c:v3.0" |
|
164 | image: "registry.heptapod.net/mercurial/ci-images/core-wheel-i686-c:v3.0" | |
165 | rules: |
|
165 | rules: | |
166 | - if: $CI_COMMIT_BRANCH =~ $RE_BRANCH |
|
166 | - if: $CI_COMMIT_BRANCH =~ $RE_BRANCH | |
167 | needs: |
|
167 | needs: | |
168 | - trigger-nightly-build |
|
168 | - trigger-nightly-build | |
169 | - if: $CI_COMMIT_BRANCH =~ $RE_TOPIC |
|
169 | - if: $CI_COMMIT_BRANCH =~ $RE_TOPIC | |
170 | needs: |
|
170 | needs: | |
171 | - "trigger-wheel-i686" |
|
171 | - "trigger-wheel-i686" | |
172 |
|
172 | |||
173 | trigger-wheel-i686-musl: |
|
173 | trigger-wheel-i686-musl: | |
174 | extends: .trigger |
|
174 | extends: .trigger | |
175 | stage: build |
|
175 | stage: build | |
176 | rules: |
|
176 | rules: | |
177 | - if: $CI_COMMIT_BRANCH =~ $RE_BRANCH |
|
177 | - if: $CI_COMMIT_BRANCH =~ $RE_BRANCH | |
178 | when: never |
|
178 | when: never | |
179 | - if: $CI_COMMIT_BRANCH =~ $RE_TOPIC |
|
179 | - if: $CI_COMMIT_BRANCH =~ $RE_TOPIC | |
180 | when: manual |
|
180 | when: manual | |
181 | allow_failure: true |
|
181 | allow_failure: true | |
182 |
|
182 | |||
183 | build-c-wheel-i686-musl: |
|
183 | build-c-wheel-i686-musl: | |
184 | extends: build-c-wheel |
|
184 | extends: build-c-wheel | |
185 | image: "registry.heptapod.net/mercurial/ci-images/core-wheel-i686-musl-c:v3.0" |
|
185 | image: "registry.heptapod.net/mercurial/ci-images/core-wheel-i686-musl-c:v3.0" | |
186 | rules: |
|
186 | rules: | |
187 | - if: $CI_COMMIT_BRANCH =~ $RE_BRANCH |
|
187 | - if: $CI_COMMIT_BRANCH =~ $RE_BRANCH | |
188 | needs: |
|
188 | needs: | |
189 | - trigger-nightly-build |
|
189 | - trigger-nightly-build | |
190 | - if: $CI_COMMIT_BRANCH =~ $RE_TOPIC |
|
190 | - if: $CI_COMMIT_BRANCH =~ $RE_TOPIC | |
191 | needs: |
|
191 | needs: | |
192 | - "trigger-wheel-i686-musl" |
|
192 | - "trigger-wheel-i686-musl" | |
193 |
|
193 | |||
194 | trigger-wheel-arm64: |
|
194 | trigger-wheel-arm64: | |
195 | extends: .trigger |
|
195 | extends: .trigger | |
196 | stage: build |
|
196 | stage: build | |
197 | rules: |
|
197 | rules: | |
198 | - if: $CI_COMMIT_BRANCH =~ $RE_BRANCH |
|
198 | - if: $CI_COMMIT_BRANCH =~ $RE_BRANCH | |
199 | when: never |
|
199 | when: never | |
200 | - if: $CI_COMMIT_BRANCH =~ $RE_TOPIC |
|
200 | - if: $CI_COMMIT_BRANCH =~ $RE_TOPIC | |
201 | when: manual |
|
201 | when: manual | |
202 | allow_failure: true |
|
202 | allow_failure: true | |
203 |
|
203 | |||
204 | build-c-wheel-arm64: |
|
204 | build-c-wheel-arm64: | |
205 | extends: build-c-wheel |
|
205 | extends: build-c-wheel | |
206 | image: "registry.heptapod.net/mercurial/ci-images/core-wheel-arm64-c:v3.0" |
|
206 | image: "registry.heptapod.net/mercurial/ci-images/core-wheel-arm64-c:v3.0" | |
207 | tags: |
|
207 | tags: | |
208 | - arm64 |
|
208 | - arm64 | |
209 | rules: |
|
209 | rules: | |
210 | - if: $CI_COMMIT_BRANCH =~ $RE_BRANCH |
|
210 | - if: $CI_COMMIT_BRANCH =~ $RE_BRANCH | |
211 | needs: |
|
211 | needs: | |
212 | - trigger-nightly-build |
|
212 | - trigger-nightly-build | |
213 | - if: $CI_COMMIT_BRANCH =~ $RE_TOPIC |
|
213 | - if: $CI_COMMIT_BRANCH =~ $RE_TOPIC | |
214 | needs: |
|
214 | needs: | |
215 | - "trigger-wheel-arm64" |
|
215 | - "trigger-wheel-arm64" | |
216 |
|
216 | |||
217 | trigger-wheel-arm64-musl: |
|
217 | trigger-wheel-arm64-musl: | |
218 | extends: .trigger |
|
218 | extends: .trigger | |
219 | stage: build |
|
219 | stage: build | |
220 | rules: |
|
220 | rules: | |
221 | - if: $CI_COMMIT_BRANCH =~ $RE_BRANCH |
|
221 | - if: $CI_COMMIT_BRANCH =~ $RE_BRANCH | |
222 | when: never |
|
222 | when: never | |
223 | - if: $CI_COMMIT_BRANCH =~ $RE_TOPIC |
|
223 | - if: $CI_COMMIT_BRANCH =~ $RE_TOPIC | |
224 | when: manual |
|
224 | when: manual | |
225 | allow_failure: true |
|
225 | allow_failure: true | |
226 |
|
226 | |||
227 | build-c-wheel-arm64-musl: |
|
227 | build-c-wheel-arm64-musl: | |
228 | extends: build-c-wheel |
|
228 | extends: build-c-wheel | |
229 | image: "registry.heptapod.net/mercurial/ci-images/core-wheel-arm64-musl-c:v3.0" |
|
229 | image: "registry.heptapod.net/mercurial/ci-images/core-wheel-arm64-musl-c:v3.0" | |
230 | tags: |
|
230 | tags: | |
231 | - arm64 |
|
231 | - arm64 | |
232 | rules: |
|
232 | rules: | |
233 | - if: $CI_COMMIT_BRANCH =~ $RE_BRANCH |
|
233 | - if: $CI_COMMIT_BRANCH =~ $RE_BRANCH | |
234 | needs: |
|
234 | needs: | |
235 | - trigger-nightly-build |
|
235 | - trigger-nightly-build | |
236 | - if: $CI_COMMIT_BRANCH =~ $RE_TOPIC |
|
236 | - if: $CI_COMMIT_BRANCH =~ $RE_TOPIC | |
237 | needs: |
|
237 | needs: | |
238 | - "trigger-wheel-arm64-musl" |
|
238 | - "trigger-wheel-arm64-musl" | |
239 |
|
239 | |||
240 | .runtests: |
|
240 | .runtests: | |
241 | extends: .all |
|
241 | extends: .all | |
242 | stage: tests |
|
242 | stage: tests | |
243 | variables: |
|
243 | variables: | |
244 | SHOW_VERSION_OF: "$PYTHON" |
|
244 | SHOW_VERSION_OF: "$PYTHON" | |
245 | TEST_HGTESTS_ALLOW_NETIO: "0" |
|
245 | TEST_HGTESTS_ALLOW_NETIO: "0" | |
246 | FILTER: "" |
|
246 | FILTER: "" | |
247 | FLAVOR: "" |
|
247 | FLAVOR: "" | |
248 | RUNTEST_ARGS: "" |
|
248 | RUNTEST_ARGS: "" | |
249 | # The runner made a clone as root. |
|
249 | # The runner made a clone as root. | |
250 | # We make a new clone owned by user used to run the step. |
|
250 | # We make a new clone owned by user used to run the step. | |
251 | before_script: |
|
251 | before_script: | |
252 | - echo "python used, $PYTHON" |
|
252 | - echo "python used, $PYTHON" | |
253 | - for tool in $SHOW_VERSION_OF ; do echo '#' version of $tool; $tool --version; done |
|
253 | - for tool in $SHOW_VERSION_OF ; do echo '#' version of $tool; $tool --version; done | |
254 | - rm -rf "${TMP_WORK_DIR}"/mercurial-ci/ # Clean slate if not using containers |
|
254 | - rm -rf "${TMP_WORK_DIR}"/mercurial-ci/ # Clean slate if not using containers | |
255 | - hg clone . "${TMP_WORK_DIR}"/mercurial-ci/ --noupdate --config phases.publish=no |
|
255 | - hg clone . "${TMP_WORK_DIR}"/mercurial-ci/ --noupdate --config phases.publish=no | |
256 | - hg -R "${TMP_WORK_DIR}"/mercurial-ci/ update `hg log --rev '.' --template '{node}'` |
|
256 | - hg -R "${TMP_WORK_DIR}"/mercurial-ci/ update `hg log --rev '.' --template '{node}'` | |
257 | - cd "${TMP_WORK_DIR}"/mercurial-ci/ |
|
257 | - cd "${TMP_WORK_DIR}"/mercurial-ci/ | |
258 | - ls -1 tests/test-check-*.* > "${TMP_WORK_DIR}"/check-tests.txt |
|
258 | - ls -1 tests/test-check-*.* > "${TMP_WORK_DIR}"/check-tests.txt | |
259 | script: |
|
259 | script: | |
260 | - echo "$TEST_HGTESTS_ALLOW_NETIO" |
|
260 | - echo "$TEST_HGTESTS_ALLOW_NETIO" | |
261 | - echo "$RUNTEST_ARGS" |
|
261 | - echo "$RUNTEST_ARGS" | |
262 | - echo "$FILTER" |
|
262 | - echo "$FILTER" | |
263 | - echo "$FLAVOR" |
|
263 | - echo "$FLAVOR" | |
264 | - echo "$WHEEL_TYPE" |
|
264 | - echo "$WHEEL_TYPE" | |
265 | - PORT_START=`expr 19051 + 1009 '*' $CI_CONCURRENT_ID` |
|
265 | - PORT_START=`expr 19051 + 1009 '*' $CI_CONCURRENT_ID` | |
266 | - PORT_ARG="--port $PORT_START" |
|
266 | - PORT_ARG="--port $PORT_START" | |
267 | - echo $PORT_ARG |
|
267 | - echo $PORT_ARG | |
268 | - PLATFORM=`$PYTHON -c 'import sys; print(sys.platform)'` |
|
268 | - PLATFORM=`$PYTHON -c 'import sys; print(sys.platform)'` | |
269 | - echo $PLATFORM |
|
269 | - echo $PLATFORM | |
270 | - WHEEL_ARG="" |
|
270 | - WHEEL_ARG="" | |
271 | - SHARDING_ARGS="" |
|
271 | - SHARDING_ARGS="" | |
272 | - if test -n "$WHEEL_TYPE"; then |
|
272 | - if test -n "$WHEEL_TYPE"; then | |
273 | PY_TAG=`$PYTHON -c 'import sys; v=sys.version_info; t=f"cp{v.major}{v.minor}"; print(f"{t}-{t}")'`; |
|
273 | PY_TAG=`$PYTHON -c 'import sys; v=sys.version_info; t=f"cp{v.major}{v.minor}"; print(f"{t}-{t}")'`; | |
274 | echo "$PY_TAG"; |
|
274 | echo "$PY_TAG"; | |
275 | test -n "PY_TAG"; |
|
275 | test -n "PY_TAG"; | |
276 | WHEEL="`ls -1 $CI_PROJECT_DIR/wheels/$PLATFORM/$WHEEL_TYPE/$PY_TAG/*.whl`"; |
|
276 | WHEEL="`ls -1 $CI_PROJECT_DIR/wheels/$PLATFORM/$WHEEL_TYPE/$PY_TAG/*.whl`"; | |
277 | test -n "$WHEEL"; |
|
277 | test -n "$WHEEL"; | |
278 | echo installing from $WHEEL; |
|
278 | echo installing from $WHEEL; | |
279 | WHEEL_ARG="--hg-wheel $WHEEL"; |
|
279 | WHEEL_ARG="--hg-wheel $WHEEL"; | |
280 | echo disabling flavor as this is currently incompatible with '"--hg-wheel"'; |
|
280 | echo disabling flavor as this is currently incompatible with '"--hg-wheel"'; | |
281 | FLAVOR=""; |
|
281 | FLAVOR=""; | |
282 | else |
|
282 | else | |
283 | echo installing from source; |
|
283 | echo installing from source; | |
284 | fi; |
|
284 | fi; | |
285 | - if [ -n "$CI_NODE_INDEX" ]; then |
|
285 | - if [ -n "$CI_NODE_INDEX" ]; then | |
286 | echo "Running the test in multiple shard - [$CI_NODE_INDEX/$CI_NODE_TOTAL]"; |
|
286 | echo "Running the test in multiple shard - [$CI_NODE_INDEX/$CI_NODE_TOTAL]"; | |
287 | SHARDING_ARGS="--shard-index $CI_NODE_INDEX --shard-total $CI_NODE_TOTAL"; |
|
287 | SHARDING_ARGS="--shard-index $CI_NODE_INDEX --shard-total $CI_NODE_TOTAL"; | |
288 | echo "sharding... $SHARDING_ARGS"; |
|
288 | echo "sharding... $SHARDING_ARGS"; | |
289 | fi |
|
289 | fi | |
290 | - HGTESTS_ALLOW_NETIO="$TEST_HGTESTS_ALLOW_NETIO" |
|
290 | - HGTESTS_ALLOW_NETIO="$TEST_HGTESTS_ALLOW_NETIO" | |
291 | "$PYTHON" tests/run-tests.py |
|
291 | "$PYTHON" tests/run-tests.py | |
292 | --color=always |
|
292 | --color=always | |
293 | $PORT_ARG |
|
293 | $PORT_ARG | |
294 | $WHEEL_ARG |
|
294 | $WHEEL_ARG | |
295 | $FLAVOR |
|
295 | $FLAVOR | |
296 | $SHARDING_ARGS |
|
296 | $SHARDING_ARGS | |
297 | $FILTER |
|
297 | $FILTER | |
298 | $RUNTEST_ARGS; |
|
298 | $RUNTEST_ARGS; | |
299 |
|
299 | |||
300 | checks: |
|
300 | checks: | |
301 | extends: .runtests |
|
301 | extends: .runtests | |
302 | stage: checks |
|
302 | stage: checks | |
303 | variables: |
|
303 | variables: | |
304 | SHOW_VERSION_OF: "$PYTHON black clang-format" |
|
304 | SHOW_VERSION_OF: "$PYTHON black clang-format" | |
305 | RUNTEST_ARGS: "--time" |
|
305 | RUNTEST_ARGS: "--time" | |
306 | FILTER: "--test-list ${TMP_WORK_DIR}/check-tests.txt" |
|
306 | FILTER: "--test-list ${TMP_WORK_DIR}/check-tests.txt" | |
307 | CI_CLEVER_CLOUD_FLAVOR: S |
|
307 | CI_CLEVER_CLOUD_FLAVOR: S | |
308 |
|
308 | |||
309 | rust-cargo-test: |
|
309 | rust-cargo-test: | |
310 | extends: .all |
|
310 | extends: .all | |
311 | stage: checks |
|
311 | stage: checks | |
312 | script: |
|
312 | script: | |
313 | - make rust-tests |
|
313 | - make rust-tests | |
314 | - make cargo-clippy |
|
314 | - make cargo-clippy | |
315 | variables: |
|
315 | variables: | |
316 | CI_CLEVER_CLOUD_FLAVOR: S |
|
316 | CI_CLEVER_CLOUD_FLAVOR: S | |
317 |
|
317 | |||
318 | .runtests-no-check: |
|
318 | .runtests-no-check: | |
319 | extends: .runtests |
|
319 | extends: .runtests | |
320 | variables: |
|
320 | variables: | |
321 | FILTER: "--blacklist ${TMP_WORK_DIR}/check-tests.txt" |
|
321 | FILTER: "--blacklist ${TMP_WORK_DIR}/check-tests.txt" | |
322 | TEST_HGTESTS_ALLOW_NETIO: "1" |
|
322 | TEST_HGTESTS_ALLOW_NETIO: "1" | |
323 |
|
323 | |||
324 | .test-c: |
|
324 | .test-c: | |
325 | extends: .runtests-no-check |
|
325 | extends: .runtests-no-check | |
326 | variables: |
|
326 | variables: | |
327 | FLAVOR: "--no-rust" |
|
327 | FLAVOR: "--no-rust" | |
328 |
|
328 | |||
329 | test-c: |
|
329 | test-c: | |
330 | extends: .test-c |
|
330 | extends: .test-c | |
331 | needs: |
|
331 | needs: | |
332 | - job: build-c-wheel |
|
332 | - job: build-c-wheel | |
333 | parallel: |
|
333 | parallel: | |
334 | matrix: |
|
334 | matrix: | |
335 | - BUILD_PY_ID: "cp311-cp311" |
|
335 | - BUILD_PY_ID: "cp311-cp311" | |
336 | variables: |
|
336 | variables: | |
337 | WHEEL_TYPE: "c" |
|
337 | WHEEL_TYPE: "c" | |
338 |
|
338 | |||
339 | test-pure: |
|
339 | test-pure: | |
340 | extends: .runtests-no-check |
|
340 | extends: .runtests-no-check | |
341 | variables: |
|
341 | variables: | |
342 | FLAVOR: "--pure" |
|
342 | FLAVOR: "--pure" | |
343 |
|
343 | |||
344 | test-rust: |
|
344 | test-rust: | |
345 | extends: .runtests-no-check |
|
345 | extends: .runtests-no-check | |
346 | variables: |
|
346 | variables: | |
347 | HGWITHRUSTEXT: "cpython" |
|
347 | HGWITHRUSTEXT: "cpython" | |
348 | FLAVOR: "--rust" |
|
348 | FLAVOR: "--rust" | |
349 |
|
349 | |||
350 | test-rhg: |
|
350 | test-rhg: | |
351 | extends: .runtests-no-check |
|
351 | extends: .runtests-no-check | |
352 | variables: |
|
352 | variables: | |
353 | HGWITHRUSTEXT: "cpython" |
|
353 | HGWITHRUSTEXT: "cpython" | |
354 | FLAVOR: "--rust --rhg" |
|
354 | FLAVOR: "--rust --rhg" | |
355 |
|
355 | |||
356 | test-chg: |
|
356 | test-chg: | |
357 | extends: .runtests-no-check |
|
357 | extends: .runtests-no-check | |
358 | variables: |
|
358 | variables: | |
359 | FLAVOR: "--chg" |
|
359 | FLAVOR: "--chg" | |
360 |
|
360 | |||
361 |
|
361 | |||
362 | trigger-pycompat: |
|
362 | trigger-pycompat: | |
363 | extends: .trigger |
|
363 | extends: .trigger | |
364 | stage: py-version-compat |
|
364 | stage: py-version-compat | |
365 | rules: |
|
365 | rules: | |
366 | - if: $CI_COMMIT_BRANCH =~ $RE_BRANCH |
|
366 | - if: $CI_COMMIT_BRANCH =~ $RE_BRANCH | |
367 | when: on_success |
|
367 | when: on_success | |
368 | needs: |
|
368 | needs: | |
369 | - trigger-nightly-build |
|
369 | - trigger-nightly-build | |
370 | - if: $CI_COMMIT_BRANCH =~ $RE_TOPIC |
|
370 | - if: $CI_COMMIT_BRANCH =~ $RE_TOPIC | |
371 | when: manual |
|
371 | when: manual | |
372 | allow_failure: true |
|
372 | allow_failure: true | |
373 |
|
373 | |||
374 | .test-c-pycompat: |
|
374 | .test-c-pycompat: | |
375 | extends: .test-c |
|
375 | extends: .test-c | |
376 | stage: py-version-compat |
|
376 | stage: py-version-compat | |
377 | variables: |
|
377 | variables: | |
378 | WHEEL_TYPE: "c" |
|
378 | WHEEL_TYPE: "c" | |
379 |
|
379 | |||
380 | # note: we should probably get a full matrix for flavor Γ py-version, but this |
|
380 | # note: we should probably get a full matrix for flavor Γ py-version, but this | |
381 | # is a simple start to be able to check if we break the lowest supported |
|
381 | # is a simple start to be able to check if we break the lowest supported | |
382 | # version (and 3.12 have been giving us various troubles) |
|
382 | # version (and 3.12 have been giving us various troubles) | |
383 | test-3.8-c: |
|
383 | test-3.8-c: | |
384 | extends: .test-c-pycompat |
|
384 | extends: .test-c-pycompat | |
385 | variables: |
|
385 | variables: | |
386 | PYTHON: python3.8 |
|
386 | PYTHON: python3.8 | |
387 | needs: |
|
387 | needs: | |
388 | - job: trigger-pycompat |
|
388 | - job: trigger-pycompat | |
389 | - job: build-c-wheel |
|
389 | - job: build-c-wheel | |
390 | parallel: |
|
390 | parallel: | |
391 | matrix: |
|
391 | matrix: | |
392 | - BUILD_PY_ID: "cp38-cp38" |
|
392 | - BUILD_PY_ID: "cp38-cp38" | |
393 |
|
393 | |||
394 | test-3.12-c: |
|
394 | test-3.12-c: | |
395 | extends: .test-c-pycompat |
|
395 | extends: .test-c-pycompat | |
396 | variables: |
|
396 | variables: | |
397 | PYTHON: python3.12 |
|
397 | PYTHON: python3.12 | |
398 | needs: |
|
398 | needs: | |
399 | - job: trigger-pycompat |
|
399 | - job: trigger-pycompat | |
400 | - job: build-c-wheel |
|
400 | - job: build-c-wheel | |
401 | parallel: |
|
401 | parallel: | |
402 | matrix: |
|
402 | matrix: | |
403 | - BUILD_PY_ID: "cp312-cp312" |
|
403 | - BUILD_PY_ID: "cp312-cp312" | |
404 |
|
404 | |||
405 | test-3.12-rust: |
|
405 | test-3.12-rust: | |
406 | extends: test-rust |
|
406 | extends: test-rust | |
407 | stage: py-version-compat |
|
407 | stage: py-version-compat | |
408 | needs: |
|
408 | needs: | |
409 | - trigger-pycompat |
|
409 | - trigger-pycompat | |
410 | variables: |
|
410 | variables: | |
411 | PYTHON: python3.12 |
|
411 | PYTHON: python3.12 | |
412 |
|
412 | |||
413 | test-3.13-c: |
|
413 | test-3.13-c: | |
414 | extends: .test-c-pycompat |
|
414 | extends: .test-c-pycompat | |
415 | variables: |
|
415 | variables: | |
416 | PYTHON: python3.13 |
|
416 | PYTHON: python3.13 | |
417 | needs: |
|
417 | needs: | |
418 | - job: trigger-pycompat |
|
418 | - job: trigger-pycompat | |
419 | - job: build-c-wheel |
|
419 | - job: build-c-wheel | |
420 | parallel: |
|
420 | parallel: | |
421 | matrix: |
|
421 | matrix: | |
422 | - BUILD_PY_ID: "cp313-cp313" |
|
422 | - BUILD_PY_ID: "cp313-cp313" | |
423 |
|
423 | |||
424 | test-3.13-rust: |
|
424 | test-3.13-rust: | |
425 | extends: test-rust |
|
425 | extends: test-rust | |
426 | stage: py-version-compat |
|
426 | stage: py-version-compat | |
427 | needs: |
|
427 | needs: | |
428 | - trigger-pycompat |
|
428 | - trigger-pycompat | |
429 | variables: |
|
429 | variables: | |
430 | PYTHON: python3.13 |
|
430 | PYTHON: python3.13 | |
431 |
|
431 | |||
432 | check-pytype: |
|
432 | check-pytype: | |
433 | extends: test-rust |
|
433 | extends: test-rust | |
434 | stage: checks |
|
434 | stage: checks | |
435 | before_script: |
|
435 | before_script: | |
436 | - 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" |
|
436 | - 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" | |
437 | - echo "PATH, $PATH" |
|
437 | - echo "PATH, $PATH" | |
438 | - hg clone . "${TMP_WORK_DIR}"/mercurial-ci/ --noupdate --config phases.publish=no |
|
438 | - hg clone . "${TMP_WORK_DIR}"/mercurial-ci/ --noupdate --config phases.publish=no | |
439 | - hg -R "${TMP_WORK_DIR}"/mercurial-ci/ update `hg log --rev '.' --template '{node}'` |
|
439 | - hg -R "${TMP_WORK_DIR}"/mercurial-ci/ update `hg log --rev '.' --template '{node}'` | |
440 | - cd "${TMP_WORK_DIR}"/mercurial-ci/ |
|
440 | - cd "${TMP_WORK_DIR}"/mercurial-ci/ | |
441 | - make local PYTHON=$PYTHON |
|
441 | - make local PYTHON=$PYTHON | |
442 | - ./contrib/setup-pytype.sh |
|
442 | - ./contrib/setup-pytype.sh | |
443 | script: |
|
443 | script: | |
444 | - echo "Entering script section" |
|
444 | - echo "Entering script section" | |
445 | - sh contrib/check-pytype.sh |
|
445 | - bash contrib/check-pytype.sh | |
446 |
|
446 | |||
447 | # `sh.exe --login` sets a couple of extra environment variables that are defined |
|
447 | # `sh.exe --login` sets a couple of extra environment variables that are defined | |
448 | # in the MinGW shell, but switches CWD to /home/$username. The previous value |
|
448 | # in the MinGW shell, but switches CWD to /home/$username. The previous value | |
449 | # is stored in OLDPWD. Of the added variables, MSYSTEM is crucial to running |
|
449 | # is stored in OLDPWD. Of the added variables, MSYSTEM is crucial to running | |
450 | # run-tests.py- it is needed to make run-tests.py generate a `python3` script |
|
450 | # run-tests.py- it is needed to make run-tests.py generate a `python3` script | |
451 | # that satisfies the various shebang lines and delegates to `py -3`. |
|
451 | # that satisfies the various shebang lines and delegates to `py -3`. | |
452 |
|
452 | |||
453 | .windows: |
|
453 | .windows: | |
454 | extends: .all |
|
454 | extends: .all | |
455 | when: manual # we don't have any Windows runners anymore at the moment |
|
455 | when: manual # we don't have any Windows runners anymore at the moment | |
456 | tags: |
|
456 | tags: | |
457 | - windows |
|
457 | - windows | |
458 | before_script: |
|
458 | before_script: | |
459 | - C:/hgdev/MinGW/msys/1.0/bin/sh.exe --login -c 'cd "$OLDPWD" && ls -1 tests/test-check-*.* > "${TMP_WORK_DIR}"/check-tests.txt' |
|
459 | - C:/hgdev/MinGW/msys/1.0/bin/sh.exe --login -c 'cd "$OLDPWD" && ls -1 tests/test-check-*.* > "${TMP_WORK_DIR}"/check-tests.txt' | |
460 | # TODO: find/install cvs, bzr, perforce, gpg, sqlite3 |
|
460 | # TODO: find/install cvs, bzr, perforce, gpg, sqlite3 | |
461 | variables: |
|
461 | variables: | |
462 | PYTHON: C:/hgdev/venvs/python39-x64/Scripts/python.exe |
|
462 | PYTHON: C:/hgdev/venvs/python39-x64/Scripts/python.exe | |
463 |
|
463 | |||
464 | # a dummy job that only serve to trigger the wider windows build |
|
464 | # a dummy job that only serve to trigger the wider windows build | |
465 | trigger-wheel-windows: |
|
465 | trigger-wheel-windows: | |
466 | extends: .trigger |
|
466 | extends: .trigger | |
467 | stage: build |
|
467 | stage: build | |
468 | rules: |
|
468 | rules: | |
469 | - if: $CI_COMMIT_BRANCH =~ $RE_BRANCH |
|
469 | - if: $CI_COMMIT_BRANCH =~ $RE_BRANCH | |
470 | when: never |
|
470 | when: never | |
471 | - if: $CI_COMMIT_BRANCH =~ $RE_TOPIC |
|
471 | - if: $CI_COMMIT_BRANCH =~ $RE_TOPIC | |
472 | when: manual |
|
472 | when: manual | |
473 | allow_failure: true |
|
473 | allow_failure: true | |
474 |
|
474 | |||
475 | build-c-wheel-windows: |
|
475 | build-c-wheel-windows: | |
476 | extends: .windows |
|
476 | extends: .windows | |
477 | stage: build |
|
477 | stage: build | |
478 | # wait for someone to click on "trigger-wheel-windows" |
|
478 | # wait for someone to click on "trigger-wheel-windows" | |
479 | when: on_success |
|
479 | when: on_success | |
480 | needs: |
|
480 | needs: | |
481 | rules: |
|
481 | rules: | |
482 | - if: $CI_COMMIT_BRANCH =~ $RE_BRANCH |
|
482 | - if: $CI_COMMIT_BRANCH =~ $RE_BRANCH | |
483 | needs: |
|
483 | needs: | |
484 | - trigger-nightly-build |
|
484 | - trigger-nightly-build | |
485 | - if: $CI_COMMIT_BRANCH =~ $RE_TOPIC |
|
485 | - if: $CI_COMMIT_BRANCH =~ $RE_TOPIC | |
486 | needs: |
|
486 | needs: | |
487 | - "trigger-wheel-windows" |
|
487 | - "trigger-wheel-windows" | |
488 | variables: |
|
488 | variables: | |
489 | MERCURIAL_SETUP_FORCE_TRANSLATIONS: "1" |
|
489 | MERCURIAL_SETUP_FORCE_TRANSLATIONS: "1" | |
490 | script: |
|
490 | script: | |
491 | - echo "Entering script section" |
|
491 | - echo "Entering script section" | |
492 | - echo "python used, $Env:PYTHON" |
|
492 | - echo "python used, $Env:PYTHON" | |
493 | - Invoke-Expression "$Env:PYTHON -V" |
|
493 | - Invoke-Expression "$Env:PYTHON -V" | |
494 | - echo "$Env:RUNTEST_ARGS" |
|
494 | - echo "$Env:RUNTEST_ARGS" | |
495 | - echo "$Env:TMP" |
|
495 | - echo "$Env:TMP" | |
496 | - echo "$Env:TEMP" |
|
496 | - echo "$Env:TEMP" | |
497 | - "C:/hgdev/venvs/python39-x64/Scripts/python.exe -m cibuildwheel --output-dir wheels/win32" |
|
497 | - "C:/hgdev/venvs/python39-x64/Scripts/python.exe -m cibuildwheel --output-dir wheels/win32" | |
498 | artifacts: |
|
498 | artifacts: | |
499 | paths: |
|
499 | paths: | |
500 | - wheels |
|
500 | - wheels | |
501 | expire_in: 1 week |
|
501 | expire_in: 1 week | |
502 | parallel: |
|
502 | parallel: | |
503 | matrix: |
|
503 | matrix: | |
504 | # "cp39" is first as it unlock the tests |
|
504 | # "cp39" is first as it unlock the tests | |
505 | - CIBW_BUILD: |
|
505 | - CIBW_BUILD: | |
506 | - "cp39-*" |
|
506 | - "cp39-*" | |
507 | - "cp38-*" |
|
507 | - "cp38-*" | |
508 | - "cp310-*" |
|
508 | - "cp310-*" | |
509 | - "cp311-*" |
|
509 | - "cp311-*" | |
510 | - "cp312-*" |
|
510 | - "cp312-*" | |
511 | - "cp313-*" |
|
511 | - "cp313-*" | |
512 | CIBW_ARCHS: |
|
512 | CIBW_ARCHS: | |
513 | - "AMD64" |
|
513 | - "AMD64" | |
514 | - "x86" |
|
514 | - "x86" | |
515 | - CIBW_BUILD: |
|
515 | - CIBW_BUILD: | |
516 | - "cp311-*" |
|
516 | - "cp311-*" | |
517 | - "cp312-*" |
|
517 | - "cp312-*" | |
518 | - "cp313-*" |
|
518 | - "cp313-*" | |
519 | CIBW_ARCHS: |
|
519 | CIBW_ARCHS: | |
520 | - "ARM64" |
|
520 | - "ARM64" | |
521 |
|
521 | |||
522 |
|
522 | |||
523 | .windows-runtests: |
|
523 | .windows-runtests: | |
524 | extends: .windows |
|
524 | extends: .windows | |
525 | stage: platform-compat |
|
525 | stage: platform-compat | |
526 | # the UX for manual parallel jobs is quite awful, and the job que depends |
|
526 | # the UX for manual parallel jobs is quite awful, and the job que depends | |
527 | # upon are manual anyway, so we can make this start automatically once the |
|
527 | # upon are manual anyway, so we can make this start automatically once the | |
528 | # associated wheel is ready. |
|
528 | # associated wheel is ready. | |
529 | when: on_success |
|
529 | when: on_success | |
530 | parallel: 20 |
|
530 | parallel: 20 | |
531 | script: |
|
531 | script: | |
532 | - echo "Entering script section" |
|
532 | - echo "Entering script section" | |
533 | - echo "python used, $Env:PYTHON" |
|
533 | - echo "python used, $Env:PYTHON" | |
534 | - Invoke-Expression "$Env:PYTHON -V" |
|
534 | - Invoke-Expression "$Env:PYTHON -V" | |
535 | - echo "$Env:HGTESTS_ALLOW_NETIO" |
|
535 | - echo "$Env:HGTESTS_ALLOW_NETIO" | |
536 | - echo "$Env:WHEEL_ARG" |
|
536 | - echo "$Env:WHEEL_ARG" | |
537 | - echo "$Env:FLAVOR" |
|
537 | - echo "$Env:FLAVOR" | |
538 | - echo "$Env:FILTER" |
|
538 | - echo "$Env:FILTER" | |
539 | - echo "$Env:RUNTEST_ARGS" |
|
539 | - echo "$Env:RUNTEST_ARGS" | |
540 | - echo "$Env:TMP" |
|
540 | - echo "$Env:TMP" | |
541 | - echo "$Env:TEMP" |
|
541 | - echo "$Env:TEMP" | |
542 | # This test is hanging the worker and not that important, so lets skip |
|
542 | # This test is hanging the worker and not that important, so lets skip | |
543 | # it for now |
|
543 | # it for now | |
544 | - C:/hgdev/MinGW/msys/1.0/bin/sh.exe -c 'cd "$OLDPWD" && echo tests/test-clonebundles-autogen.t > $TMP_WORK_DIR/windows-skip.txt' |
|
544 | - C:/hgdev/MinGW/msys/1.0/bin/sh.exe -c 'cd "$OLDPWD" && echo tests/test-clonebundles-autogen.t > $TMP_WORK_DIR/windows-skip.txt' | |
545 |
|
545 | |||
546 | - C:/hgdev/MinGW/msys/1.0/bin/sh.exe |
|
546 | - C:/hgdev/MinGW/msys/1.0/bin/sh.exe | |
547 | --login -c 'cd "$OLDPWD" |
|
547 | --login -c 'cd "$OLDPWD" | |
548 | && HGTESTS_ALLOW_NETIO="$TEST_HGTESTS_ALLOW_NETIO" |
|
548 | && HGTESTS_ALLOW_NETIO="$TEST_HGTESTS_ALLOW_NETIO" | |
549 | $PYTHON tests/run-tests.py |
|
549 | $PYTHON tests/run-tests.py | |
550 | --color=always |
|
550 | --color=always | |
551 | $WHEEL_ARG |
|
551 | $WHEEL_ARG | |
552 | $FLAVOR |
|
552 | $FLAVOR | |
553 | --port `expr 19051 + 1009 "*" $CI_CONCURRENT_ID` |
|
553 | --port `expr 19051 + 1009 "*" $CI_CONCURRENT_ID` | |
554 | --shard-index $CI_NODE_INDEX --shard-total $CI_NODE_TOTAL |
|
554 | --shard-index $CI_NODE_INDEX --shard-total $CI_NODE_TOTAL | |
555 | $FILTER |
|
555 | $FILTER | |
556 | $RUNTEST_ARGS; |
|
556 | $RUNTEST_ARGS; | |
557 | ' |
|
557 | ' | |
558 | variables: |
|
558 | variables: | |
559 | WHEEL_ARG: "" |
|
559 | WHEEL_ARG: "" | |
560 | RUNTEST_ARGS: "" |
|
560 | RUNTEST_ARGS: "" | |
561 | FLAVOR: "" |
|
561 | FLAVOR: "" | |
562 | FILTER: "--blacklist ${TMP_WORK_DIR}/check-tests.txt --blacklist ${TMP_WORK_DIR}/windows-skip.txt" |
|
562 | FILTER: "--blacklist ${TMP_WORK_DIR}/check-tests.txt --blacklist ${TMP_WORK_DIR}/windows-skip.txt" | |
563 |
|
563 | |||
564 | windows: |
|
564 | windows: | |
565 | extends: .windows-runtests |
|
565 | extends: .windows-runtests | |
566 | variables: |
|
566 | variables: | |
567 | RUNTEST_ARGS: "" |
|
567 | RUNTEST_ARGS: "" | |
568 | WHEEL_ARG: "--hg-wheel wheels/win32/mercurial-*-cp39-cp39-win_amd64.whl" |
|
568 | WHEEL_ARG: "--hg-wheel wheels/win32/mercurial-*-cp39-cp39-win_amd64.whl" | |
569 | needs: |
|
569 | needs: | |
570 | - job: build-c-wheel-windows |
|
570 | - job: build-c-wheel-windows | |
571 | parallel: |
|
571 | parallel: | |
572 | matrix: |
|
572 | matrix: | |
573 | - CIBW_BUILD: "cp39-*" |
|
573 | - CIBW_BUILD: "cp39-*" | |
574 | CIBW_ARCHS: "AMD64" |
|
574 | CIBW_ARCHS: "AMD64" | |
575 |
|
575 | |||
576 | windows-pyox: |
|
576 | windows-pyox: | |
577 | extends: .windows-runtests |
|
577 | extends: .windows-runtests | |
578 | when: manual # pyoxidizer builds seem broken with --no-use-pep517 |
|
578 | when: manual # pyoxidizer builds seem broken with --no-use-pep517 | |
579 | variables: |
|
579 | variables: | |
580 | FLAVOR: "--pyoxidized" |
|
580 | FLAVOR: "--pyoxidized" | |
581 |
|
581 | |||
582 | macos: |
|
582 | macos: | |
583 | extends: .test-c |
|
583 | extends: .test-c | |
584 | stage: platform-compat |
|
584 | stage: platform-compat | |
585 | # run the test in multiple shard to help spread the load between concurrent |
|
585 | # run the test in multiple shard to help spread the load between concurrent | |
586 | # MR as the macos runner is a shell runner there is not startup overhead |
|
586 | # MR as the macos runner is a shell runner there is not startup overhead | |
587 | # for tests. |
|
587 | # for tests. | |
588 | parallel: 10 |
|
588 | parallel: 10 | |
589 | tags: |
|
589 | tags: | |
590 | - macos |
|
590 | - macos | |
591 | variables: |
|
591 | variables: | |
592 | WHEEL_TYPE: "c" |
|
592 | WHEEL_TYPE: "c" | |
593 | needs: |
|
593 | needs: | |
594 | - build-c-wheel-macos |
|
594 | - build-c-wheel-macos | |
595 |
|
595 | |||
596 | # We could use CIBW_BUILD="cp310-*" to only build the Python 3.10 wheel for now as |
|
596 | # We could use CIBW_BUILD="cp310-*" to only build the Python 3.10 wheel for now as | |
597 | # this is the only one we need to test. However testing that build work on all |
|
597 | # this is the only one we need to test. However testing that build work on all | |
598 | # version is useful and match what we do with Linux. |
|
598 | # version is useful and match what we do with Linux. | |
599 | # |
|
599 | # | |
600 | # CIBW_SKIP is set globally at the start of the file. See comment there. |
|
600 | # CIBW_SKIP is set globally at the start of the file. See comment there. | |
601 | # |
|
601 | # | |
602 | # The weird directory structure match the one we use for Linux to deal with the |
|
602 | # The weird directory structure match the one we use for Linux to deal with the | |
603 | # multiple jobs. (all this might be unnecessary) |
|
603 | # multiple jobs. (all this might be unnecessary) | |
604 | build-c-wheel-macos: |
|
604 | build-c-wheel-macos: | |
605 | rules: |
|
605 | rules: | |
606 | - if: $CI_COMMIT_BRANCH =~ $RE_BRANCH |
|
606 | - if: $CI_COMMIT_BRANCH =~ $RE_BRANCH | |
607 | needs: |
|
607 | needs: | |
608 | - trigger-nightly-build |
|
608 | - trigger-nightly-build | |
609 | - if: $CI_COMMIT_BRANCH =~ $RE_TOPIC |
|
609 | - if: $CI_COMMIT_BRANCH =~ $RE_TOPIC | |
610 | when: manual # avoid overloading the CI by default |
|
610 | when: manual # avoid overloading the CI by default | |
611 | allow_failure: true |
|
611 | allow_failure: true | |
612 | stage: build |
|
612 | stage: build | |
613 | tags: |
|
613 | tags: | |
614 | - macos |
|
614 | - macos | |
615 | variables: |
|
615 | variables: | |
616 | MERCURIAL_SETUP_FORCE_TRANSLATIONS: "1" |
|
616 | MERCURIAL_SETUP_FORCE_TRANSLATIONS: "1" | |
617 | script: |
|
617 | script: | |
618 | - PLATFORM=`$PYTHON -c 'import sys; print(sys.platform)'` |
|
618 | - PLATFORM=`$PYTHON -c 'import sys; print(sys.platform)'` | |
619 | - rm -rf tmp-wheels |
|
619 | - rm -rf tmp-wheels | |
620 | - cibuildwheel --output-dir tmp-wheels/ |
|
620 | - cibuildwheel --output-dir tmp-wheels/ | |
621 | - for py_version in cp38-cp38 cp39-cp39 cp310-cp310 cp311-cp311 cp312-cp312 cp313-cp313; do |
|
621 | - for py_version in cp38-cp38 cp39-cp39 cp310-cp310 cp311-cp311 cp312-cp312 cp313-cp313; do | |
622 | mkdir -p wheels/$PLATFORM/c/$py_version/; |
|
622 | mkdir -p wheels/$PLATFORM/c/$py_version/; | |
623 | mv tmp-wheels/*$py_version*.whl wheels/$PLATFORM/c/$py_version/; |
|
623 | mv tmp-wheels/*$py_version*.whl wheels/$PLATFORM/c/$py_version/; | |
624 | done |
|
624 | done | |
625 | - rm -rf tmp-wheels |
|
625 | - rm -rf tmp-wheels | |
626 | artifacts: |
|
626 | artifacts: | |
627 | paths: |
|
627 | paths: | |
628 | - wheels |
|
628 | - wheels | |
629 | expire_in: 1 week |
|
629 | expire_in: 1 week | |
630 |
|
630 | |||
631 |
|
631 | |||
632 | .nightly_build_step: |
|
632 | .nightly_build_step: | |
633 | extends: .all |
|
633 | extends: .all | |
634 | stage: upload |
|
634 | stage: upload | |
635 | rules: |
|
635 | rules: | |
636 | - if: '$CI_COMMIT_BRANCH =~ $RE_BRANCH' |
|
636 | - if: '$CI_COMMIT_BRANCH =~ $RE_BRANCH' | |
637 | # note that at the time of writing this, this job depends on multiple |
|
637 | # note that at the time of writing this, this job depends on multiple | |
638 | # manual one. So it will not run by default, but will automatically run |
|
638 | # manual one. So it will not run by default, but will automatically run | |
639 | # if the manual jobs are triggered. |
|
639 | # if the manual jobs are triggered. | |
640 | # |
|
640 | # | |
641 | # Also beware that "on_success" will ignore failure of manual test we |
|
641 | # Also beware that "on_success" will ignore failure of manual test we | |
642 | # directly depends on. This currently relevant for the "test-3.x-c" |
|
642 | # directly depends on. This currently relevant for the "test-3.x-c" | |
643 | # tests. |
|
643 | # tests. | |
644 | when: on_success |
|
644 | when: on_success | |
645 | - if: '$CI_COMMIT_BRANCH =~ $RE_TOPIC' |
|
645 | - if: '$CI_COMMIT_BRANCH =~ $RE_TOPIC' | |
646 | when: never |
|
646 | when: never | |
647 |
|
647 | |||
648 | # a dummy job that gather greatly parallel object into one. |
|
648 | # a dummy job that gather greatly parallel object into one. | |
649 | # |
|
649 | # | |
650 | # It exists because gitlab-ci has a "50 jobs" limit on "needs" entries. |
|
650 | # It exists because gitlab-ci has a "50 jobs" limit on "needs" entries. | |
651 | # (yes, this is sad) |
|
651 | # (yes, this is sad) | |
652 | # |
|
652 | # | |
653 | .sink: |
|
653 | .sink: | |
654 | extends: |
|
654 | extends: | |
655 | - .nightly_build_step |
|
655 | - .nightly_build_step | |
656 | - .dummy |
|
656 | - .dummy | |
657 |
|
657 | |||
658 | test-result-linux: |
|
658 | test-result-linux: | |
659 | extends: .sink |
|
659 | extends: .sink | |
660 | needs: |
|
660 | needs: | |
661 | - test-c |
|
661 | - test-c | |
662 | - test-3.8-c |
|
662 | - test-3.8-c | |
663 | - test-3.12-c |
|
663 | - test-3.12-c | |
664 | - test-3.13-c |
|
664 | - test-3.13-c | |
665 |
|
665 | |||
666 | test-result-macos: |
|
666 | test-result-macos: | |
667 | extends: .sink |
|
667 | extends: .sink | |
668 | needs: |
|
668 | needs: | |
669 | - macos |
|
669 | - macos | |
670 |
|
670 | |||
671 | test-result-windows: |
|
671 | test-result-windows: | |
672 | extends: .sink |
|
672 | extends: .sink | |
673 | needs: |
|
673 | needs: | |
674 | - windows |
|
674 | - windows | |
675 |
|
675 | |||
676 | wheel-result-linux: |
|
676 | wheel-result-linux: | |
677 | extends: .sink |
|
677 | extends: .sink | |
678 | needs: |
|
678 | needs: | |
679 | - build-c-wheel |
|
679 | - build-c-wheel | |
680 | - build-c-wheel-musl |
|
680 | - build-c-wheel-musl | |
681 | - build-c-wheel-i686 |
|
681 | - build-c-wheel-i686 | |
682 | - build-c-wheel-i686-musl |
|
682 | - build-c-wheel-i686-musl | |
683 | - build-c-wheel-arm64 |
|
683 | - build-c-wheel-arm64 | |
684 | - build-c-wheel-arm64-musl |
|
684 | - build-c-wheel-arm64-musl | |
685 | artifacts: |
|
685 | artifacts: | |
686 | paths: |
|
686 | paths: | |
687 | - wheels |
|
687 | - wheels | |
688 | expire_in: 1 week |
|
688 | expire_in: 1 week | |
689 |
|
689 | |||
690 | wheel-result-windows: |
|
690 | wheel-result-windows: | |
691 | extends: .sink |
|
691 | extends: .sink | |
692 | needs: |
|
692 | needs: | |
693 | - build-c-wheel-windows |
|
693 | - build-c-wheel-windows | |
694 | artifacts: |
|
694 | artifacts: | |
695 | paths: |
|
695 | paths: | |
696 | - wheels |
|
696 | - wheels | |
697 | expire_in: 1 week |
|
697 | expire_in: 1 week | |
698 |
|
698 | |||
699 | # Upload nightly build wheel on the heptapod registry on test success |
|
699 | # Upload nightly build wheel on the heptapod registry on test success | |
700 | # |
|
700 | # | |
701 | # At the time this task is added, since the mac wheels are built on shell |
|
701 | # At the time this task is added, since the mac wheels are built on shell | |
702 | # runner, those nightly are not be considered fully secured. |
|
702 | # runner, those nightly are not be considered fully secured. | |
703 | # |
|
703 | # | |
704 | # In addition, since any job can upload package, pretty much anyone with CI |
|
704 | # In addition, since any job can upload package, pretty much anyone with CI | |
705 | # access can upload anything pretending to be any version. To fix it we would |
|
705 | # access can upload anything pretending to be any version. To fix it we would | |
706 | # have to prevent the CI token to upload to the registry and have dedicated |
|
706 | # have to prevent the CI token to upload to the registry and have dedicated | |
707 | # credential accessible only from protected branches. |
|
707 | # credential accessible only from protected branches. | |
708 | upload-wheel-nightly: |
|
708 | upload-wheel-nightly: | |
709 | extends: .nightly_build_step |
|
709 | extends: .nightly_build_step | |
710 | image: "registry.heptapod.net/mercurial/ci-images/twine:v3.0" |
|
710 | image: "registry.heptapod.net/mercurial/ci-images/twine:v3.0" | |
711 | # because we don't want to upload only half of a wheel |
|
711 | # because we don't want to upload only half of a wheel | |
712 | interruptible: false |
|
712 | interruptible: false | |
713 | needs: |
|
713 | needs: | |
714 | - wheel-result-linux |
|
714 | - wheel-result-linux | |
715 | - wheel-result-windows |
|
715 | - wheel-result-windows | |
716 | - build-c-wheel-macos |
|
716 | - build-c-wheel-macos | |
717 | - test-result-linux |
|
717 | - test-result-linux | |
718 | - test-result-macos |
|
718 | - test-result-macos | |
719 | - test-result-windows |
|
719 | - test-result-windows | |
720 | # It would be nice to be able to restrict that a bit to protected branch only |
|
720 | # It would be nice to be able to restrict that a bit to protected branch only | |
721 | variables: |
|
721 | variables: | |
722 | TWINE_USERNAME: gitlab-ci-token |
|
722 | TWINE_USERNAME: gitlab-ci-token | |
723 | TWINE_PASSWORD: $CI_JOB_TOKEN |
|
723 | TWINE_PASSWORD: $CI_JOB_TOKEN | |
724 | script: |
|
724 | script: | |
725 | - twine |
|
725 | - twine | |
726 | upload |
|
726 | upload | |
727 | --verbose |
|
727 | --verbose | |
728 | --repository-url ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi |
|
728 | --repository-url ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi | |
729 | wheels/*/*/*/*.whl |
|
729 | wheels/*/*/*/*.whl | |
730 | wheels/*/*.whl |
|
730 | wheels/*/*.whl |
General Comments 0
You need to be logged in to leave comments.
Login now