]> Git Repo - J-u-boot.git/blame - .gitlab-ci.yml
board_f: Make clear_bss generic
[J-u-boot.git] / .gitlab-ci.yml
CommitLineData
1a62a722
TR
1# SPDX-License-Identifier: GPL-2.0+
2
3# Grab our configured image. The source for this is found at:
4# https://gitlab.denx.de/u-boot/gitlab-ci-runner
96ff825d 5image: trini/u-boot-gitlab-ci-runner:bionic-20200112-07Feb2020
1a62a722
TR
6
7# We run some tests in different order, to catch some failures quicker.
8stages:
1a62a722 9 - testsuites
b29cb058 10 - test.py
1a62a722
TR
11 - world build
12
13.buildman_and_testpy_template: &buildman_and_testpy_dfn
14 tags: [ 'all' ]
15 stage: test.py
16 before_script:
17 # Clone uboot-test-hooks
18 - git clone --depth=1 git://github.com/swarren/uboot-test-hooks.git /tmp/uboot-test-hooks
19 - ln -s travis-ci /tmp/uboot-test-hooks/bin/`hostname`
20 - ln -s travis-ci /tmp/uboot-test-hooks/py/`hostname`
28a51234
TR
21 - grub-mkimage --prefix="" -o ~/grub_x86.efi -O i386-efi normal echo lsefimmap lsefi lsefisystab efinet tftp minicmd
22 - grub-mkimage --prefix="" -o ~/grub_x64.efi -O x86_64-efi normal echo lsefimmap lsefi lsefisystab efinet tftp minicmd
24df1b14
HS
23 - cp /opt/grub/grubriscv64.efi ~/grub_riscv64.efi
24 - cp /opt/grub/grubaa64.efi ~/grub_arm64.efi
25 - cp /opt/grub/grubarm.efi ~/grub_arm.efi
b29cb058 26
1a62a722 27 after_script:
24df1b14 28 - rm -rf /tmp/uboot-test-hooks /tmp/venv
1a62a722
TR
29 script:
30 # From buildman, exit code 129 means warnings only. If we've been asked to
31 # use clang only do one configuration.
32 - if [[ "${BUILDMAN}" != "" ]]; then
33 ret=0;
26d4d770 34 tools/buildman/buildman -o /tmp -P -E ${BUILDMAN} ${OVERRIDE}|| ret=$?;
1a62a722 35 if [[ $ret -ne 0 && $ret -ne 129 ]]; then
db7b8602 36 tools/buildman/buildman -o /tmp -sdeP ${BUILDMAN};
1a62a722
TR
37 exit $ret;
38 fi;
39 fi
40 # "not a_test_which_does_not_exist" is a dummy -k parameter which will
41 # never prevent any test from running. That way, we can always pass
42 # "-k something" even when $TEST_PY_TEST_SPEC doesnt need a custom
43 # value.
085b8978
TR
44 - virtualenv -p /usr/bin/python3 /tmp/venv
45 - . /tmp/venv/bin/activate
46 - pip install -r test/py/requirements.txt
db7b8602 47 - export UBOOT_TRAVIS_BUILD_DIR=/tmp/.bm-work/${TEST_PY_BD};
90d3d78a 48 export PATH=/opt/qemu/bin:/tmp/uboot-test-hooks/bin:${PATH};
1a62a722
TR
49 export PYTHONPATH=/tmp/uboot-test-hooks/py/travis-ci;
50 if [[ "${TEST_PY_BD}" != "" ]]; then
51 ./test/py/test.py --bd ${TEST_PY_BD} ${TEST_PY_ID}
52 -k "${TEST_PY_TEST_SPEC:-not a_test_which_does_not_exist}"
53 --build-dir "$UBOOT_TRAVIS_BUILD_DIR";
54 ret=$?;
55 if [[ $ret -ne 0 ]]; then
56 exit $ret;
57 fi;
58 fi;
59
a11cb57d 60build all 32bit ARM platforms:
1a62a722
TR
61 tags: [ 'all' ]
62 stage: world build
63 script:
64 - ret=0;
4c749971
TR
65 ./tools/buildman/buildman -o /tmp -P -E arm -x aarch64 || ret=$?;
66 if [[ $ret -ne 0 && $ret -ne 129 ]]; then
67 ./tools/buildman/buildman -o /tmp -sdeP;
68 exit $ret;
69 fi;
9f7bda10 70
a11cb57d 71build all 64bit ARM platforms:
9f7bda10
TR
72 tags: [ 'all' ]
73 stage: world build
74 script:
f0db8395
TR
75 - virtualenv /tmp/venv
76 - . /tmp/venv/bin/activate
77 - pip install pyelftools
9f7bda10 78 - ret=0;
4c749971
TR
79 ./tools/buildman/buildman -o /tmp -P -E aarch64 || ret=$?;
80 if [[ $ret -ne 0 && $ret -ne 129 ]]; then
81 ./tools/buildman/buildman -o /tmp -sdeP;
82 exit $ret;
83 fi;
9f7bda10 84
a11cb57d 85build all PowerPC platforms:
9f7bda10
TR
86 tags: [ 'all' ]
87 stage: world build
88 script:
89 - ret=0;
4c749971
TR
90 ./tools/buildman/buildman -o /tmp -P -E powerpc || ret=$?;
91 if [[ $ret -ne 0 && $ret -ne 129 ]]; then
92 ./tools/buildman/buildman -o /tmp -sdeP;
93 exit $ret;
94 fi;
9f7bda10 95
a11cb57d 96build all other platforms:
9f7bda10
TR
97 tags: [ 'all' ]
98 stage: world build
99 script:
100 - ret=0;
4c749971
TR
101 ./tools/buildman/buildman -o /tmp -P -E -x arm,powerpc || ret=$?;
102 if [[ $ret -ne 0 && $ret -ne 129 ]]; then
103 ./tools/buildman/buildman -o /tmp -sdeP;
104 exit $ret;
105 fi;
1a62a722
TR
106
107# QA jobs for code analytics
108# static code analysis with cppcheck (we can add --enable=all later)
109cppcheck:
110 tags: [ 'all' ]
111 stage: testsuites
112 script:
113 - cppcheck --force --quiet --inline-suppr .
114
115# search for TODO within source tree
116grep TODO/FIXME/HACK:
117 tags: [ 'all' ]
118 stage: testsuites
119 script:
120 - grep -r TODO .
121 - grep -r FIXME .
122 # search for HACK within source tree and ignore HACKKIT board
123 - grep -r HACK . | grep -v HACKKIT
124
125# some statistics about the code base
126sloccount:
127 tags: [ 'all' ]
128 stage: testsuites
129 script:
130 - sloccount .
131
132# ensure all configs have MAINTAINERS entries
133Check for configs without MAINTAINERS entry:
134 tags: [ 'all' ]
135 stage: testsuites
136 script:
137 - if [ `./tools/genboardscfg.py -f 2>&1 | wc -l` -ne 0 ]; then exit 1; fi
138
139# Ensure host tools build
140Build tools-only:
141 tags: [ 'all' ]
142 stage: testsuites
143 script:
144 - make tools-only_config tools-only -j$(nproc)
145
1f3910da
PJT
146# Ensure env tools build
147Build envtools:
148 tags: [ 'all' ]
149 stage: testsuites
150 script:
151 - make tools-only_config envtools -j$(nproc)
152
d7ae9321 153Run binman, buildman, dtoc and patman testsuites:
1a62a722
TR
154 tags: [ 'all' ]
155 stage: testsuites
156 script:
d7ae9321
TR
157 - git config --global user.name "GitLab CI Runner";
158 git config --global user.email [email protected];
159 export USER=gitlab;
160 virtualenv /tmp/venv;
161 . /tmp/venv/bin/activate;
162 pip install pyelftools;
db7b8602 163 export UBOOT_TRAVIS_BUILD_DIR=/tmp/.bm-work/sandbox_spl;
d7ae9321
TR
164 export PYTHONPATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt";
165 export PATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc:${PATH}";
26d4d770 166 ./tools/buildman/buildman -o /tmp -P sandbox_spl;
d7ae9321
TR
167 ./tools/binman/binman --toolpath ${UBOOT_TRAVIS_BUILD_DIR}/tools test;
168 ./tools/buildman/buildman -t;
169 ./tools/dtoc/dtoc -t;
170 ./tools/patman/patman --test
1a62a722
TR
171
172# Test sandbox with test.py
173sandbox test.py:
174 tags: [ 'all' ]
175 variables:
176 TEST_PY_BD: "sandbox"
177 BUILDMAN: "^sandbox$"
178 <<: *buildman_and_testpy_dfn
179
0219d014
TR
180sandbox with clang test.py:
181 tags: [ 'all' ]
182 variables:
183 TEST_PY_BD: "sandbox"
184 BUILDMAN: "^sandbox$"
185 OVERRIDE: "-O clang-7"
186 <<: *buildman_and_testpy_dfn
187
1a62a722
TR
188sandbox_spl test.py:
189 tags: [ 'all' ]
190 variables:
191 TEST_PY_BD: "sandbox_spl"
192 BUILDMAN: "^sandbox_spl$"
193 TEST_PY_TEST_SPEC: "test_ofplatdata"
194 <<: *buildman_and_testpy_dfn
195
699c0b93
TR
196evb-ast2500 test.py:
197 tags: [ 'all' ]
198 variables:
199 TEST_PY_BD: "evb-ast2500"
200 TEST_PY_ID: "--id qemu"
699c0b93
TR
201 BUILDMAN: "^evb-ast2500$"
202 <<: *buildman_and_testpy_dfn
203
1a62a722
TR
204sandbox_flattree test.py:
205 tags: [ 'all' ]
206 variables:
207 TEST_PY_BD: "sandbox_flattree"
208 BUILDMAN: "^sandbox_flattree$"
209 <<: *buildman_and_testpy_dfn
210
211vexpress_ca15_tc2 test.py:
212 tags: [ 'all' ]
213 variables:
214 TEST_PY_BD: "vexpress_ca15_tc2"
215 TEST_PY_ID: "--id qemu"
1a62a722
TR
216 BUILDMAN: "^vexpress_ca15_tc2$"
217 <<: *buildman_and_testpy_dfn
218
219vexpress_ca9x4 test.py:
220 tags: [ 'all' ]
221 variables:
222 TEST_PY_BD: "vexpress_ca9x4"
223 TEST_PY_ID: "--id qemu"
1a62a722
TR
224 BUILDMAN: "^vexpress_ca9x4$"
225 <<: *buildman_and_testpy_dfn
226
227integratorcp_cm926ejs test.py:
228 tags: [ 'all' ]
229 variables:
230 TEST_PY_BD: "integratorcp_cm926ejs"
231 TEST_PY_TEST_SPEC: "not sleep"
232 TEST_PY_ID: "--id qemu"
1a62a722
TR
233 BUILDMAN: "^integratorcp_cm926ejs$"
234 <<: *buildman_and_testpy_dfn
235
236qemu_arm test.py:
237 tags: [ 'all' ]
238 variables:
239 TEST_PY_BD: "qemu_arm"
240 TEST_PY_TEST_SPEC: "not sleep"
1a62a722
TR
241 BUILDMAN: "^qemu_arm$"
242 <<: *buildman_and_testpy_dfn
243
244qemu_arm64 test.py:
245 tags: [ 'all' ]
246 variables:
247 TEST_PY_BD: "qemu_arm64"
248 TEST_PY_TEST_SPEC: "not sleep"
1a62a722
TR
249 BUILDMAN: "^qemu_arm64$"
250 <<: *buildman_and_testpy_dfn
251
252qemu_mips test.py:
253 tags: [ 'all' ]
254 variables:
255 TEST_PY_BD: "qemu_mips"
256 TEST_PY_TEST_SPEC: "not sleep"
1a62a722 257 BUILDMAN: "^qemu_mips$"
1a62a722
TR
258 <<: *buildman_and_testpy_dfn
259
260qemu_mipsel test.py:
261 tags: [ 'all' ]
262 variables:
263 TEST_PY_BD: "qemu_mipsel"
264 TEST_PY_TEST_SPEC: "not sleep"
1a62a722 265 BUILDMAN: "^qemu_mipsel$"
1a62a722
TR
266 <<: *buildman_and_testpy_dfn
267
268qemu_mips64 test.py:
269 tags: [ 'all' ]
270 variables:
271 TEST_PY_BD: "qemu_mips64"
272 TEST_PY_TEST_SPEC: "not sleep"
1a62a722 273 BUILDMAN: "^qemu_mips64$"
1a62a722
TR
274 <<: *buildman_and_testpy_dfn
275
276qemu_mips64el test.py:
277 tags: [ 'all' ]
278 variables:
279 TEST_PY_BD: "qemu_mips64el"
280 TEST_PY_TEST_SPEC: "not sleep"
1a62a722 281 BUILDMAN: "^qemu_mips64el$"
1a62a722
TR
282 <<: *buildman_and_testpy_dfn
283
284qemu-ppce500 test.py:
285 tags: [ 'all' ]
286 variables:
287 TEST_PY_BD: "qemu-ppce500"
288 TEST_PY_TEST_SPEC: "not sleep"
1a62a722 289 BUILDMAN: "^qemu-ppce500$"
1a62a722
TR
290 <<: *buildman_and_testpy_dfn
291
7298d82d
TR
292qemu-riscv64 test.py:
293 tags: [ 'all' ]
294 variables:
295 TEST_PY_BD: "qemu-riscv64"
296 TEST_PY_TEST_SPEC: "not sleep"
297 BUILDMAN: "^qemu-riscv64$"
298 <<: *buildman_and_testpy_dfn
299
1a62a722
TR
300qemu-x86 test.py:
301 tags: [ 'all' ]
302 variables:
303 TEST_PY_BD: "qemu-x86"
304 TEST_PY_TEST_SPEC: "not sleep"
1a62a722 305 BUILDMAN: "^qemu-x86$"
1a62a722
TR
306 <<: *buildman_and_testpy_dfn
307
308qemu-x86_64 test.py:
309 tags: [ 'all' ]
310 variables:
311 TEST_PY_BD: "qemu-x86_64"
312 TEST_PY_TEST_SPEC: "not sleep"
1a62a722 313 BUILDMAN: "^qemu-x86_64$"
1a62a722
TR
314 <<: *buildman_and_testpy_dfn
315
316zynq_zc702 test.py:
317 tags: [ 'all' ]
318 variables:
319 TEST_PY_BD: "zynq_zc702"
320 TEST_PY_TEST_SPEC: "not sleep"
1a62a722
TR
321 TEST_PY_ID: "--id qemu"
322 BUILDMAN: "^zynq_zc702$"
323 <<: *buildman_and_testpy_dfn
324
325xilinx_versal_virt test.py:
326 tags: [ 'all' ]
327 variables:
328 TEST_PY_BD: "xilinx_versal_virt"
329 TEST_PY_TEST_SPEC: "not sleep"
1a62a722
TR
330 TEST_PY_ID: "--id qemu"
331 BUILDMAN: "^xilinx_versal_virt$"
332 <<: *buildman_and_testpy_dfn
333
334xtfpga test.py:
335 tags: [ 'all' ]
336 variables:
337 TEST_PY_BD: "xtfpga"
338 TEST_PY_TEST_SPEC: "not sleep"
1a62a722
TR
339 TEST_PY_ID: "--id qemu"
340 BUILDMAN: "^xtfpga$"
1a62a722 341 <<: *buildman_and_testpy_dfn
This page took 0.084127 seconds and 4 git commands to generate.