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