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
33 # install latest device tree compiler
34 - git clone --depth=1 git://git.kernel.org/pub/scm/utils/dtc/dtc.git /tmp/dtc
35 - make -j4 -C /tmp/dtc
36 # Clone uboot-test-hooks
37 - git clone --depth=1 git://github.com/swarren/uboot-test-hooks.git /tmp/uboot-test-hooks
38 - ln -s travis-ci /tmp/uboot-test-hooks/bin/`hostname`
39 - ln -s travis-ci /tmp/uboot-test-hooks/py/`hostname`
40 # prepare buildman environment
41 - echo -e "[toolchain]\nroot = /usr" > ~/.buildman
42 - echo -e "\n[toolchain-alias]\nblackfin = bfin\nsh = sh4\nopenrisc = or32" >> ~/.buildman
44 - virtualenv /tmp/venv
45 - . /tmp/venv/bin/activate
50 - PATH=/tmp/dtc:/tmp/uboot-test-hooks/bin:$PATH
56 # install toolchains based on TOOLCHAIN} variable
57 - if [[ "${TOOLCHAIN}" == *aarch64* ]]; then ./tools/buildman/buildman --fetch-arch aarch64 ; fi
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 # Exit code 129 means warnings only.
73 - if [[ "${BUILDMAN}" != "" ]]; then
75 tools/buildman/buildman ${BUILDMAN};
77 if [[ $ret -eq 0 || $ret -eq 129 ]]; then
86 # we need to build by vendor due to 50min time limit for builds
87 # each env setting here is a dedicated build
97 - BUILDMAN="atmel -x avr32"
106 - BUILDMAN="freescale -x powerpc,m68k,aarch64"
108 - BUILDMAN="sandbox x86"
111 - BUILDMAN="kirkwood"
116 - BUILDMAN="microblaze"
117 TOOLCHAIN="microblaze"
132 - BUILDMAN="mpc85xx -x freescale"
134 - BUILDMAN="mpc85xx -x t208xrdb -x t4qds -x t102* -x p1_p2_rdb_pc -x p1010rdb -x corenet_ds -x b4860qds -x sbc8548 -x bsc91*"
136 - BUILDMAN="t208xrdb t4qds t102*"
138 - BUILDMAN="p1_p2_rdb_pc p1010rdb"
140 - BUILDMAN="corenet_ds b4860qds sbc8548 bsc91*"
159 # QA jobs for code analytics
160 # static code analysis with cppcheck (we can add --enable=all later)
164 - cppcheck --force --quiet --inline-suppr .
165 # search for TODO within source tree
170 # search for FIXME within source tree
172 - JOB="grep FIXME HACK"
175 # search for HACK within source tree and ignore HACKKIT board
177 - grep -r HACK . | grep -v HACKKIT
178 # some statistics about the code base
185 - JOB="test.py sandbox"
187 - ./test/py/test.py --bd sandbox --build
190 - CROSS_COMPILE="/usr/bin/arm-linux-gnueabihf-"
192 - ./test/py/test.py --bd vexpress_ca15_tc2 --id qemu --build;
193 ./test/py/test.py --bd vexpress_ca9x4 --id qemu --build;
194 ./test/py/test.py --bd integratorcp_cm926ejs --id qemu --build;
198 CROSS_COMPILE="${HOME}/.buildman-toolchains/gcc-4.9.0-nolibc/mips-linux/bin/mips-linux-"
200 - ./test/py/test.py --bd qemu_mips --build -k 'not sleep';
201 ./test/py/test.py --bd qemu_mipsel --build -k 'not sleep';
202 ./test/py/test.py --bd qemu_mips64 --build -k 'not sleep';
203 ./test/py/test.py --bd qemu_mips64el --build -k 'not sleep';
205 - JOB="test.py PowerPC"
206 - CROSS_COMPILE="/usr/bin/powerpc-linux-gnu-"
208 - ./test/py/test.py --bd qemu-ppce500 --build -k 'not sleep'
210 - JOB="test.py x86-64"
213 CROSS_COMPILE="${HOME}/.buildman-toolchains/gcc-4.9.0-nolibc/x86_64-linux/bin/x86_64-linux-"
215 - ./test/py/test.py --bd qemu-x86 --build -k 'not sleep'
217 # TODO make it perfect ;-r