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