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