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