]>
Commit | Line | Data |
---|---|---|
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 | |
717e779f | 5 | image: trini/u-boot-gitlab-ci-runner:bionic-20200526-18Jun2020 |
1a62a722 TR |
6 | |
7 | # We run some tests in different order, to catch some failures quicker. | |
8 | stages: | |
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 | 23 | - cp /opt/grub/grubriscv64.efi ~/grub_riscv64.efi |
a379d330 | 24 | - cp /opt/grub/grubriscv32.efi ~/grub_riscv32.efi |
24df1b14 HS |
25 | - cp /opt/grub/grubaa64.efi ~/grub_arm64.efi |
26 | - cp /opt/grub/grubarm.efi ~/grub_arm.efi | |
49fb28a4 BM |
27 | - if [[ "${TEST_PY_BD}" == "qemu-riscv32_spl" ]]; then |
28 | wget -O - https://github.com/riscv/opensbi/releases/download/v0.6/opensbi-0.6-rv32-bin.tar.xz | tar -C /tmp -xJ; | |
29 | export OPENSBI=/tmp/opensbi-0.6-rv32-bin/platform/qemu/virt/firmware/fw_dynamic.bin; | |
30 | fi | |
31 | - if [[ "${TEST_PY_BD}" == "qemu-riscv64_spl" ]]; then | |
32 | wget -O - https://github.com/riscv/opensbi/releases/download/v0.6/opensbi-0.6-rv64-bin.tar.xz | tar -C /tmp -xJ; | |
33 | export OPENSBI=/tmp/opensbi-0.6-rv64-bin/platform/qemu/virt/firmware/fw_dynamic.bin; | |
34 | fi | |
b29cb058 | 35 | |
1a62a722 | 36 | after_script: |
24df1b14 | 37 | - rm -rf /tmp/uboot-test-hooks /tmp/venv |
1a62a722 | 38 | script: |
dd5c954e | 39 | # If we've been asked to use clang only do one configuration. |
4e32fed4 | 40 | - export UBOOT_TRAVIS_BUILD_DIR=/tmp/${TEST_PY_BD} |
7ec1255c SG |
41 | - tools/buildman/buildman -o ${UBOOT_TRAVIS_BUILD_DIR} -w -E -W -e |
42 | --board ${TEST_PY_BD} ${OVERRIDE} | |
085b8978 TR |
43 | - virtualenv -p /usr/bin/python3 /tmp/venv |
44 | - . /tmp/venv/bin/activate | |
45 | - pip install -r test/py/requirements.txt | |
4080d097 | 46 | # "${var:+"-k $var"}" expands to "" if $var is empty, "-k $var" if not |
4e32fed4 | 47 | - export PATH=/opt/qemu/bin:/tmp/uboot-test-hooks/bin:${PATH}; |
1a62a722 | 48 | export PYTHONPATH=/tmp/uboot-test-hooks/py/travis-ci; |
5bd95d63 | 49 | ./test/py/test.py --bd ${TEST_PY_BD} ${TEST_PY_ID} |
4080d097 | 50 | ${TEST_PY_TEST_SPEC:+"-k ${TEST_PY_TEST_SPEC}"} |
cec1e856 | 51 | --build-dir "$UBOOT_TRAVIS_BUILD_DIR" |
1a62a722 | 52 | |
a11cb57d | 53 | build all 32bit ARM platforms: |
1a62a722 TR |
54 | tags: [ 'all' ] |
55 | stage: world build | |
56 | script: | |
57 | - ret=0; | |
dd5c954e SG |
58 | ./tools/buildman/buildman -o /tmp -P -E -W arm -x aarch64 || ret=$?; |
59 | if [[ $ret -ne 0 ]]; then | |
b52f5a19 | 60 | ./tools/buildman/buildman -o /tmp -seP; |
4c749971 TR |
61 | exit $ret; |
62 | fi; | |
9f7bda10 | 63 | |
a11cb57d | 64 | build all 64bit ARM platforms: |
9f7bda10 TR |
65 | tags: [ 'all' ] |
66 | stage: world build | |
67 | script: | |
26a426a1 | 68 | - virtualenv -p /usr/bin/python3 /tmp/venv |
f0db8395 TR |
69 | - . /tmp/venv/bin/activate |
70 | - pip install pyelftools | |
9f7bda10 | 71 | - ret=0; |
dd5c954e SG |
72 | ./tools/buildman/buildman -o /tmp -P -E -W aarch64 || ret=$?; |
73 | if [[ $ret -ne 0 ]]; then | |
b52f5a19 | 74 | ./tools/buildman/buildman -o /tmp -seP; |
4c749971 TR |
75 | exit $ret; |
76 | fi; | |
9f7bda10 | 77 | |
a11cb57d | 78 | build all PowerPC platforms: |
9f7bda10 TR |
79 | tags: [ 'all' ] |
80 | stage: world build | |
81 | script: | |
82 | - ret=0; | |
dd5c954e SG |
83 | ./tools/buildman/buildman -o /tmp -P -E -W powerpc || ret=$?; |
84 | if [[ $ret -ne 0 ]]; then | |
b52f5a19 | 85 | ./tools/buildman/buildman -o /tmp -seP; |
4c749971 TR |
86 | exit $ret; |
87 | fi; | |
9f7bda10 | 88 | |
a11cb57d | 89 | build all other platforms: |
9f7bda10 TR |
90 | tags: [ 'all' ] |
91 | stage: world build | |
92 | script: | |
93 | - ret=0; | |
dd5c954e SG |
94 | ./tools/buildman/buildman -o /tmp -P -E -W -x arm,powerpc || ret=$?; |
95 | if [[ $ret -ne 0 ]]; then | |
b52f5a19 | 96 | ./tools/buildman/buildman -o /tmp -seP; |
4c749971 TR |
97 | exit $ret; |
98 | fi; | |
1a62a722 TR |
99 | |
100 | # QA jobs for code analytics | |
101 | # static code analysis with cppcheck (we can add --enable=all later) | |
102 | cppcheck: | |
103 | tags: [ 'all' ] | |
104 | stage: testsuites | |
105 | script: | |
4ee7f527 | 106 | - cppcheck -j$(nproc) --force --quiet --inline-suppr . |
1a62a722 TR |
107 | |
108 | # search for TODO within source tree | |
109 | grep TODO/FIXME/HACK: | |
110 | tags: [ 'all' ] | |
111 | stage: testsuites | |
112 | script: | |
113 | - grep -r TODO . | |
114 | - grep -r FIXME . | |
115 | # search for HACK within source tree and ignore HACKKIT board | |
116 | - grep -r HACK . | grep -v HACKKIT | |
117 | ||
3eb7b78b HS |
118 | # build HTML documentation |
119 | htmldocs: | |
120 | tags: [ 'all' ] | |
121 | stage: testsuites | |
122 | script: | |
123 | - make htmldocs | |
124 | ||
1a62a722 TR |
125 | # some statistics about the code base |
126 | sloccount: | |
127 | tags: [ 'all' ] | |
128 | stage: testsuites | |
129 | script: | |
130 | - sloccount . | |
131 | ||
132 | # ensure all configs have MAINTAINERS entries | |
133 | Check 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 | |
140 | Build 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 |
147 | Build envtools: | |
148 | tags: [ 'all' ] | |
149 | stage: testsuites | |
150 | script: | |
151 | - make tools-only_config envtools -j$(nproc) | |
152 | ||
7261833f | 153 | Run binman, buildman, dtoc, Kconfig 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; | |
26a426a1 | 160 | virtualenv -p /usr/bin/python3 /tmp/venv; |
d7ae9321 | 161 | . /tmp/venv/bin/activate; |
7261833f | 162 | pip install pyelftools pytest; |
bf0a8133 | 163 | export UBOOT_TRAVIS_BUILD_DIR=/tmp/sandbox_spl; |
d7ae9321 TR |
164 | export PYTHONPATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt"; |
165 | export PATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc:${PATH}"; | |
bf0a8133 | 166 | ./tools/buildman/buildman -o ${UBOOT_TRAVIS_BUILD_DIR} -w 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; | |
7261833f TR |
170 | ./tools/patman/patman --test; |
171 | make testconfig | |
1a62a722 | 172 | |
6cfd09d4 T |
173 | Run tests for Nokia RX-51 (aka N900): |
174 | tags: [ 'all' ] | |
175 | stage: testsuites | |
176 | script: | |
177 | - ./tools/buildman/buildman --fetch-arch arm; | |
178 | export PATH=~/.buildman-toolchains/gcc-9.2.0-nolibc/arm-linux-gnueabi/bin/:$PATH; | |
179 | test/nokia_rx51_test.sh | |
180 | ||
1a62a722 TR |
181 | # Test sandbox with test.py |
182 | sandbox test.py: | |
183 | tags: [ 'all' ] | |
184 | variables: | |
185 | TEST_PY_BD: "sandbox" | |
1a62a722 TR |
186 | <<: *buildman_and_testpy_dfn |
187 | ||
0219d014 TR |
188 | sandbox with clang test.py: |
189 | tags: [ 'all' ] | |
190 | variables: | |
191 | TEST_PY_BD: "sandbox" | |
c8790bee | 192 | OVERRIDE: "-O clang-10" |
0219d014 TR |
193 | <<: *buildman_and_testpy_dfn |
194 | ||
1a62a722 TR |
195 | sandbox_spl test.py: |
196 | tags: [ 'all' ] | |
197 | variables: | |
198 | TEST_PY_BD: "sandbox_spl" | |
e28e9db6 | 199 | TEST_PY_TEST_SPEC: "test_ofplatdata or test_handoff" |
1a62a722 TR |
200 | <<: *buildman_and_testpy_dfn |
201 | ||
699c0b93 TR |
202 | evb-ast2500 test.py: |
203 | tags: [ 'all' ] | |
204 | variables: | |
205 | TEST_PY_BD: "evb-ast2500" | |
206 | TEST_PY_ID: "--id qemu" | |
699c0b93 TR |
207 | <<: *buildman_and_testpy_dfn |
208 | ||
1a62a722 TR |
209 | sandbox_flattree test.py: |
210 | tags: [ 'all' ] | |
211 | variables: | |
212 | TEST_PY_BD: "sandbox_flattree" | |
1a62a722 TR |
213 | <<: *buildman_and_testpy_dfn |
214 | ||
215 | vexpress_ca15_tc2 test.py: | |
216 | tags: [ 'all' ] | |
217 | variables: | |
218 | TEST_PY_BD: "vexpress_ca15_tc2" | |
219 | TEST_PY_ID: "--id qemu" | |
1a62a722 TR |
220 | <<: *buildman_and_testpy_dfn |
221 | ||
222 | vexpress_ca9x4 test.py: | |
223 | tags: [ 'all' ] | |
224 | variables: | |
225 | TEST_PY_BD: "vexpress_ca9x4" | |
226 | TEST_PY_ID: "--id qemu" | |
1a62a722 TR |
227 | <<: *buildman_and_testpy_dfn |
228 | ||
229 | integratorcp_cm926ejs test.py: | |
230 | tags: [ 'all' ] | |
231 | variables: | |
232 | TEST_PY_BD: "integratorcp_cm926ejs" | |
233 | TEST_PY_TEST_SPEC: "not sleep" | |
234 | TEST_PY_ID: "--id qemu" | |
1a62a722 TR |
235 | <<: *buildman_and_testpy_dfn |
236 | ||
237 | qemu_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_and_testpy_dfn |
243 | ||
244 | qemu_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_and_testpy_dfn |
250 | ||
251 | qemu_mips test.py: | |
252 | tags: [ 'all' ] | |
253 | variables: | |
254 | TEST_PY_BD: "qemu_mips" | |
255 | TEST_PY_TEST_SPEC: "not sleep" | |
1a62a722 TR |
256 | <<: *buildman_and_testpy_dfn |
257 | ||
258 | qemu_mipsel test.py: | |
259 | tags: [ 'all' ] | |
260 | variables: | |
261 | TEST_PY_BD: "qemu_mipsel" | |
262 | TEST_PY_TEST_SPEC: "not sleep" | |
1a62a722 TR |
263 | <<: *buildman_and_testpy_dfn |
264 | ||
265 | qemu_mips64 test.py: | |
266 | tags: [ 'all' ] | |
267 | variables: | |
268 | TEST_PY_BD: "qemu_mips64" | |
269 | TEST_PY_TEST_SPEC: "not sleep" | |
1a62a722 TR |
270 | <<: *buildman_and_testpy_dfn |
271 | ||
272 | qemu_mips64el test.py: | |
273 | tags: [ 'all' ] | |
274 | variables: | |
275 | TEST_PY_BD: "qemu_mips64el" | |
276 | TEST_PY_TEST_SPEC: "not sleep" | |
1a62a722 TR |
277 | <<: *buildman_and_testpy_dfn |
278 | ||
279 | qemu-ppce500 test.py: | |
280 | tags: [ 'all' ] | |
281 | variables: | |
282 | TEST_PY_BD: "qemu-ppce500" | |
283 | TEST_PY_TEST_SPEC: "not sleep" | |
1a62a722 TR |
284 | <<: *buildman_and_testpy_dfn |
285 | ||
a379d330 BM |
286 | qemu-riscv32 test.py: |
287 | tags: [ 'all' ] | |
288 | variables: | |
289 | TEST_PY_BD: "qemu-riscv32" | |
290 | TEST_PY_TEST_SPEC: "not sleep" | |
a379d330 BM |
291 | <<: *buildman_and_testpy_dfn |
292 | ||
7298d82d TR |
293 | qemu-riscv64 test.py: |
294 | tags: [ 'all' ] | |
295 | variables: | |
296 | TEST_PY_BD: "qemu-riscv64" | |
297 | TEST_PY_TEST_SPEC: "not sleep" | |
49fb28a4 BM |
298 | <<: *buildman_and_testpy_dfn |
299 | ||
300 | qemu-riscv32_spl test.py: | |
301 | tags: [ 'all' ] | |
302 | variables: | |
303 | TEST_PY_BD: "qemu-riscv32_spl" | |
304 | TEST_PY_TEST_SPEC: "not sleep" | |
49fb28a4 BM |
305 | <<: *buildman_and_testpy_dfn |
306 | ||
307 | qemu-riscv64_spl test.py: | |
308 | tags: [ 'all' ] | |
309 | variables: | |
310 | TEST_PY_BD: "qemu-riscv64_spl" | |
311 | TEST_PY_TEST_SPEC: "not sleep" | |
7298d82d TR |
312 | <<: *buildman_and_testpy_dfn |
313 | ||
1a62a722 TR |
314 | qemu-x86 test.py: |
315 | tags: [ 'all' ] | |
316 | variables: | |
317 | TEST_PY_BD: "qemu-x86" | |
318 | TEST_PY_TEST_SPEC: "not sleep" | |
1a62a722 TR |
319 | <<: *buildman_and_testpy_dfn |
320 | ||
321 | qemu-x86_64 test.py: | |
322 | tags: [ 'all' ] | |
323 | variables: | |
324 | TEST_PY_BD: "qemu-x86_64" | |
325 | TEST_PY_TEST_SPEC: "not sleep" | |
1a62a722 TR |
326 | <<: *buildman_and_testpy_dfn |
327 | ||
f7c6ee7f | 328 | xilinx_zynq_virt test.py: |
1a62a722 TR |
329 | tags: [ 'all' ] |
330 | variables: | |
f7c6ee7f | 331 | TEST_PY_BD: "xilinx_zynq_virt" |
1a62a722 | 332 | TEST_PY_TEST_SPEC: "not sleep" |
1a62a722 | 333 | TEST_PY_ID: "--id qemu" |
1a62a722 TR |
334 | <<: *buildman_and_testpy_dfn |
335 | ||
336 | xilinx_versal_virt test.py: | |
337 | tags: [ 'all' ] | |
338 | variables: | |
339 | TEST_PY_BD: "xilinx_versal_virt" | |
340 | TEST_PY_TEST_SPEC: "not sleep" | |
1a62a722 | 341 | TEST_PY_ID: "--id qemu" |
1a62a722 TR |
342 | <<: *buildman_and_testpy_dfn |
343 | ||
344 | xtfpga test.py: | |
345 | tags: [ 'all' ] | |
346 | variables: | |
347 | TEST_PY_BD: "xtfpga" | |
348 | TEST_PY_TEST_SPEC: "not sleep" | |
1a62a722 | 349 | TEST_PY_ID: "--id qemu" |
1a62a722 | 350 | <<: *buildman_and_testpy_dfn |