Show More
@@ -1,161 +1,161 b'' | |||
|
1 | 1 | # Don't run pipelines on branch "merge", since we're fast-forward only. |
|
2 | 2 | # Gitlab sees a new branch (since e.g. `topic/stable/my-topic` becomes |
|
3 | 3 | # `branch/stable`), but the hash hasn't changed. There is no reason to |
|
4 | 4 | # re-run the CI in our case, since we haven't built up any specific automation. |
|
5 | 5 | # Right now it's just wasted CI and developer time. |
|
6 |
# One can still run the pipeline manually via the web interface |
|
|
6 | # One can still run the pipeline manually via the web interface, | |
|
7 | 7 | # like in the case of releases, to make *extra* sure that the actual branch |
|
8 | 8 | # has succeeded. |
|
9 | 9 | workflow: |
|
10 | 10 | rules: |
|
11 |
- if: $CI_COMMIT_BRANCH =~ /^branch\/.*/ && $CI_PIPELINE_SOURCE != "web" |
|
|
11 | - if: $CI_COMMIT_BRANCH =~ /^branch\/.*/ && $CI_PIPELINE_SOURCE != "web" | |
|
12 | 12 | when: never |
|
13 | 13 | - if: $CI_PIPELINE_SOURCE == "merge_request_event" |
|
14 | 14 | - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS |
|
15 | 15 | when: never |
|
16 | 16 | - if: $CI_COMMIT_BRANCH |
|
17 | 17 | |
|
18 | 18 | stages: |
|
19 | 19 | - tests |
|
20 | 20 | |
|
21 | 21 | image: registry.heptapod.net/mercurial/ci-images/mercurial-core:$HG_CI_IMAGE_TAG |
|
22 | 22 | |
|
23 | 23 | variables: |
|
24 | 24 | PYTHON: python |
|
25 | 25 | TEST_HGMODULEPOLICY: "allow" |
|
26 | 26 | HG_CI_IMAGE_TAG: "v1.0" |
|
27 | 27 | TEST_HGTESTS_ALLOW_NETIO: "0" |
|
28 | 28 | |
|
29 | 29 | .all_template: &all |
|
30 | 30 | when: on_success |
|
31 | 31 | |
|
32 | 32 | .runtests_template: &runtests |
|
33 | 33 | <<: *all |
|
34 | 34 | stage: tests |
|
35 | 35 | # The runner made a clone as root. |
|
36 | 36 | # We make a new clone owned by user used to run the step. |
|
37 | 37 | before_script: |
|
38 | 38 | - hg clone . /tmp/mercurial-ci/ --noupdate --config phases.publish=no |
|
39 | 39 | - hg -R /tmp/mercurial-ci/ update `hg log --rev '.' --template '{node}'` |
|
40 | 40 | - cd /tmp/mercurial-ci/ |
|
41 | 41 | - ls -1 tests/test-check-*.* > /tmp/check-tests.txt |
|
42 | 42 | - black --version |
|
43 | 43 | - clang-format --version |
|
44 | 44 | script: |
|
45 | 45 | - echo "python used, $PYTHON" |
|
46 | 46 | - $PYTHON --version |
|
47 | 47 | - echo "$RUNTEST_ARGS" |
|
48 | 48 | - HGTESTS_ALLOW_NETIO="$TEST_HGTESTS_ALLOW_NETIO" HGMODULEPOLICY="$TEST_HGMODULEPOLICY" "$PYTHON" tests/run-tests.py --color=always $RUNTEST_ARGS |
|
49 | 49 | |
|
50 | 50 | checks: |
|
51 | 51 | <<: *runtests |
|
52 | 52 | variables: |
|
53 | 53 | RUNTEST_ARGS: "--time --test-list /tmp/check-tests.txt" |
|
54 | 54 | PYTHON: python3 |
|
55 | 55 | CI_CLEVER_CLOUD_FLAVOR: S |
|
56 | 56 | |
|
57 | 57 | rust-cargo-test: |
|
58 | 58 | <<: *all |
|
59 | 59 | stage: tests |
|
60 | 60 | script: |
|
61 | 61 | - echo "python used, $PYTHON" |
|
62 | 62 | - make rust-tests |
|
63 | 63 | - make cargo-clippy |
|
64 | 64 | variables: |
|
65 | 65 | PYTHON: python3 |
|
66 | 66 | CI_CLEVER_CLOUD_FLAVOR: S |
|
67 | 67 | |
|
68 | 68 | test-c: |
|
69 | 69 | <<: *runtests |
|
70 | 70 | variables: |
|
71 | 71 | RUNTEST_ARGS: " --no-rust --blacklist /tmp/check-tests.txt" |
|
72 | 72 | PYTHON: python3 |
|
73 | 73 | TEST_HGMODULEPOLICY: "c" |
|
74 | 74 | TEST_HGTESTS_ALLOW_NETIO: "1" |
|
75 | 75 | |
|
76 | 76 | test-pure: |
|
77 | 77 | <<: *runtests |
|
78 | 78 | variables: |
|
79 | 79 | RUNTEST_ARGS: "--pure --blacklist /tmp/check-tests.txt" |
|
80 | 80 | PYTHON: python3 |
|
81 | 81 | TEST_HGMODULEPOLICY: "py" |
|
82 | 82 | |
|
83 | 83 | test-rust: |
|
84 | 84 | <<: *runtests |
|
85 | 85 | variables: |
|
86 | 86 | HGWITHRUSTEXT: cpython |
|
87 | 87 | RUNTEST_ARGS: "--rust --blacklist /tmp/check-tests.txt" |
|
88 | 88 | PYTHON: python3 |
|
89 | 89 | TEST_HGMODULEPOLICY: "rust+c" |
|
90 | 90 | |
|
91 | 91 | test-rhg: |
|
92 | 92 | <<: *runtests |
|
93 | 93 | variables: |
|
94 | 94 | HGWITHRUSTEXT: cpython |
|
95 | 95 | RUNTEST_ARGS: "--rust --rhg --blacklist /tmp/check-tests.txt" |
|
96 | 96 | PYTHON: python3 |
|
97 | 97 | TEST_HGMODULEPOLICY: "rust+c" |
|
98 | 98 | |
|
99 | 99 | test-chg: |
|
100 | 100 | <<: *runtests |
|
101 | 101 | variables: |
|
102 | 102 | PYTHON: python3 |
|
103 | 103 | RUNTEST_ARGS: "--blacklist /tmp/check-tests.txt --chg" |
|
104 | 104 | TEST_HGMODULEPOLICY: "c" |
|
105 | 105 | |
|
106 | 106 | check-pytype: |
|
107 | 107 | extends: .runtests_template |
|
108 | 108 | before_script: |
|
109 | 109 | - hg clone . /tmp/mercurial-ci/ --noupdate --config phases.publish=no |
|
110 | 110 | - hg -R /tmp/mercurial-ci/ update `hg log --rev '.' --template '{node}'` |
|
111 | 111 | - cd /tmp/mercurial-ci/ |
|
112 | 112 | - make local PYTHON=$PYTHON |
|
113 | 113 | - $PYTHON -m pip install --user -U libcst==0.3.20 pytype==2022.11.18 |
|
114 | 114 | - ./contrib/setup-pytype.sh |
|
115 | 115 | script: |
|
116 | 116 | - echo "Entering script section" |
|
117 | 117 | - sh contrib/check-pytype.sh |
|
118 | 118 | variables: |
|
119 | 119 | PYTHON: python3 |
|
120 | 120 | |
|
121 | 121 | # `sh.exe --login` sets a couple of extra environment variables that are defined |
|
122 | 122 | # in the MinGW shell, but switches CWD to /home/$username. The previous value |
|
123 | 123 | # is stored in OLDPWD. Of the added variables, MSYSTEM is crucial to running |
|
124 | 124 | # run-tests.py- it is needed to make run-tests.py generate a `python3` script |
|
125 | 125 | # that satisfies the various shebang lines and delegates to `py -3`. |
|
126 | 126 | .window_runtests_template: &windows_runtests |
|
127 | 127 | <<: *all |
|
128 | 128 | when: manual # we don't have any Windows runners anymore at the moment |
|
129 | 129 | stage: tests |
|
130 | 130 | before_script: |
|
131 | 131 | - C:/MinGW/msys/1.0/bin/sh.exe --login -c 'cd "$OLDPWD" && ls -1 tests/test-check-*.* > C:/Temp/check-tests.txt' |
|
132 | 132 | # TODO: find/install cvs, bzr, perforce, gpg, sqlite3 |
|
133 | 133 | |
|
134 | 134 | script: |
|
135 | 135 | - echo "Entering script section" |
|
136 | 136 | - echo "python used, $Env:PYTHON" |
|
137 | 137 | - Invoke-Expression "$Env:PYTHON -V" |
|
138 | 138 | - Invoke-Expression "$Env:PYTHON -m black --version" |
|
139 | 139 | - echo "$Env:RUNTEST_ARGS" |
|
140 | 140 | - echo "$Env:TMP" |
|
141 | 141 | - echo "$Env:TEMP" |
|
142 | 142 | |
|
143 | 143 | - 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' |
|
144 | 144 | |
|
145 | 145 | windows: |
|
146 | 146 | <<: *windows_runtests |
|
147 | 147 | tags: |
|
148 | 148 | - windows |
|
149 | 149 | variables: |
|
150 | 150 | TEST_HGMODULEPOLICY: "c" |
|
151 | 151 | RUNTEST_ARGS: "--blacklist C:/Temp/check-tests.txt" |
|
152 | 152 | PYTHON: py -3 |
|
153 | 153 | |
|
154 | 154 | windows-pyox: |
|
155 | 155 | <<: *windows_runtests |
|
156 | 156 | tags: |
|
157 | 157 | - windows |
|
158 | 158 | variables: |
|
159 | 159 | TEST_HGMODULEPOLICY: "c" |
|
160 | 160 | RUNTEST_ARGS: "--blacklist C:/Temp/check-tests.txt --pyoxidized" |
|
161 | 161 | PYTHON: py -3 |
General Comments 0
You need to be logged in to leave comments.
Login now