Show More
@@ -1,193 +1,179 b'' | |||||
1 | stages: |
|
1 | stages: | |
2 | - tests |
|
2 | - tests | |
3 | - phabricator |
|
3 | - phabricator | |
4 |
|
4 | |||
5 | image: registry.heptapod.net/mercurial/ci-images/mercurial-core:$HG_CI_IMAGE_TAG |
|
5 | image: registry.heptapod.net/mercurial/ci-images/mercurial-core:$HG_CI_IMAGE_TAG | |
6 |
|
6 | |||
7 | variables: |
|
7 | variables: | |
8 | PYTHON: python |
|
8 | PYTHON: python | |
9 | TEST_HGMODULEPOLICY: "allow" |
|
9 | TEST_HGMODULEPOLICY: "allow" | |
10 | HG_CI_IMAGE_TAG: "v1.0" |
|
10 | HG_CI_IMAGE_TAG: "v1.0" | |
11 | TEST_HGTESTS_ALLOW_NETIO: "0" |
|
11 | TEST_HGTESTS_ALLOW_NETIO: "0" | |
12 |
|
12 | |||
13 | .all_template: &all |
|
13 | .all_template: &all | |
14 | when: always |
|
14 | when: always | |
15 |
|
15 | |||
16 | .runtests_template: &runtests |
|
16 | .runtests_template: &runtests | |
17 | <<: *all |
|
17 | <<: *all | |
18 | stage: tests |
|
18 | stage: tests | |
19 | # The runner made a clone as root. |
|
19 | # The runner made a clone as root. | |
20 | # We make a new clone owned by user used to run the step. |
|
20 | # We make a new clone owned by user used to run the step. | |
21 | before_script: |
|
21 | before_script: | |
22 | - hg clone . /tmp/mercurial-ci/ --noupdate --config phases.publish=no |
|
22 | - hg clone . /tmp/mercurial-ci/ --noupdate --config phases.publish=no | |
23 | - hg -R /tmp/mercurial-ci/ update `hg log --rev '.' --template '{node}'` |
|
23 | - hg -R /tmp/mercurial-ci/ update `hg log --rev '.' --template '{node}'` | |
24 | - cd /tmp/mercurial-ci/ |
|
24 | - cd /tmp/mercurial-ci/ | |
25 | - ls -1 tests/test-check-*.* > /tmp/check-tests.txt |
|
25 | - ls -1 tests/test-check-*.* > /tmp/check-tests.txt | |
26 | - black --version |
|
26 | - black --version | |
27 | - clang-format --version |
|
27 | - clang-format --version | |
28 | script: |
|
28 | script: | |
29 | - echo "python used, $PYTHON" |
|
29 | - echo "python used, $PYTHON" | |
30 | - echo "$RUNTEST_ARGS" |
|
30 | - echo "$RUNTEST_ARGS" | |
31 | - HGTESTS_ALLOW_NETIO="$TEST_HGTESTS_ALLOW_NETIO" HGMODULEPOLICY="$TEST_HGMODULEPOLICY" "$PYTHON" tests/run-tests.py --color=always $RUNTEST_ARGS |
|
31 | - HGTESTS_ALLOW_NETIO="$TEST_HGTESTS_ALLOW_NETIO" HGMODULEPOLICY="$TEST_HGMODULEPOLICY" "$PYTHON" tests/run-tests.py --color=always $RUNTEST_ARGS | |
32 |
|
32 | |||
33 | checks-py2: |
|
33 | checks-py2: | |
34 | <<: *runtests |
|
34 | <<: *runtests | |
35 | variables: |
|
35 | variables: | |
36 | RUNTEST_ARGS: "--time --test-list /tmp/check-tests.txt" |
|
36 | RUNTEST_ARGS: "--time --test-list /tmp/check-tests.txt" | |
37 |
|
37 | |||
38 | checks-py3: |
|
38 | checks-py3: | |
39 | <<: *runtests |
|
39 | <<: *runtests | |
40 | variables: |
|
40 | variables: | |
41 | RUNTEST_ARGS: "--time --test-list /tmp/check-tests.txt" |
|
41 | RUNTEST_ARGS: "--time --test-list /tmp/check-tests.txt" | |
42 | PYTHON: python3 |
|
42 | PYTHON: python3 | |
43 |
|
43 | |||
44 |
rust-cargo-test-py |
|
44 | rust-cargo-test-py3: | |
45 | <<: *all |
|
|||
46 | stage: tests |
|
45 | stage: tests | |
47 | script: |
|
46 | script: | |
48 | - echo "python used, $PYTHON" |
|
47 | - echo "python used, $PYTHON" | |
49 | - make rust-tests |
|
48 | - make rust-tests | |
50 |
|
49 | |||
51 | rust-cargo-test-py3: |
|
|||
52 | stage: tests |
|
|||
53 | <<: *rust_cargo_test |
|
|||
54 | variables: |
|
|||
55 | PYTHON: python3 |
|
|||
56 |
|
||||
57 | phabricator-refresh: |
|
50 | phabricator-refresh: | |
58 | stage: phabricator |
|
51 | stage: phabricator | |
59 | rules: |
|
52 | rules: | |
60 | - if: '"$PHABRICATOR_TOKEN" != "NO-PHAB"' |
|
53 | - if: '"$PHABRICATOR_TOKEN" != "NO-PHAB"' | |
61 | when: on_success |
|
54 | when: on_success | |
62 | - if: '"$PHABRICATOR_TOKEN" == "NO-PHAB"' |
|
55 | - if: '"$PHABRICATOR_TOKEN" == "NO-PHAB"' | |
63 | when: never |
|
56 | when: never | |
64 | variables: |
|
57 | variables: | |
65 | DEFAULT_COMMENT: ":white_check_mark: refresh by Heptapod after a successful CI run (:octopus: :green_heart:)" |
|
58 | DEFAULT_COMMENT: ":white_check_mark: refresh by Heptapod after a successful CI run (:octopus: :green_heart:)" | |
66 | STABLE_COMMENT: ":white_check_mark: refresh by Heptapod after a successful CI run (:octopus: :green_heart:)\n⚠ This patch is intended for stable ⚠\n{image https://media.giphy.com/media/nYI8SmmChYXK0/source.gif}" |
|
59 | STABLE_COMMENT: ":white_check_mark: refresh by Heptapod after a successful CI run (:octopus: :green_heart:)\n⚠ This patch is intended for stable ⚠\n{image https://media.giphy.com/media/nYI8SmmChYXK0/source.gif}" | |
67 | script: |
|
60 | script: | |
68 | - | |
|
61 | - | | |
69 | if [ `hg branch` == "stable" ]; then |
|
62 | if [ `hg branch` == "stable" ]; then | |
70 | ./contrib/phab-refresh-stack.sh --comment "$STABLE_COMMENT"; |
|
63 | ./contrib/phab-refresh-stack.sh --comment "$STABLE_COMMENT"; | |
71 | else |
|
64 | else | |
72 | ./contrib/phab-refresh-stack.sh --comment "$DEFAULT_COMMENT"; |
|
65 | ./contrib/phab-refresh-stack.sh --comment "$DEFAULT_COMMENT"; | |
73 | fi |
|
66 | fi | |
74 |
|
67 | |||
75 | test-py2: |
|
68 | test-py2: | |
76 | <<: *runtests |
|
69 | <<: *runtests | |
77 | variables: |
|
70 | variables: | |
78 | RUNTEST_ARGS: " --no-rust --blacklist /tmp/check-tests.txt" |
|
71 | RUNTEST_ARGS: " --no-rust --blacklist /tmp/check-tests.txt" | |
79 | TEST_HGMODULEPOLICY: "c" |
|
72 | TEST_HGMODULEPOLICY: "c" | |
80 | TEST_HGTESTS_ALLOW_NETIO: "1" |
|
73 | TEST_HGTESTS_ALLOW_NETIO: "1" | |
81 |
|
74 | |||
82 | test-py3: |
|
75 | test-py3: | |
83 | <<: *runtests |
|
76 | <<: *runtests | |
84 | variables: |
|
77 | variables: | |
85 | RUNTEST_ARGS: " --no-rust --blacklist /tmp/check-tests.txt" |
|
78 | RUNTEST_ARGS: " --no-rust --blacklist /tmp/check-tests.txt" | |
86 | PYTHON: python3 |
|
79 | PYTHON: python3 | |
87 | TEST_HGMODULEPOLICY: "c" |
|
80 | TEST_HGMODULEPOLICY: "c" | |
88 | TEST_HGTESTS_ALLOW_NETIO: "1" |
|
81 | TEST_HGTESTS_ALLOW_NETIO: "1" | |
89 |
|
82 | |||
90 | test-py2-pure: |
|
83 | test-py2-pure: | |
91 | <<: *runtests |
|
84 | <<: *runtests | |
92 | variables: |
|
85 | variables: | |
93 | RUNTEST_ARGS: "--pure --blacklist /tmp/check-tests.txt" |
|
86 | RUNTEST_ARGS: "--pure --blacklist /tmp/check-tests.txt" | |
94 | TEST_HGMODULEPOLICY: "py" |
|
87 | TEST_HGMODULEPOLICY: "py" | |
95 |
|
88 | |||
96 | test-py3-pure: |
|
89 | test-py3-pure: | |
97 | <<: *runtests |
|
90 | <<: *runtests | |
98 | variables: |
|
91 | variables: | |
99 | RUNTEST_ARGS: "--pure --blacklist /tmp/check-tests.txt" |
|
92 | RUNTEST_ARGS: "--pure --blacklist /tmp/check-tests.txt" | |
100 | PYTHON: python3 |
|
93 | PYTHON: python3 | |
101 | TEST_HGMODULEPOLICY: "py" |
|
94 | TEST_HGMODULEPOLICY: "py" | |
102 |
|
95 | |||
103 | test-py2-rust: |
|
|||
104 | <<: *runtests |
|
|||
105 | variables: |
|
|||
106 | HGWITHRUSTEXT: cpython |
|
|||
107 | RUNTEST_ARGS: "--rust --blacklist /tmp/check-tests.txt" |
|
|||
108 | TEST_HGMODULEPOLICY: "rust+c" |
|
|||
109 |
|
||||
110 | test-py3-rust: |
|
96 | test-py3-rust: | |
111 | <<: *runtests |
|
97 | <<: *runtests | |
112 | variables: |
|
98 | variables: | |
113 | HGWITHRUSTEXT: cpython |
|
99 | HGWITHRUSTEXT: cpython | |
114 | RUNTEST_ARGS: "--rust --blacklist /tmp/check-tests.txt" |
|
100 | RUNTEST_ARGS: "--rust --blacklist /tmp/check-tests.txt" | |
115 | PYTHON: python3 |
|
101 | PYTHON: python3 | |
116 | TEST_HGMODULEPOLICY: "rust+c" |
|
102 | TEST_HGMODULEPOLICY: "rust+c" | |
117 |
|
103 | |||
118 | test-py3-rhg: |
|
104 | test-py3-rhg: | |
119 | <<: *runtests |
|
105 | <<: *runtests | |
120 | variables: |
|
106 | variables: | |
121 | HGWITHRUSTEXT: cpython |
|
107 | HGWITHRUSTEXT: cpython | |
122 | RUNTEST_ARGS: "--rust --rhg --blacklist /tmp/check-tests.txt" |
|
108 | RUNTEST_ARGS: "--rust --rhg --blacklist /tmp/check-tests.txt" | |
123 | PYTHON: python3 |
|
109 | PYTHON: python3 | |
124 | TEST_HGMODULEPOLICY: "rust+c" |
|
110 | TEST_HGMODULEPOLICY: "rust+c" | |
125 |
|
111 | |||
126 | test-py2-chg: |
|
112 | test-py2-chg: | |
127 | <<: *runtests |
|
113 | <<: *runtests | |
128 | variables: |
|
114 | variables: | |
129 | RUNTEST_ARGS: "--blacklist /tmp/check-tests.txt --chg" |
|
115 | RUNTEST_ARGS: "--blacklist /tmp/check-tests.txt --chg" | |
130 | TEST_HGMODULEPOLICY: "c" |
|
116 | TEST_HGMODULEPOLICY: "c" | |
131 |
|
117 | |||
132 | test-py3-chg: |
|
118 | test-py3-chg: | |
133 | <<: *runtests |
|
119 | <<: *runtests | |
134 | variables: |
|
120 | variables: | |
135 | PYTHON: python3 |
|
121 | PYTHON: python3 | |
136 | RUNTEST_ARGS: "--blacklist /tmp/check-tests.txt --chg" |
|
122 | RUNTEST_ARGS: "--blacklist /tmp/check-tests.txt --chg" | |
137 | TEST_HGMODULEPOLICY: "c" |
|
123 | TEST_HGMODULEPOLICY: "c" | |
138 |
|
124 | |||
139 | check-pytype-py3: |
|
125 | check-pytype-py3: | |
140 | extends: .runtests_template |
|
126 | extends: .runtests_template | |
141 | before_script: |
|
127 | before_script: | |
142 | - hg clone . /tmp/mercurial-ci/ --noupdate --config phases.publish=no |
|
128 | - hg clone . /tmp/mercurial-ci/ --noupdate --config phases.publish=no | |
143 | - hg -R /tmp/mercurial-ci/ update `hg log --rev '.' --template '{node}'` |
|
129 | - hg -R /tmp/mercurial-ci/ update `hg log --rev '.' --template '{node}'` | |
144 | - cd /tmp/mercurial-ci/ |
|
130 | - cd /tmp/mercurial-ci/ | |
145 | - make local PYTHON=$PYTHON |
|
131 | - make local PYTHON=$PYTHON | |
146 | - $PYTHON -m pip install --user -U pytype==2021.04.15 |
|
132 | - $PYTHON -m pip install --user -U pytype==2021.04.15 | |
147 | variables: |
|
133 | variables: | |
148 | RUNTEST_ARGS: " --allow-slow-tests tests/test-check-pytype.t" |
|
134 | RUNTEST_ARGS: " --allow-slow-tests tests/test-check-pytype.t" | |
149 | HGTEST_SLOWTIMEOUT: "3600" |
|
135 | HGTEST_SLOWTIMEOUT: "3600" | |
150 | PYTHON: python3 |
|
136 | PYTHON: python3 | |
151 | TEST_HGMODULEPOLICY: "c" |
|
137 | TEST_HGMODULEPOLICY: "c" | |
152 |
|
138 | |||
153 | # `sh.exe --login` sets a couple of extra environment variables that are defined |
|
139 | # `sh.exe --login` sets a couple of extra environment variables that are defined | |
154 | # in the MinGW shell, but switches CWD to /home/$username. The previous value |
|
140 | # in the MinGW shell, but switches CWD to /home/$username. The previous value | |
155 | # is stored in OLDPWD. Of the added variables, MSYSTEM is crucial to running |
|
141 | # is stored in OLDPWD. Of the added variables, MSYSTEM is crucial to running | |
156 | # run-tests.py- it is needed to make run-tests.py generate a `python3` script |
|
142 | # run-tests.py- it is needed to make run-tests.py generate a `python3` script | |
157 | # that satisfies the various shebang lines and delegates to `py -3`. |
|
143 | # that satisfies the various shebang lines and delegates to `py -3`. | |
158 | .window_runtests_template: &windows_runtests |
|
144 | .window_runtests_template: &windows_runtests | |
159 | <<: *all |
|
145 | <<: *all | |
160 | when: manual # we don't have any Windows runners anymore at the moment |
|
146 | when: manual # we don't have any Windows runners anymore at the moment | |
161 | stage: tests |
|
147 | stage: tests | |
162 | before_script: |
|
148 | before_script: | |
163 | - C:/MinGW/msys/1.0/bin/sh.exe --login -c 'cd "$OLDPWD" && ls -1 tests/test-check-*.* > C:/Temp/check-tests.txt' |
|
149 | - C:/MinGW/msys/1.0/bin/sh.exe --login -c 'cd "$OLDPWD" && ls -1 tests/test-check-*.* > C:/Temp/check-tests.txt' | |
164 | # TODO: find/install cvs, bzr, perforce, gpg, sqlite3 |
|
150 | # TODO: find/install cvs, bzr, perforce, gpg, sqlite3 | |
165 |
|
151 | |||
166 | script: |
|
152 | script: | |
167 | - echo "Entering script section" |
|
153 | - echo "Entering script section" | |
168 | - echo "python used, $Env:PYTHON" |
|
154 | - echo "python used, $Env:PYTHON" | |
169 | - Invoke-Expression "$Env:PYTHON -V" |
|
155 | - Invoke-Expression "$Env:PYTHON -V" | |
170 | - Invoke-Expression "$Env:PYTHON -m black --version" |
|
156 | - Invoke-Expression "$Env:PYTHON -m black --version" | |
171 | - echo "$Env:RUNTEST_ARGS" |
|
157 | - echo "$Env:RUNTEST_ARGS" | |
172 | - echo "$Env:TMP" |
|
158 | - echo "$Env:TMP" | |
173 | - echo "$Env:TEMP" |
|
159 | - echo "$Env:TEMP" | |
174 |
|
160 | |||
175 | - 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' |
|
161 | - 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' | |
176 |
|
162 | |||
177 | windows-py3: |
|
163 | windows-py3: | |
178 | <<: *windows_runtests |
|
164 | <<: *windows_runtests | |
179 | tags: |
|
165 | tags: | |
180 | - windows |
|
166 | - windows | |
181 | variables: |
|
167 | variables: | |
182 | TEST_HGMODULEPOLICY: "c" |
|
168 | TEST_HGMODULEPOLICY: "c" | |
183 | RUNTEST_ARGS: "--blacklist C:/Temp/check-tests.txt" |
|
169 | RUNTEST_ARGS: "--blacklist C:/Temp/check-tests.txt" | |
184 | PYTHON: py -3 |
|
170 | PYTHON: py -3 | |
185 |
|
171 | |||
186 | windows-py3-pyox: |
|
172 | windows-py3-pyox: | |
187 | <<: *windows_runtests |
|
173 | <<: *windows_runtests | |
188 | tags: |
|
174 | tags: | |
189 | - windows |
|
175 | - windows | |
190 | variables: |
|
176 | variables: | |
191 | TEST_HGMODULEPOLICY: "c" |
|
177 | TEST_HGMODULEPOLICY: "c" | |
192 | RUNTEST_ARGS: "--blacklist C:/Temp/check-tests.txt --pyoxidized" |
|
178 | RUNTEST_ARGS: "--blacklist C:/Temp/check-tests.txt --pyoxidized" | |
193 | PYTHON: py -3 |
|
179 | PYTHON: py -3 |
General Comments 0
You need to be logged in to leave comments.
Login now