Show More
@@ -1,165 +1,169 | |||||
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 | - tests |
|
23 | - tests | |
24 |
|
24 | |||
25 | image: registry.heptapod.net/mercurial/ci-images/mercurial-core:$HG_CI_IMAGE_TAG |
|
25 | image: registry.heptapod.net/mercurial/ci-images/mercurial-core@sha256:16720f3e2ba29408f816b87407841d77a01ea6e9fe29894181cea6513cc8bfec | |
26 |
|
26 | |||
27 | variables: |
|
27 | variables: | |
28 | PYTHON: python |
|
28 | PYTHON: python | |
29 | TEST_HGMODULEPOLICY: "allow" |
|
29 | TEST_HGMODULEPOLICY: "allow" | |
30 | HG_CI_IMAGE_TAG: "v1.0" |
|
30 | HG_CI_IMAGE_TAG: "v1.0" | |
31 | TEST_HGTESTS_ALLOW_NETIO: "0" |
|
31 | TEST_HGTESTS_ALLOW_NETIO: "0" | |
32 |
|
32 | |||
33 | .all_template: &all |
|
33 | .all_template: &all | |
34 | when: on_success |
|
34 | when: on_success | |
35 |
|
35 | |||
36 | .runtests_template: &runtests |
|
36 | .runtests_template: &runtests | |
37 | <<: *all |
|
37 | <<: *all | |
38 | stage: tests |
|
38 | stage: tests | |
39 | # The runner made a clone as root. |
|
39 | # The runner made a clone as root. | |
40 | # We make a new clone owned by user used to run the step. |
|
40 | # We make a new clone owned by user used to run the step. | |
41 | before_script: |
|
41 | before_script: | |
|
42 | - whoami | |||
|
43 | - pyenv shell 3.7.17 | |||
42 | - hg clone . /tmp/mercurial-ci/ --noupdate --config phases.publish=no |
|
44 | - hg clone . /tmp/mercurial-ci/ --noupdate --config phases.publish=no | |
43 | - hg -R /tmp/mercurial-ci/ update `hg log --rev '.' --template '{node}'` |
|
45 | - hg -R /tmp/mercurial-ci/ update `hg log --rev '.' --template '{node}'` | |
44 | - cd /tmp/mercurial-ci/ |
|
46 | - cd /tmp/mercurial-ci/ | |
45 | - ls -1 tests/test-check-*.* > /tmp/check-tests.txt |
|
47 | - ls -1 tests/test-check-*.* > /tmp/check-tests.txt | |
46 | - black --version |
|
48 | - black --version | |
47 | - clang-format --version |
|
49 | - clang-format --version | |
48 | script: |
|
50 | script: | |
49 | - echo "python used, $PYTHON" |
|
51 | - echo "python used, $PYTHON" | |
50 | - $PYTHON --version |
|
52 | - $PYTHON --version | |
51 | - echo "$RUNTEST_ARGS" |
|
53 | - echo "$RUNTEST_ARGS" | |
52 | - HGTESTS_ALLOW_NETIO="$TEST_HGTESTS_ALLOW_NETIO" HGMODULEPOLICY="$TEST_HGMODULEPOLICY" "$PYTHON" tests/run-tests.py --color=always $RUNTEST_ARGS |
|
54 | - HGTESTS_ALLOW_NETIO="$TEST_HGTESTS_ALLOW_NETIO" HGMODULEPOLICY="$TEST_HGMODULEPOLICY" "$PYTHON" tests/run-tests.py --color=always $RUNTEST_ARGS | |
53 |
|
55 | |||
54 | checks: |
|
56 | checks: | |
55 | <<: *runtests |
|
57 | <<: *runtests | |
56 | variables: |
|
58 | variables: | |
57 | RUNTEST_ARGS: "--time --test-list /tmp/check-tests.txt" |
|
59 | RUNTEST_ARGS: "--time --test-list /tmp/check-tests.txt" | |
58 |
PYTHON: python |
|
60 | PYTHON: python | |
59 | CI_CLEVER_CLOUD_FLAVOR: S |
|
61 | CI_CLEVER_CLOUD_FLAVOR: S | |
60 |
|
62 | |||
61 | rust-cargo-test: |
|
63 | rust-cargo-test: | |
62 | <<: *all |
|
64 | <<: *all | |
63 | stage: tests |
|
65 | stage: tests | |
64 | script: |
|
66 | script: | |
65 | - echo "python used, $PYTHON" |
|
67 | - echo "python used, $PYTHON" | |
|
68 | - $PYTHON --version | |||
66 | - make rust-tests |
|
69 | - make rust-tests | |
67 | - make cargo-clippy |
|
70 | - make cargo-clippy | |
68 | variables: |
|
71 | variables: | |
69 |
PYTHON: python |
|
72 | PYTHON: python | |
70 | CI_CLEVER_CLOUD_FLAVOR: S |
|
73 | CI_CLEVER_CLOUD_FLAVOR: S | |
71 |
|
74 | |||
72 | test-c: |
|
75 | test-c: | |
73 | <<: *runtests |
|
76 | <<: *runtests | |
74 | variables: |
|
77 | variables: | |
75 | RUNTEST_ARGS: " --no-rust --blacklist /tmp/check-tests.txt" |
|
78 | RUNTEST_ARGS: " --no-rust --blacklist /tmp/check-tests.txt" | |
76 |
PYTHON: python |
|
79 | PYTHON: python | |
77 | TEST_HGMODULEPOLICY: "c" |
|
80 | TEST_HGMODULEPOLICY: "c" | |
78 | TEST_HGTESTS_ALLOW_NETIO: "1" |
|
81 | TEST_HGTESTS_ALLOW_NETIO: "1" | |
79 |
|
82 | |||
80 | test-pure: |
|
83 | test-pure: | |
81 | <<: *runtests |
|
84 | <<: *runtests | |
82 | variables: |
|
85 | variables: | |
83 | RUNTEST_ARGS: "--pure --blacklist /tmp/check-tests.txt" |
|
86 | RUNTEST_ARGS: "--pure --blacklist /tmp/check-tests.txt" | |
84 |
PYTHON: python |
|
87 | PYTHON: python | |
85 | TEST_HGMODULEPOLICY: "py" |
|
88 | TEST_HGMODULEPOLICY: "py" | |
86 |
|
89 | |||
87 | test-rust: |
|
90 | test-rust: | |
88 | <<: *runtests |
|
91 | <<: *runtests | |
89 | variables: |
|
92 | variables: | |
90 | HGWITHRUSTEXT: cpython |
|
93 | HGWITHRUSTEXT: cpython | |
91 | RUNTEST_ARGS: "--rust --blacklist /tmp/check-tests.txt" |
|
94 | RUNTEST_ARGS: "--rust --blacklist /tmp/check-tests.txt" | |
92 |
PYTHON: python |
|
95 | PYTHON: python | |
93 | TEST_HGMODULEPOLICY: "rust+c" |
|
96 | TEST_HGMODULEPOLICY: "rust+c" | |
94 |
|
97 | |||
95 | test-rhg: |
|
98 | test-rhg: | |
96 | <<: *runtests |
|
99 | <<: *runtests | |
97 | variables: |
|
100 | variables: | |
98 | HGWITHRUSTEXT: cpython |
|
101 | HGWITHRUSTEXT: cpython | |
99 | RUNTEST_ARGS: "--rust --rhg --blacklist /tmp/check-tests.txt" |
|
102 | RUNTEST_ARGS: "--rust --rhg --blacklist /tmp/check-tests.txt" | |
100 |
PYTHON: python |
|
103 | PYTHON: python | |
101 | TEST_HGMODULEPOLICY: "rust+c" |
|
104 | TEST_HGMODULEPOLICY: "rust+c" | |
102 |
|
105 | |||
103 | test-chg: |
|
106 | test-chg: | |
104 | <<: *runtests |
|
107 | <<: *runtests | |
105 | variables: |
|
108 | variables: | |
106 |
PYTHON: python |
|
109 | PYTHON: python | |
107 | RUNTEST_ARGS: "--blacklist /tmp/check-tests.txt --chg" |
|
110 | RUNTEST_ARGS: "--blacklist /tmp/check-tests.txt --chg" | |
108 | TEST_HGMODULEPOLICY: "c" |
|
111 | TEST_HGMODULEPOLICY: "c" | |
109 |
|
112 | |||
110 | check-pytype: |
|
113 | check-pytype: | |
111 | extends: .runtests_template |
|
114 | extends: .runtests_template | |
112 | before_script: |
|
115 | before_script: | |
|
116 | - pyenv shell 3.7.17 | |||
113 | - hg clone . /tmp/mercurial-ci/ --noupdate --config phases.publish=no |
|
117 | - hg clone . /tmp/mercurial-ci/ --noupdate --config phases.publish=no | |
114 | - hg -R /tmp/mercurial-ci/ update `hg log --rev '.' --template '{node}'` |
|
118 | - hg -R /tmp/mercurial-ci/ update `hg log --rev '.' --template '{node}'` | |
115 | - cd /tmp/mercurial-ci/ |
|
119 | - cd /tmp/mercurial-ci/ | |
116 | - make local PYTHON=$PYTHON |
|
120 | - make local PYTHON=$PYTHON | |
117 | - $PYTHON -m pip install --user -U libcst==0.3.20 pytype==2022.11.18 |
|
121 | - $PYTHON -m pip install --user -U libcst==0.3.20 pytype==2022.11.18 | |
118 | - ./contrib/setup-pytype.sh |
|
122 | - ./contrib/setup-pytype.sh | |
119 | script: |
|
123 | script: | |
120 | - echo "Entering script section" |
|
124 | - echo "Entering script section" | |
121 | - sh contrib/check-pytype.sh |
|
125 | - sh contrib/check-pytype.sh | |
122 | variables: |
|
126 | variables: | |
123 |
PYTHON: python |
|
127 | PYTHON: python | |
124 |
|
128 | |||
125 | # `sh.exe --login` sets a couple of extra environment variables that are defined |
|
129 | # `sh.exe --login` sets a couple of extra environment variables that are defined | |
126 | # in the MinGW shell, but switches CWD to /home/$username. The previous value |
|
130 | # in the MinGW shell, but switches CWD to /home/$username. The previous value | |
127 | # is stored in OLDPWD. Of the added variables, MSYSTEM is crucial to running |
|
131 | # is stored in OLDPWD. Of the added variables, MSYSTEM is crucial to running | |
128 | # run-tests.py- it is needed to make run-tests.py generate a `python3` script |
|
132 | # run-tests.py- it is needed to make run-tests.py generate a `python3` script | |
129 | # that satisfies the various shebang lines and delegates to `py -3`. |
|
133 | # that satisfies the various shebang lines and delegates to `py -3`. | |
130 | .window_runtests_template: &windows_runtests |
|
134 | .window_runtests_template: &windows_runtests | |
131 | <<: *all |
|
135 | <<: *all | |
132 | when: manual # we don't have any Windows runners anymore at the moment |
|
136 | when: manual # we don't have any Windows runners anymore at the moment | |
133 | stage: tests |
|
137 | stage: tests | |
134 | before_script: |
|
138 | before_script: | |
135 | - C:/MinGW/msys/1.0/bin/sh.exe --login -c 'cd "$OLDPWD" && ls -1 tests/test-check-*.* > C:/Temp/check-tests.txt' |
|
139 | - C:/MinGW/msys/1.0/bin/sh.exe --login -c 'cd "$OLDPWD" && ls -1 tests/test-check-*.* > C:/Temp/check-tests.txt' | |
136 | # TODO: find/install cvs, bzr, perforce, gpg, sqlite3 |
|
140 | # TODO: find/install cvs, bzr, perforce, gpg, sqlite3 | |
137 |
|
141 | |||
138 | script: |
|
142 | script: | |
139 | - echo "Entering script section" |
|
143 | - echo "Entering script section" | |
140 | - echo "python used, $Env:PYTHON" |
|
144 | - echo "python used, $Env:PYTHON" | |
141 | - Invoke-Expression "$Env:PYTHON -V" |
|
145 | - Invoke-Expression "$Env:PYTHON -V" | |
142 | - Invoke-Expression "$Env:PYTHON -m black --version" |
|
146 | - Invoke-Expression "$Env:PYTHON -m black --version" | |
143 | - echo "$Env:RUNTEST_ARGS" |
|
147 | - echo "$Env:RUNTEST_ARGS" | |
144 | - echo "$Env:TMP" |
|
148 | - echo "$Env:TMP" | |
145 | - echo "$Env:TEMP" |
|
149 | - echo "$Env:TEMP" | |
146 |
|
150 | |||
147 | - C:/MinGW/msys/1.0/bin/sh.exe --login -c 'cd "$OLDPWD" && HGTESTS_ALLOW_NETIO="$TEST_HGTESTS_ALLOW_NETIO" HGMODULEPOLICY="$TEST_HGMODULEPOLICY" $PYTHON tests/run-tests.py --color=always $RUNTEST_ARGS' |
|
151 | - C:/MinGW/msys/1.0/bin/sh.exe --login -c 'cd "$OLDPWD" && HGTESTS_ALLOW_NETIO="$TEST_HGTESTS_ALLOW_NETIO" HGMODULEPOLICY="$TEST_HGMODULEPOLICY" $PYTHON tests/run-tests.py --color=always $RUNTEST_ARGS' | |
148 |
|
152 | |||
149 | windows: |
|
153 | windows: | |
150 | <<: *windows_runtests |
|
154 | <<: *windows_runtests | |
151 | tags: |
|
155 | tags: | |
152 | - windows |
|
156 | - windows | |
153 | variables: |
|
157 | variables: | |
154 | TEST_HGMODULEPOLICY: "c" |
|
158 | TEST_HGMODULEPOLICY: "c" | |
155 | RUNTEST_ARGS: "--blacklist C:/Temp/check-tests.txt" |
|
159 | RUNTEST_ARGS: "--blacklist C:/Temp/check-tests.txt" | |
156 | PYTHON: py -3 |
|
160 | PYTHON: py -3 | |
157 |
|
161 | |||
158 | windows-pyox: |
|
162 | windows-pyox: | |
159 | <<: *windows_runtests |
|
163 | <<: *windows_runtests | |
160 | tags: |
|
164 | tags: | |
161 | - windows |
|
165 | - windows | |
162 | variables: |
|
166 | variables: | |
163 | TEST_HGMODULEPOLICY: "c" |
|
167 | TEST_HGMODULEPOLICY: "c" | |
164 | RUNTEST_ARGS: "--blacklist C:/Temp/check-tests.txt --pyoxidized" |
|
168 | RUNTEST_ARGS: "--blacklist C:/Temp/check-tests.txt --pyoxidized" | |
165 | PYTHON: py -3 |
|
169 | PYTHON: py -3 |
General Comments 0
You need to be logged in to leave comments.
Login now