##// END OF EJS Templates
WIP test new CI image
Raphaël Gomès -
r52588:d859554a default
parent child Browse files
Show More
@@ -1,165 +1,169
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 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 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 when: never
15 15 - if: $CI_PIPELINE_SOURCE == "push"
16 16 when: always
17 17 - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS
18 18 when: never
19 19 - if: $CI_COMMIT_BRANCH
20 20 when: always
21 21
22 22 stages:
23 23 - tests
24 24
25 image: registry.heptapod.net/mercurial/ci-images/mercurial-core:$HG_CI_IMAGE_TAG
25 image: registry.heptapod.net/mercurial/ci-images/mercurial-core@sha256:16720f3e2ba29408f816b87407841d77a01ea6e9fe29894181cea6513cc8bfec
26 26
27 27 variables:
28 28 PYTHON: python
29 29 TEST_HGMODULEPOLICY: "allow"
30 30 HG_CI_IMAGE_TAG: "v1.0"
31 31 TEST_HGTESTS_ALLOW_NETIO: "0"
32 32
33 33 .all_template: &all
34 34 when: on_success
35 35
36 36 .runtests_template: &runtests
37 37 <<: *all
38 38 stage: tests
39 39 # The runner made a clone as root.
40 40 # We make a new clone owned by user used to run the step.
41 41 before_script:
42 - whoami
43 - pyenv shell 3.7.17
42 44 - hg clone . /tmp/mercurial-ci/ --noupdate --config phases.publish=no
43 45 - hg -R /tmp/mercurial-ci/ update `hg log --rev '.' --template '{node}'`
44 46 - cd /tmp/mercurial-ci/
45 47 - ls -1 tests/test-check-*.* > /tmp/check-tests.txt
46 48 - black --version
47 49 - clang-format --version
48 50 script:
49 51 - echo "python used, $PYTHON"
50 52 - $PYTHON --version
51 53 - echo "$RUNTEST_ARGS"
52 54 - HGTESTS_ALLOW_NETIO="$TEST_HGTESTS_ALLOW_NETIO" HGMODULEPOLICY="$TEST_HGMODULEPOLICY" "$PYTHON" tests/run-tests.py --color=always $RUNTEST_ARGS
53 55
54 56 checks:
55 57 <<: *runtests
56 58 variables:
57 59 RUNTEST_ARGS: "--time --test-list /tmp/check-tests.txt"
58 PYTHON: python3
60 PYTHON: python
59 61 CI_CLEVER_CLOUD_FLAVOR: S
60 62
61 63 rust-cargo-test:
62 64 <<: *all
63 65 stage: tests
64 66 script:
65 67 - echo "python used, $PYTHON"
68 - $PYTHON --version
66 69 - make rust-tests
67 70 - make cargo-clippy
68 71 variables:
69 PYTHON: python3
72 PYTHON: python
70 73 CI_CLEVER_CLOUD_FLAVOR: S
71 74
72 75 test-c:
73 76 <<: *runtests
74 77 variables:
75 78 RUNTEST_ARGS: " --no-rust --blacklist /tmp/check-tests.txt"
76 PYTHON: python3
79 PYTHON: python
77 80 TEST_HGMODULEPOLICY: "c"
78 81 TEST_HGTESTS_ALLOW_NETIO: "1"
79 82
80 83 test-pure:
81 84 <<: *runtests
82 85 variables:
83 86 RUNTEST_ARGS: "--pure --blacklist /tmp/check-tests.txt"
84 PYTHON: python3
87 PYTHON: python
85 88 TEST_HGMODULEPOLICY: "py"
86 89
87 90 test-rust:
88 91 <<: *runtests
89 92 variables:
90 93 HGWITHRUSTEXT: cpython
91 94 RUNTEST_ARGS: "--rust --blacklist /tmp/check-tests.txt"
92 PYTHON: python3
95 PYTHON: python
93 96 TEST_HGMODULEPOLICY: "rust+c"
94 97
95 98 test-rhg:
96 99 <<: *runtests
97 100 variables:
98 101 HGWITHRUSTEXT: cpython
99 102 RUNTEST_ARGS: "--rust --rhg --blacklist /tmp/check-tests.txt"
100 PYTHON: python3
103 PYTHON: python
101 104 TEST_HGMODULEPOLICY: "rust+c"
102 105
103 106 test-chg:
104 107 <<: *runtests
105 108 variables:
106 PYTHON: python3
109 PYTHON: python
107 110 RUNTEST_ARGS: "--blacklist /tmp/check-tests.txt --chg"
108 111 TEST_HGMODULEPOLICY: "c"
109 112
110 113 check-pytype:
111 114 extends: .runtests_template
112 115 before_script:
116 - pyenv shell 3.7.17
113 117 - hg clone . /tmp/mercurial-ci/ --noupdate --config phases.publish=no
114 118 - hg -R /tmp/mercurial-ci/ update `hg log --rev '.' --template '{node}'`
115 119 - cd /tmp/mercurial-ci/
116 120 - make local PYTHON=$PYTHON
117 121 - $PYTHON -m pip install --user -U libcst==0.3.20 pytype==2022.11.18
118 122 - ./contrib/setup-pytype.sh
119 123 script:
120 124 - echo "Entering script section"
121 125 - sh contrib/check-pytype.sh
122 126 variables:
123 PYTHON: python3
127 PYTHON: python
124 128
125 129 # `sh.exe --login` sets a couple of extra environment variables that are defined
126 130 # in the MinGW shell, but switches CWD to /home/$username. The previous value
127 131 # is stored in OLDPWD. Of the added variables, MSYSTEM is crucial to running
128 132 # run-tests.py- it is needed to make run-tests.py generate a `python3` script
129 133 # that satisfies the various shebang lines and delegates to `py -3`.
130 134 .window_runtests_template: &windows_runtests
131 135 <<: *all
132 136 when: manual # we don't have any Windows runners anymore at the moment
133 137 stage: tests
134 138 before_script:
135 139 - C:/MinGW/msys/1.0/bin/sh.exe --login -c 'cd "$OLDPWD" && ls -1 tests/test-check-*.* > C:/Temp/check-tests.txt'
136 140 # TODO: find/install cvs, bzr, perforce, gpg, sqlite3
137 141
138 142 script:
139 143 - echo "Entering script section"
140 144 - echo "python used, $Env:PYTHON"
141 145 - Invoke-Expression "$Env:PYTHON -V"
142 146 - Invoke-Expression "$Env:PYTHON -m black --version"
143 147 - echo "$Env:RUNTEST_ARGS"
144 148 - echo "$Env:TMP"
145 149 - echo "$Env:TEMP"
146 150
147 151 - 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'
148 152
149 153 windows:
150 154 <<: *windows_runtests
151 155 tags:
152 156 - windows
153 157 variables:
154 158 TEST_HGMODULEPOLICY: "c"
155 159 RUNTEST_ARGS: "--blacklist C:/Temp/check-tests.txt"
156 160 PYTHON: py -3
157 161
158 162 windows-pyox:
159 163 <<: *windows_runtests
160 164 tags:
161 165 - windows
162 166 variables:
163 167 TEST_HGMODULEPOLICY: "c"
164 168 RUNTEST_ARGS: "--blacklist C:/Temp/check-tests.txt --pyoxidized"
165 169 PYTHON: py -3
General Comments 0
You need to be logged in to leave comments. Login now