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