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/
14 - sourceline: 'ppa:gns3/qemu'
28 - gcc-powerpc-linux-gnu
29 - gcc-arm-linux-gnueabihf
30 - gcc-aarch64-linux-gnu
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
51 - PATH=/tmp/dtc:/tmp/uboot-test-hooks/bin:$PATH
57 # install toolchains based on TOOLCHAIN} variable
58 - if [[ "${TOOLCHAIN}" == *avr32* ]]; then ./tools/buildman/buildman --fetch-arch avr32 ; fi
59 - if [[ "${TOOLCHAIN}" == *bfin* ]]; then ./tools/buildman/buildman --fetch-arch bfin ; fi
60 - if [[ "${TOOLCHAIN}" == *m68k* ]]; then ./tools/buildman/buildman --fetch-arch m68k ; fi
61 - if [[ "${TOOLCHAIN}" == *microblaze* ]]; then ./tools/buildman/buildman --fetch-arch microblaze ; fi
62 - if [[ "${TOOLCHAIN}" == *mips* ]]; then ./tools/buildman/buildman --fetch-arch mips ; fi
63 - if [[ "${TOOLCHAIN}" == *or32* ]]; then ./tools/buildman/buildman --fetch-arch or32 ; fi
64 - if [[ "${TOOLCHAIN}" == *sh4* ]]; then ./tools/buildman/buildman --fetch-arch sh4 ; fi
65 - if [[ "${TOOLCHAIN}" == *x86_64* ]]; then
66 ./tools/buildman/buildman --fetch-arch x86_64;
67 echo -e "\n[toolchain-prefix]\nx86 = ${HOME}/.buildman-toolchains/gcc-4.9.0-nolibc/x86_64-linux/bin/x86_64-linux-" >> ~/.buildman;
69 - if [[ "${TOOLCHAIN}" == *xtensa* ]]; then ./tools/buildman/buildman --fetch-arch xtensa ; fi
72 # Comments must be outside the command strings below, or the Travis parser
75 # Exit code 129 means warnings only.
76 - if [[ "${BUILDMAN}" != "" ]]; then
78 tools/buildman/buildman -P ${BUILDMAN};
80 if [[ $ret -ne 0 && $ret -ne 129 ]]; then
81 tools/buildman/buildman -sdeP ${BUILDMAN};
85 # "not a_test_which_does_not_exist" is a dummy -k parameter which will
86 # never prevent any test from running. That way, we can always pass
87 # "-k something" even when $TEST_PY_TEST_SPEC doesnt need a custom
89 - export UBOOT_TRAVIS_BUILD_DIR=`cd .. && pwd`/.bm-work/${TEST_PY_BD};
90 if [[ "${TEST_PY_BD}" != "" ]]; then
91 ./test/py/test.py --bd ${TEST_PY_BD} ${TEST_PY_ID}
92 -k "${TEST_PY_TEST_SPEC:-not a_test_which_does_not_exist}"
93 --build-dir "$UBOOT_TRAVIS_BUILD_DIR";
98 # we need to build by vendor due to 50min time limit for builds
99 # each env setting here is a dedicated build
108 BUILDMAN="arm926ejs -x mx,siemens,atmel"
110 - BUILDMAN="arm946es"
112 - BUILDMAN="atmel -x avr32"
119 - JOB="Freescale ARM"
120 BUILDMAN="freescale -x powerpc,m68k"
122 - JOB="i.MX (non-Freescale)"
123 BUILDMAN="mx -x freescale"
139 - JOB="Catch-all ARM"
140 BUILDMAN="arm -x arm11,arm7,arm9,aarch64,atmel,denx,freescale,kirkwood,siemens,tegra,uniphier,mx,sunxi,am33xx,omap3,omap4,omap5,pxa"
142 - BUILDMAN="sandbox x86"
145 - BUILDMAN="kirkwood"
152 - BUILDMAN="microblaze"
153 TOOLCHAIN="microblaze"
168 - BUILDMAN="mpc85xx -x freescale"
170 - BUILDMAN="mpc85xx -x t208xrdb -x t4qds -x t102* -x p1_p2_rdb_pc -x p1010rdb -x corenet_ds -x b4860qds -x sbc8548 -x bsc91*"
172 - BUILDMAN="t208xrdb t4qds t102*"
174 - BUILDMAN="p1_p2_rdb_pc p1010rdb"
176 - BUILDMAN="corenet_ds b4860qds sbc8548 bsc91*"
187 BUILDMAN="am33xx -x siemens"
195 - BUILDMAN="uniphier"
197 - BUILDMAN="aarch64 -x tegra,freescale,uniphier,sunxi"
206 # QA jobs for code analytics
207 # static code analysis with cppcheck (we can add --enable=all later)
211 - cppcheck --force --quiet --inline-suppr .
212 # search for TODO within source tree
217 # search for FIXME within source tree
219 - JOB="grep FIXME HACK"
222 # search for HACK within source tree and ignore HACKKIT board
224 - grep -r HACK . | grep -v HACKKIT
225 # some statistics about the code base
233 - TEST_PY_BD="sandbox"
237 - TEST_PY_BD="vexpress_ca15_tc2"
238 TEST_PY_ID="--id qemu"
239 BUILDMAN="^vexpress_ca15_tc2$"
241 - TEST_PY_BD="vexpress_ca9x4"
242 TEST_PY_ID="--id qemu"
243 BUILDMAN="^vexpress_ca9x4$"
245 - TEST_PY_BD="integratorcp_cm926ejs"
246 TEST_PY_ID="--id qemu"
247 BUILDMAN="^integratorcp_cm926ejs$"
249 - TEST_PY_BD="qemu_mips"
250 TEST_PY_TEST_SPEC="not sleep"
251 BUILDMAN="^qemu_mips$"
254 - TEST_PY_BD="qemu_mipsel"
255 TEST_PY_TEST_SPEC="not sleep"
256 BUILDMAN="^qemu_mipsel$"
259 - TEST_PY_BD="qemu_mips64"
260 TEST_PY_TEST_SPEC="not sleep"
261 BUILDMAN="^qemu_mips64$"
264 - TEST_PY_BD="qemu_mips64el"
265 TEST_PY_TEST_SPEC="not sleep"
266 BUILDMAN="^qemu_mips64el$"
269 - TEST_PY_BD="qemu-ppce500"
270 TEST_PY_TEST_SPEC="not sleep"
271 BUILDMAN="^qemu-ppce500$"
273 - TEST_PY_BD="qemu-x86"
274 TEST_PY_TEST_SPEC="not sleep"
275 BUILDMAN="^qemu-x86$"
279 # TODO make it perfect ;-r