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