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