Mercurial > hg
comparison contrib/heptapod-ci.yml @ 48323:5d83a40cd3f8
ci: stop running with Python 2
We're dropping support for Python 2 after hg 6.0.
Differential Revision: https://phab.mercurial-scm.org/D11748
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Wed, 10 Nov 2021 08:09:34 -0800 |
parents | f3e218ae3fd9 |
children | 8b927b33310a |
comparison
equal
deleted
inserted
replaced
48318:557cfa049a7b | 48323:5d83a40cd3f8 |
---|---|
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: python3 |
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 .all_template: &all | 13 .all_template: &all |
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: |
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 rust-cargo-test: |
39 <<: *runtests | |
40 variables: | |
41 RUNTEST_ARGS: "--time --test-list /tmp/check-tests.txt" | |
42 PYTHON: python3 | |
43 | |
44 rust-cargo-test-py2: &rust_cargo_test | |
45 <<: *all | 39 <<: *all |
46 stage: tests | 40 stage: tests |
47 script: | 41 script: |
48 - echo "python used, $PYTHON" | |
49 - make rust-tests | 42 - make rust-tests |
50 | |
51 rust-cargo-test-py3: | |
52 stage: tests | |
53 <<: *rust_cargo_test | |
54 variables: | |
55 PYTHON: python3 | |
56 | 43 |
57 phabricator-refresh: | 44 phabricator-refresh: |
58 stage: phabricator | 45 stage: phabricator |
59 variables: | 46 variables: |
60 DEFAULT_COMMENT: ":white_check_mark: refresh by Heptapod after a successful CI run (:octopus: :green_heart:)" | 47 DEFAULT_COMMENT: ":white_check_mark: refresh by Heptapod after a successful CI run (:octopus: :green_heart:)" |
65 ./contrib/phab-refresh-stack.sh --comment "$STABLE_COMMENT"; | 52 ./contrib/phab-refresh-stack.sh --comment "$STABLE_COMMENT"; |
66 else | 53 else |
67 ./contrib/phab-refresh-stack.sh --comment "$DEFAULT_COMMENT"; | 54 ./contrib/phab-refresh-stack.sh --comment "$DEFAULT_COMMENT"; |
68 fi | 55 fi |
69 | 56 |
70 test-py2: | 57 test: |
71 <<: *runtests | 58 <<: *runtests |
72 variables: | 59 variables: |
73 RUNTEST_ARGS: " --no-rust --blacklist /tmp/check-tests.txt" | 60 RUNTEST_ARGS: " --no-rust --blacklist /tmp/check-tests.txt" |
74 TEST_HGMODULEPOLICY: "c" | 61 TEST_HGMODULEPOLICY: "c" |
75 TEST_HGTESTS_ALLOW_NETIO: "1" | 62 TEST_HGTESTS_ALLOW_NETIO: "1" |
76 | 63 |
77 test-py3: | 64 test-pure: |
78 <<: *runtests | |
79 variables: | |
80 RUNTEST_ARGS: " --no-rust --blacklist /tmp/check-tests.txt" | |
81 PYTHON: python3 | |
82 TEST_HGMODULEPOLICY: "c" | |
83 TEST_HGTESTS_ALLOW_NETIO: "1" | |
84 | |
85 test-py2-pure: | |
86 <<: *runtests | 65 <<: *runtests |
87 variables: | 66 variables: |
88 RUNTEST_ARGS: "--pure --blacklist /tmp/check-tests.txt" | 67 RUNTEST_ARGS: "--pure --blacklist /tmp/check-tests.txt" |
89 TEST_HGMODULEPOLICY: "py" | 68 TEST_HGMODULEPOLICY: "py" |
90 | 69 |
91 test-py3-pure: | 70 test-rust: |
92 <<: *runtests | |
93 variables: | |
94 RUNTEST_ARGS: "--pure --blacklist /tmp/check-tests.txt" | |
95 PYTHON: python3 | |
96 TEST_HGMODULEPOLICY: "py" | |
97 | |
98 test-py2-rust: | |
99 <<: *runtests | 71 <<: *runtests |
100 variables: | 72 variables: |
101 HGWITHRUSTEXT: cpython | 73 HGWITHRUSTEXT: cpython |
102 RUNTEST_ARGS: "--rust --blacklist /tmp/check-tests.txt" | 74 RUNTEST_ARGS: "--rust --blacklist /tmp/check-tests.txt" |
103 TEST_HGMODULEPOLICY: "rust+c" | 75 TEST_HGMODULEPOLICY: "rust+c" |
104 | 76 |
105 test-py3-rust: | 77 test-rhg: |
106 <<: *runtests | |
107 variables: | |
108 HGWITHRUSTEXT: cpython | |
109 RUNTEST_ARGS: "--rust --blacklist /tmp/check-tests.txt" | |
110 PYTHON: python3 | |
111 TEST_HGMODULEPOLICY: "rust+c" | |
112 | |
113 test-py3-rhg: | |
114 <<: *runtests | 78 <<: *runtests |
115 variables: | 79 variables: |
116 HGWITHRUSTEXT: cpython | 80 HGWITHRUSTEXT: cpython |
117 RUNTEST_ARGS: "--rust --rhg --blacklist /tmp/check-tests.txt" | 81 RUNTEST_ARGS: "--rust --rhg --blacklist /tmp/check-tests.txt" |
118 PYTHON: python3 | |
119 TEST_HGMODULEPOLICY: "rust+c" | 82 TEST_HGMODULEPOLICY: "rust+c" |
120 | 83 |
121 test-py2-chg: | 84 test-chg: |
122 <<: *runtests | 85 <<: *runtests |
123 variables: | 86 variables: |
124 RUNTEST_ARGS: "--blacklist /tmp/check-tests.txt --chg" | 87 RUNTEST_ARGS: "--blacklist /tmp/check-tests.txt --chg" |
125 TEST_HGMODULEPOLICY: "c" | 88 TEST_HGMODULEPOLICY: "c" |
126 | 89 |
127 test-py3-chg: | 90 check-pytype: |
128 <<: *runtests | |
129 variables: | |
130 PYTHON: python3 | |
131 RUNTEST_ARGS: "--blacklist /tmp/check-tests.txt --chg" | |
132 TEST_HGMODULEPOLICY: "c" | |
133 | |
134 check-pytype-py3: | |
135 extends: .runtests_template | 91 extends: .runtests_template |
136 before_script: | 92 before_script: |
137 - hg clone . /tmp/mercurial-ci/ --noupdate --config phases.publish=no | 93 - hg clone . /tmp/mercurial-ci/ --noupdate --config phases.publish=no |
138 - hg -R /tmp/mercurial-ci/ update `hg log --rev '.' --template '{node}'` | 94 - hg -R /tmp/mercurial-ci/ update `hg log --rev '.' --template '{node}'` |
139 - cd /tmp/mercurial-ci/ | 95 - cd /tmp/mercurial-ci/ |
140 - make local PYTHON=$PYTHON | 96 - make local PYTHON=$PYTHON |
141 - $PYTHON -m pip install --user -U pytype==2021.04.15 | 97 - $PYTHON -m pip install --user -U pytype==2021.04.15 |
142 variables: | 98 variables: |
143 RUNTEST_ARGS: " --allow-slow-tests tests/test-check-pytype.t" | 99 RUNTEST_ARGS: " --allow-slow-tests tests/test-check-pytype.t" |
144 HGTEST_SLOWTIMEOUT: "3600" | 100 HGTEST_SLOWTIMEOUT: "3600" |
145 PYTHON: python3 | |
146 TEST_HGMODULEPOLICY: "c" | 101 TEST_HGMODULEPOLICY: "c" |
147 | 102 |
148 # `sh.exe --login` sets a couple of extra environment variables that are defined | 103 # `sh.exe --login` sets a couple of extra environment variables that are defined |
149 # in the MinGW shell, but switches CWD to /home/$username. The previous value | 104 # in the MinGW shell, but switches CWD to /home/$username. The previous value |
150 # is stored in OLDPWD. Of the added variables, MSYSTEM is crucial to running | 105 # is stored in OLDPWD. Of the added variables, MSYSTEM is crucial to running |