1 # Copyright Roger Meier <r.meier@siemens.com>
2 # SPDX-License-Identifier: GPL-2.0+
4 # build U-Boot on Travis CI - https://travis-ci.org/
24 - gcc-powerpc-linux-gnu
25 - gcc-arm-linux-gnueabihf
26 - gcc-aarch64-linux-gnu
31 - device-tree-compiler
34 # install latest device tree compiler
35 #- git clone --depth=1 git://git.kernel.org/pub/scm/utils/dtc/dtc.git /tmp/dtc
36 #- make -j4 -C /tmp/dtc
37 # Clone uboot-test-hooks
38 - git clone --depth=1 git://github.com/swarren/uboot-test-hooks.git /tmp/uboot-test-hooks
39 - ln -s travis-ci /tmp/uboot-test-hooks/bin/`hostname`
40 - ln -s travis-ci /tmp/uboot-test-hooks/py/`hostname`
41 # prepare buildman environment
42 - echo -e "[toolchain]\nroot = /usr" > ~/.buildman
43 - echo -e "\n[toolchain-alias]\nblackfin = bfin\nsh = sh4\nopenrisc = or32" >> ~/.buildman
45 - virtualenv /tmp/venv
46 - . /tmp/venv/bin/activate
48 - grub-mkimage -o ~/grub_x86.efi -O i386-efi normal echo lsefimmap lsefi lsefisystab efinet tftp minicmd
50 - ( 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 )
54 - PATH=/tmp/dtc:/tmp/qemu-install/bin:/tmp/uboot-test-hooks/bin:$PATH
55 - PYTHONPATH=/tmp/uboot-test-hooks/py/travis-ci
61 # install toolchains based on TOOLCHAIN} variable
62 - if [[ "${TOOLCHAIN}" == *avr32* ]]; then ./tools/buildman/buildman --fetch-arch avr32 ; fi
63 - if [[ "${TOOLCHAIN}" == *bfin* ]]; then ./tools/buildman/buildman --fetch-arch bfin ; fi
64 - if [[ "${TOOLCHAIN}" == *m68k* ]]; then ./tools/buildman/buildman --fetch-arch m68k ; fi
65 - if [[ "${TOOLCHAIN}" == *microblaze* ]]; then ./tools/buildman/buildman --fetch-arch microblaze ; fi
66 - if [[ "${TOOLCHAIN}" == *mips* ]]; then ./tools/buildman/buildman --fetch-arch mips ; fi
67 - if [[ "${TOOLCHAIN}" == *or32* ]]; then ./tools/buildman/buildman --fetch-arch or32 ; fi
68 - if [[ "${TOOLCHAIN}" == *sh4* ]]; then ./tools/buildman/buildman --fetch-arch sh4 ; fi
69 - if [[ "${TOOLCHAIN}" == *x86_64* ]]; then
70 ./tools/buildman/buildman --fetch-arch x86_64;
71 echo -e "\n[toolchain-prefix]\nx86 = ${HOME}/.buildman-toolchains/gcc-4.9.0-nolibc/x86_64-linux/bin/x86_64-linux-" >> ~/.buildman;
73 - if [[ "${TOOLCHAIN}" == *xtensa* ]]; then ./tools/buildman/buildman --fetch-arch xtensa ; fi
74 - if [[ "${QEMU_TARGET}" != "" ]]; then
75 git clone git://git.qemu.org/qemu.git /tmp/qemu;
77 git submodule update --init dtc &&
78 git checkout v2.8.0-rc3 &&
79 ./configure --prefix=/tmp/qemu-install --target-list=${QEMU_TARGET} &&
85 # Comments must be outside the command strings below, or the Travis parser
88 # Exit code 129 means warnings only.
89 - if [[ "${BUILDMAN}" != "" ]]; then
91 tools/buildman/buildman -P ${BUILDMAN};
93 if [[ $ret -ne 0 && $ret -ne 129 ]]; then
94 tools/buildman/buildman -sdeP ${BUILDMAN};
98 # "not a_test_which_does_not_exist" is a dummy -k parameter which will
99 # never prevent any test from running. That way, we can always pass
100 # "-k something" even when $TEST_PY_TEST_SPEC doesnt need a custom
102 - export UBOOT_TRAVIS_BUILD_DIR=`cd .. && pwd`/.bm-work/${TEST_PY_BD};
103 cp ~/grub_x86.efi $UBOOT_TRAVIS_BUILD_DIR/;
104 cp ~/grub2-arm/usr/lib/grub2/arm-efi/grub.efi $UBOOT_TRAVIS_BUILD_DIR/grub_arm.efi;
105 if [[ "${TEST_PY_BD}" != "" ]]; then
106 ./test/py/test.py --bd ${TEST_PY_BD} ${TEST_PY_ID}
107 -k "${TEST_PY_TEST_SPEC:-not a_test_which_does_not_exist}"
108 --build-dir "$UBOOT_TRAVIS_BUILD_DIR";
113 # we need to build by vendor due to 50min time limit for builds
114 # each env setting here is a dedicated build
123 BUILDMAN="arm926ejs -x mx,siemens,atmel"
125 - BUILDMAN="arm946es"
127 - BUILDMAN="atmel -x avr32"
134 - JOB="Freescale ARM32"
135 BUILDMAN="freescale -x powerpc,m68k,aarch64"
137 - JOB="Freescale AArch64"
138 BUILDMAN="freescale&aarch64"
140 - JOB="i.MX6 (non-Freescale)"
141 BUILDMAN="mx6 -x freescale"
143 - JOB="i.MX (non-Freescale, non-i.MX6)"
144 BUILDMAN="mx -x freescale,mx6"
162 - JOB="Catch-all ARM"
163 BUILDMAN="arm -x arm11,arm7,arm9,aarch64,atmel,denx,freescale,kirkwood,mvebu,siemens,tegra,uniphier,mx,samsung,sunxi,am33xx,omap3,omap4,omap5,pxa,rockchip"
165 - BUILDMAN="sandbox x86"
168 - BUILDMAN="kirkwood"
177 - BUILDMAN="microblaze"
178 TOOLCHAIN="microblaze"
193 - BUILDMAN="mpc85xx -x freescale"
195 - BUILDMAN="mpc85xx -x t208xrdb -x t4qds -x t102* -x p1_p2_rdb_pc -x p1010rdb -x corenet_ds -x b4860qds -x sbc8548 -x bsc91*"
197 - BUILDMAN="t208xrdb t4qds t102*"
199 - BUILDMAN="p1_p2_rdb_pc"
201 - BUILDMAN="p1010rdb"
203 - BUILDMAN="corenet_ds b4860qds sbc8548 bsc91*"
214 BUILDMAN="am33xx -x siemens"
222 - BUILDMAN="uniphier"
224 - BUILDMAN="aarch64 -x tegra,freescale,mvebu,uniphier,sunxi,samsung,rockchip"
227 - BUILDMAN="rockchip"
235 # QA jobs for code analytics
236 # static code analysis with cppcheck (we can add --enable=all later)
240 - cppcheck --force --quiet --inline-suppr .
241 # search for TODO within source tree
246 # search for FIXME within source tree
248 - JOB="grep FIXME HACK"
251 # search for HACK within source tree and ignore HACKKIT board
253 - grep -r HACK . | grep -v HACKKIT
254 # some statistics about the code base
262 - TEST_PY_BD="sandbox"
266 - TEST_PY_BD="vexpress_ca15_tc2"
267 TEST_PY_ID="--id qemu"
268 QEMU_TARGET="arm-softmmu"
269 BUILDMAN="^vexpress_ca15_tc2$"
271 - TEST_PY_BD="vexpress_ca9x4"
272 TEST_PY_ID="--id qemu"
273 QEMU_TARGET="arm-softmmu"
274 BUILDMAN="^vexpress_ca9x4$"
276 - TEST_PY_BD="integratorcp_cm926ejs"
277 TEST_PY_TEST_SPEC="not sleep"
278 TEST_PY_ID="--id qemu"
279 QEMU_TARGET="arm-softmmu"
280 BUILDMAN="^integratorcp_cm926ejs$"
282 - TEST_PY_BD="qemu_mips"
283 TEST_PY_TEST_SPEC="not sleep"
284 QEMU_TARGET="mips-softmmu"
285 BUILDMAN="^qemu_mips$"
288 - TEST_PY_BD="qemu_mipsel"
289 TEST_PY_TEST_SPEC="not sleep"
290 QEMU_TARGET="mipsel-softmmu"
291 BUILDMAN="^qemu_mipsel$"
294 - TEST_PY_BD="qemu_mips64"
295 TEST_PY_TEST_SPEC="not sleep"
296 QEMU_TARGET="mips64-softmmu"
297 BUILDMAN="^qemu_mips64$"
300 - TEST_PY_BD="qemu_mips64el"
301 TEST_PY_TEST_SPEC="not sleep"
302 QEMU_TARGET="mips64el-softmmu"
303 BUILDMAN="^qemu_mips64el$"
306 - TEST_PY_BD="qemu-ppce500"
307 TEST_PY_TEST_SPEC="not sleep"
308 QEMU_TARGET="ppc-softmmu"
309 BUILDMAN="^qemu-ppce500$"
311 - TEST_PY_BD="qemu-x86"
312 TEST_PY_TEST_SPEC="not sleep"
313 QEMU_TARGET="i386-softmmu"
314 BUILDMAN="^qemu-x86$"
318 - TEST_PY_BD="zynq_zc702"
319 TEST_PY_TEST_SPEC="not sleep"
320 QEMU_TARGET="arm-softmmu"
321 TEST_PY_ID="--id qemu"
322 BUILDMAN="^zynq_zc702$"
324 # TODO make it perfect ;-r