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