]>
Commit | Line | Data |
---|---|---|
c7cb334d MR |
1 | # Copyright Roger Meier <r.meier@siemens.com> |
2 | # SPDX-License-Identifier: GPL-2.0+ | |
3 | ||
4 | # build U-Boot on Travis CI - https://travis-ci.org/ | |
5 | ||
2bb76f33 TR |
6 | sudo: required |
7 | dist: trusty | |
e4c1b4d8 | 8 | |
c7cb334d MR |
9 | language: c |
10 | ||
050c7569 RM |
11 | addons: |
12 | apt: | |
13 | packages: | |
14 | - cppcheck | |
15 | - sloccount | |
16 | - sparse | |
17 | - bc | |
18 | - build-essential | |
19 | - libsdl1.2-dev | |
07bf2122 SW |
20 | - python |
21 | - python-virtualenv | |
f2b0c007 TR |
22 | - swig |
23 | - libpython-dev | |
cd402e01 | 24 | - gcc-powerpc-linux-gnu |
cd402e01 | 25 | - iasl |
0e4e38ae AG |
26 | - grub-efi-ia32-bin |
27 | - rpm2cpio | |
28 | - wget | |
a0f3e3df | 29 | - device-tree-compiler |
c7cb334d MR |
30 | |
31 | install: | |
c7cb334d | 32 | # install latest device tree compiler |
a0f3e3df TR |
33 | #- git clone --depth=1 git://git.kernel.org/pub/scm/utils/dtc/dtc.git /tmp/dtc |
34 | #- make -j4 -C /tmp/dtc | |
5ac5861c TR |
35 | # Clone uboot-test-hooks |
36 | - git clone --depth=1 git://github.com/swarren/uboot-test-hooks.git /tmp/uboot-test-hooks | |
37 | - ln -s travis-ci /tmp/uboot-test-hooks/bin/`hostname` | |
38 | - ln -s travis-ci /tmp/uboot-test-hooks/py/`hostname` | |
c7cb334d | 39 | # prepare buildman environment |
43a68e49 | 40 | - echo -e "[toolchain]\nroot = /usr" > ~/.buildman |
8399538c TR |
41 | - echo -e "aarch64 = /tmp/gcc-linaro-6.3.1-2017.02-x86_64_aarch64-linux-gnu" >> ~/.buildman |
42 | - echo -e "arm = /tmp/gcc-linaro-6.3.1-2017.02-x86_64_arm-linux-gnueabihf" >> ~/.buildman | |
80e4bbfc | 43 | - echo -e "arc = /tmp/arc_gnu_2016.09_prebuilt_uclibc_le_archs_linux_install" >> ~/.buildman |
ea3310e8 | 44 | - echo -e "\n[toolchain-alias]\nsh = sh4\nopenrisc = or32" >> ~/.buildman |
c7cb334d | 45 | - cat ~/.buildman |
07bf2122 SW |
46 | - virtualenv /tmp/venv |
47 | - . /tmp/venv/bin/activate | |
48 | - pip install pytest | |
0e4e38ae AG |
49 | - grub-mkimage -o ~/grub_x86.efi -O i386-efi normal echo lsefimmap lsefi lsefisystab efinet tftp minicmd |
50 | - mkdir ~/grub2-arm | |
51 | - ( 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 ) | |
c7cb334d MR |
52 | |
53 | env: | |
54 | global: | |
3c643fb0 | 55 | - PATH=/tmp/dtc:/tmp/qemu-install/bin:/tmp/uboot-test-hooks/bin:$PATH |
e019660a | 56 | - PYTHONPATH=/tmp/uboot-test-hooks/py/travis-ci |
c7cb334d | 57 | - BUILD_DIR=build |
c7cb334d MR |
58 | - HOSTCC="cc" |
59 | - HOSTCXX="c++" | |
c7cb334d MR |
60 | |
61 | before_script: | |
050c7569 | 62 | # install toolchains based on TOOLCHAIN} variable |
050c7569 | 63 | - if [[ "${TOOLCHAIN}" == *m68k* ]]; then ./tools/buildman/buildman --fetch-arch m68k ; fi |
cd402e01 | 64 | - if [[ "${TOOLCHAIN}" == *microblaze* ]]; then ./tools/buildman/buildman --fetch-arch microblaze ; fi |
050c7569 | 65 | - if [[ "${TOOLCHAIN}" == *mips* ]]; then ./tools/buildman/buildman --fetch-arch mips ; fi |
cd402e01 TR |
66 | - if [[ "${TOOLCHAIN}" == *or32* ]]; then ./tools/buildman/buildman --fetch-arch or32 ; fi |
67 | - if [[ "${TOOLCHAIN}" == *sh4* ]]; then ./tools/buildman/buildman --fetch-arch sh4 ; fi | |
2ded4bf9 SW |
68 | - if [[ "${TOOLCHAIN}" == *x86_64* ]]; then |
69 | ./tools/buildman/buildman --fetch-arch x86_64; | |
70 | echo -e "\n[toolchain-prefix]\nx86 = ${HOME}/.buildman-toolchains/gcc-4.9.0-nolibc/x86_64-linux/bin/x86_64-linux-" >> ~/.buildman; | |
71 | fi | |
80e4bbfc AB |
72 | - if [[ "${TOOLCHAIN}" == arc ]]; then |
73 | wget https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases/download/arc-2016.09-release/arc_gnu_2016.09_prebuilt_uclibc_le_archs_linux_install.tar.gz && | |
74 | tar -C /tmp -xf arc_gnu_2016.09_prebuilt_uclibc_le_archs_linux_install.tar.gz; | |
75 | fi | |
cd402e01 | 76 | - if [[ "${TOOLCHAIN}" == *xtensa* ]]; then ./tools/buildman/buildman --fetch-arch xtensa ; fi |
8399538c TR |
77 | # If TOOLCHAIN is unset, we're on some flavour of ARM. |
78 | - if [[ "${TOOLCHAIN}" == "" ]]; then | |
79 | wget http://releases.linaro.org/components/toolchain/binaries/6.3-2017.02/aarch64-linux-gnu/gcc-linaro-6.3.1-2017.02-x86_64_aarch64-linux-gnu.tar.xz && | |
80 | wget http://releases.linaro.org/components/toolchain/binaries/6.3-2017.02/arm-linux-gnueabihf/gcc-linaro-6.3.1-2017.02-x86_64_arm-linux-gnueabihf.tar.xz && | |
81 | tar -C /tmp -xf gcc-linaro-6.3.1-2017.02-x86_64_aarch64-linux-gnu.tar.xz && | |
82 | tar -C /tmp -xf gcc-linaro-6.3.1-2017.02-x86_64_arm-linux-gnueabihf.tar.xz; | |
83 | fi | |
3c643fb0 TR |
84 | - if [[ "${QEMU_TARGET}" != "" ]]; then |
85 | git clone git://git.qemu.org/qemu.git /tmp/qemu; | |
86 | pushd /tmp/qemu; | |
87 | git submodule update --init dtc && | |
88 | git checkout v2.8.0-rc3 && | |
89 | ./configure --prefix=/tmp/qemu-install --target-list=${QEMU_TARGET} && | |
90 | make -j4 all install; | |
91 | popd; | |
92 | fi | |
c7cb334d MR |
93 | |
94 | script: | |
8304f053 SW |
95 | # Comments must be outside the command strings below, or the Travis parser |
96 | # will get confused. | |
97 | # | |
4899210c | 98 | # Exit code 129 means warnings only. |
050c7569 | 99 | - if [[ "${BUILDMAN}" != "" ]]; then |
4899210c | 100 | set +e; |
440d8467 | 101 | tools/buildman/buildman -P ${BUILDMAN}; |
0c5145fc | 102 | ret=$?; |
bf1c0889 | 103 | if [[ $ret -ne 0 && $ret -ne 129 ]]; then |
baade496 | 104 | tools/buildman/buildman -sdeP ${BUILDMAN}; |
0c5145fc SW |
105 | exit $ret; |
106 | fi; | |
050c7569 | 107 | fi |
8304f053 SW |
108 | # "not a_test_which_does_not_exist" is a dummy -k parameter which will |
109 | # never prevent any test from running. That way, we can always pass | |
110 | # "-k something" even when $TEST_PY_TEST_SPEC doesnt need a custom | |
111 | # value. | |
faec290f | 112 | - export UBOOT_TRAVIS_BUILD_DIR=`cd .. && pwd`/.bm-work/${TEST_PY_BD}; |
0e4e38ae AG |
113 | cp ~/grub_x86.efi $UBOOT_TRAVIS_BUILD_DIR/; |
114 | cp ~/grub2-arm/usr/lib/grub2/arm-efi/grub.efi $UBOOT_TRAVIS_BUILD_DIR/grub_arm.efi; | |
faec290f | 115 | if [[ "${TEST_PY_BD}" != "" ]]; then |
8304f053 SW |
116 | ./test/py/test.py --bd ${TEST_PY_BD} ${TEST_PY_ID} |
117 | -k "${TEST_PY_TEST_SPEC:-not a_test_which_does_not_exist}" | |
faec290f | 118 | --build-dir "$UBOOT_TRAVIS_BUILD_DIR"; |
8304f053 | 119 | fi |
c7cb334d MR |
120 | |
121 | matrix: | |
122 | include: | |
123 | # we need to build by vendor due to 50min time limit for builds | |
124 | # each env setting here is a dedicated build | |
80e4bbfc AB |
125 | - env: |
126 | - BUILDMAN="arc" | |
127 | TOOLCHAIN="arc" | |
050c7569 | 128 | - env: |
baade496 | 129 | - BUILDMAN="arm11" |
050c7569 | 130 | - env: |
baade496 | 131 | - BUILDMAN="arm7" |
c7cb334d | 132 | - env: |
050c7569 | 133 | - BUILDMAN="arm920t" |
baade496 TR |
134 | - env: |
135 | - JOB="arm926ejs" | |
136 | BUILDMAN="arm926ejs -x mx,siemens,atmel" | |
137 | - env: | |
138 | - BUILDMAN="arm946es" | |
c7cb334d | 139 | - env: |
daab59ac | 140 | - BUILDMAN="atmel" |
c7cb334d | 141 | - env: |
626662e4 | 142 | - BUILDMAN="aries" |
c7cb334d | 143 | - env: |
bb417f1c TR |
144 | - JOB="Freescale ARM32" |
145 | BUILDMAN="freescale -x powerpc,m68k,aarch64" | |
146 | - env: | |
147 | - JOB="Freescale AArch64" | |
30719e2b | 148 | BUILDMAN="freescale&aarch64" |
baade496 | 149 | - env: |
30719e2b TR |
150 | - JOB="i.MX6 (non-Freescale)" |
151 | BUILDMAN="mx6 -x freescale" | |
152 | - env: | |
153 | - JOB="i.MX (non-Freescale, non-i.MX6)" | |
154 | BUILDMAN="mx -x freescale,mx6" | |
dbd5df89 TR |
155 | - env: |
156 | - BUILDMAN="samsung" | |
baade496 TR |
157 | - env: |
158 | - BUILDMAN="sun4i" | |
159 | - env: | |
160 | - BUILDMAN="sun5i" | |
161 | - env: | |
162 | - BUILDMAN="sun6i" | |
163 | - env: | |
164 | - BUILDMAN="sun7i" | |
165 | - env: | |
8399538c | 166 | - BUILDMAN="sun8i" |
baade496 TR |
167 | - env: |
168 | - BUILDMAN="sun9i" | |
169 | - env: | |
170 | - BUILDMAN="sun50i" | |
171 | - env: | |
172 | - JOB="Catch-all ARM" | |
626662e4 | 173 | BUILDMAN="arm -x arm11,arm7,arm9,aarch64,atmel,aries,freescale,kirkwood,mvebu,siemens,tegra,uniphier,mx,samsung,sunxi,am33xx,omap3,omap4,omap5,pxa,rockchip" |
c7cb334d | 174 | - env: |
050c7569 | 175 | - BUILDMAN="sandbox x86" |
cd402e01 | 176 | TOOLCHAIN="x86_64" |
c7cb334d | 177 | - env: |
050c7569 | 178 | - BUILDMAN="kirkwood" |
0bf1bc44 SR |
179 | - env: |
180 | - BUILDMAN="mvebu" | |
baade496 TR |
181 | - env: |
182 | - BUILDMAN="pxa" | |
c7cb334d | 183 | - env: |
050c7569 RM |
184 | - BUILDMAN="m68k" |
185 | TOOLCHAIN="m68k" | |
76761e7f TR |
186 | - env: |
187 | - BUILDMAN="microblaze" | |
188 | TOOLCHAIN="microblaze" | |
c7cb334d | 189 | - env: |
050c7569 RM |
190 | - BUILDMAN="mips" |
191 | TOOLCHAIN="mips" | |
c7cb334d | 192 | - env: |
050c7569 | 193 | - BUILDMAN="mpc83xx" |
c7cb334d | 194 | - env: |
050c7569 | 195 | - BUILDMAN="mpc85xx -x freescale" |
d9aa0197 | 196 | - env: |
050c7569 | 197 | - BUILDMAN="mpc85xx -x t208xrdb -x t4qds -x t102* -x p1_p2_rdb_pc -x p1010rdb -x corenet_ds -x b4860qds -x sbc8548 -x bsc91*" |
d9aa0197 | 198 | - env: |
050c7569 | 199 | - BUILDMAN="t208xrdb t4qds t102*" |
8cb2101b | 200 | - env: |
afdf09ac TR |
201 | - BUILDMAN="p1_p2_rdb_pc" |
202 | - env: | |
203 | - BUILDMAN="p1010rdb" | |
d9aa0197 | 204 | - env: |
050c7569 | 205 | - BUILDMAN="corenet_ds b4860qds sbc8548 bsc91*" |
c7cb334d | 206 | - env: |
050c7569 | 207 | - BUILDMAN="mpc86xx" |
53193a4f CL |
208 | - env: |
209 | - BUILDMAN="mpc8xx" | |
c7cb334d | 210 | - env: |
050c7569 | 211 | - BUILDMAN="siemens" |
1fcf0ee9 | 212 | - env: |
5eba31c3 | 213 | - BUILDMAN="tegra" |
050c7569 | 214 | - env: |
baade496 TR |
215 | - JOB="am33xx" |
216 | BUILDMAN="am33xx -x siemens" | |
217 | - env: | |
218 | - BUILDMAN="omap3" | |
219 | - env: | |
220 | - BUILDMAN="omap4" | |
221 | - env: | |
222 | - BUILDMAN="omap5" | |
050c7569 | 223 | - env: |
5eba31c3 TR |
224 | - BUILDMAN="uniphier" |
225 | - env: | |
0bf1bc44 | 226 | - BUILDMAN="aarch64 -x tegra,freescale,mvebu,uniphier,sunxi,samsung,rockchip" |
dbd5df89 TR |
227 | - env: |
228 | - BUILDMAN="rockchip" | |
76761e7f TR |
229 | - env: |
230 | - BUILDMAN="sh4" | |
231 | TOOLCHAIN="sh4" | |
232 | - env: | |
233 | - BUILDMAN="xtensa" | |
234 | TOOLCHAIN="xtensa" | |
c7cb334d MR |
235 | |
236 | # QA jobs for code analytics | |
237 | # static code analysis with cppcheck (we can add --enable=all later) | |
d7882210 SW |
238 | - env: |
239 | - JOB="cppcheck" | |
240 | script: | |
c85b52e4 | 241 | - cppcheck --force --quiet --inline-suppr . |
c7cb334d | 242 | # search for TODO within source tree |
d7882210 SW |
243 | - env: |
244 | - JOB="grep TODO" | |
245 | script: | |
c85b52e4 | 246 | - grep -r TODO . |
c7cb334d | 247 | # search for FIXME within source tree |
d7882210 SW |
248 | - env: |
249 | - JOB="grep FIXME HACK" | |
250 | script: | |
c85b52e4 | 251 | - grep -r FIXME . |
c7cb334d | 252 | # search for HACK within source tree and ignore HACKKIT board |
c7cb334d MR |
253 | script: |
254 | - grep -r HACK . | grep -v HACKKIT | |
255 | # some statistics about the code base | |
d7882210 SW |
256 | - env: |
257 | - JOB="sloccount" | |
258 | script: | |
c85b52e4 | 259 | - sloccount . |
8304f053 | 260 | |
07bf2122 | 261 | # test/py |
d7882210 | 262 | - env: |
8304f053 SW |
263 | - TEST_PY_BD="sandbox" |
264 | BUILDMAN="^sandbox$" | |
265 | TOOLCHAIN="x86_64" | |
5ac5861c | 266 | - env: |
8304f053 SW |
267 | - TEST_PY_BD="vexpress_ca15_tc2" |
268 | TEST_PY_ID="--id qemu" | |
3c643fb0 | 269 | QEMU_TARGET="arm-softmmu" |
8304f053 | 270 | BUILDMAN="^vexpress_ca15_tc2$" |
5ac5861c | 271 | - env: |
8304f053 SW |
272 | - TEST_PY_BD="vexpress_ca9x4" |
273 | TEST_PY_ID="--id qemu" | |
3c643fb0 | 274 | QEMU_TARGET="arm-softmmu" |
8304f053 | 275 | BUILDMAN="^vexpress_ca9x4$" |
5ac5861c | 276 | - env: |
8304f053 | 277 | - TEST_PY_BD="integratorcp_cm926ejs" |
78992845 | 278 | TEST_PY_TEST_SPEC="not sleep" |
8304f053 | 279 | TEST_PY_ID="--id qemu" |
3c643fb0 | 280 | QEMU_TARGET="arm-softmmu" |
8304f053 | 281 | BUILDMAN="^integratorcp_cm926ejs$" |
5ac5861c | 282 | - env: |
8304f053 SW |
283 | - TEST_PY_BD="qemu_mips" |
284 | TEST_PY_TEST_SPEC="not sleep" | |
3c643fb0 | 285 | QEMU_TARGET="mips-softmmu" |
8304f053 SW |
286 | BUILDMAN="^qemu_mips$" |
287 | TOOLCHAIN="mips" | |
288 | - env: | |
289 | - TEST_PY_BD="qemu_mipsel" | |
290 | TEST_PY_TEST_SPEC="not sleep" | |
3c643fb0 | 291 | QEMU_TARGET="mipsel-softmmu" |
8304f053 SW |
292 | BUILDMAN="^qemu_mipsel$" |
293 | TOOLCHAIN="mips" | |
294 | - env: | |
295 | - TEST_PY_BD="qemu_mips64" | |
296 | TEST_PY_TEST_SPEC="not sleep" | |
3c643fb0 | 297 | QEMU_TARGET="mips64-softmmu" |
8304f053 SW |
298 | BUILDMAN="^qemu_mips64$" |
299 | TOOLCHAIN="mips" | |
300 | - env: | |
301 | - TEST_PY_BD="qemu_mips64el" | |
302 | TEST_PY_TEST_SPEC="not sleep" | |
3c643fb0 | 303 | QEMU_TARGET="mips64el-softmmu" |
8304f053 SW |
304 | BUILDMAN="^qemu_mips64el$" |
305 | TOOLCHAIN="mips" | |
306 | - env: | |
307 | - TEST_PY_BD="qemu-ppce500" | |
308 | TEST_PY_TEST_SPEC="not sleep" | |
3c643fb0 | 309 | QEMU_TARGET="ppc-softmmu" |
8304f053 SW |
310 | BUILDMAN="^qemu-ppce500$" |
311 | - env: | |
312 | - TEST_PY_BD="qemu-x86" | |
313 | TEST_PY_TEST_SPEC="not sleep" | |
3c643fb0 | 314 | QEMU_TARGET="i386-softmmu" |
8304f053 SW |
315 | BUILDMAN="^qemu-x86$" |
316 | TOOLCHAIN="x86_64" | |
317 | BUILD_ROM="yes" | |
41122d37 MS |
318 | - env: |
319 | - TEST_PY_BD="zynq_zc702" | |
320 | TEST_PY_TEST_SPEC="not sleep" | |
321 | QEMU_TARGET="arm-softmmu" | |
322 | TEST_PY_ID="--id qemu" | |
323 | BUILDMAN="^zynq_zc702$" | |
c7cb334d | 324 | |
c7cb334d | 325 | # TODO make it perfect ;-r |