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 - export BUILDMAN_ROOT="root:"
42 - echo -e "[toolchain]\n${BUILDMAN_ROOT} /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}" == *aarch64* ]]; then ./tools/buildman/buildman --fetch-arch aarch64 ; fi
59 - if [[ "${TOOLCHAIN}" == *avr32* ]]; then ./tools/buildman/buildman --fetch-arch avr32 ; fi
60 - if [[ "${TOOLCHAIN}" == *bfin* ]]; then ./tools/buildman/buildman --fetch-arch bfin ; fi
61 - if [[ "${TOOLCHAIN}" == *m68k* ]]; then ./tools/buildman/buildman --fetch-arch m68k ; fi
62 - if [[ "${TOOLCHAIN}" == *microblaze* ]]; then ./tools/buildman/buildman --fetch-arch microblaze ; fi
63 - if [[ "${TOOLCHAIN}" == *mips* ]]; then ./tools/buildman/buildman --fetch-arch mips ; fi
64 - if [[ "${TOOLCHAIN}" == *or32* ]]; then ./tools/buildman/buildman --fetch-arch or32 ; fi
65 - if [[ "${TOOLCHAIN}" == *sh4* ]]; then ./tools/buildman/buildman --fetch-arch sh4 ; fi
66 - if [[ "${TOOLCHAIN}" == *x86_64* ]]; then ./tools/buildman/buildman --fetch-arch x86_64 ; fi
67 - if [[ "${TOOLCHAIN}" == *xtensa* ]]; then ./tools/buildman/buildman --fetch-arch xtensa ; fi
70 # Exit code 129 means warnings only.
71 - if [[ "${BUILDMAN}" != "" ]]; then
73 tools/buildman/buildman ${BUILDMAN};
74 if [[ "$?" == "0" || "$?" == "129" ]]; then
83 # we need to build by vendor due to 50min time limit for builds
84 # each env setting here is a dedicated build
96 - BUILDMAN="atmel -x avr32"
105 - BUILDMAN="freescale -x powerpc,m68k,aarch64"
107 - BUILDMAN="sandbox x86"
110 - export BUILDMAN_X86="x86:";
111 echo -e "\n[toolchain-prefix]\n${BUILDMAN_X86} ${HOME}/.buildman-toolchains/gcc-4.9.0-nolibc/x86_64-linux/bin/x86_64-linux-" >> ~/.buildman
113 - BUILDMAN="kirkwood"
118 - BUILDMAN="microblaze"
119 TOOLCHAIN="microblaze"
134 - BUILDMAN="mpc85xx -x freescale"
136 - BUILDMAN="mpc85xx -x t208xrdb -x t4qds -x t102* -x p1_p2_rdb_pc -x p1010rdb -x corenet_ds -x b4860qds -x sbc8548 -x bsc91*"
138 - BUILDMAN="t208xrdb t4qds t102*"
140 - BUILDMAN="p1_p2_rdb_pc p1010rdb"
142 - BUILDMAN="corenet_ds b4860qds sbc8548 bsc91*"
161 # QA jobs for code analytics
162 # static code analysis with cppcheck (we can add --enable=all later)
164 - cppcheck --force --quiet --inline-suppr .
165 # search for TODO within source tree
168 # search for FIXME within source tree
171 # search for HACK within source tree and ignore HACKKIT board
173 - grep -r HACK . | grep -v HACKKIT
174 # some statistics about the code base
179 - ./test/py/test.py --bd sandbox --build
181 - CROSS_COMPILE="/usr/bin/arm-linux-gnueabihf-"
183 - ./test/py/test.py --bd vexpress_ca15_tc2 --id qemu --build;
184 ./test/py/test.py --bd vexpress_ca9x4 --id qemu --build;
185 ./test/py/test.py --bd integratorcp_cm926ejs --id qemu --build;
188 CROSS_COMPILE="${HOME}/.buildman-toolchains/gcc-4.9.0-nolibc/mips-linux/bin/mips-linux-"
190 - ./test/py/test.py --bd qemu_mips --build -k 'not sleep';
191 ./test/py/test.py --bd qemu_mipsel --build -k 'not sleep';
192 ./test/py/test.py --bd qemu_mips64 --build -k 'not sleep';
193 ./test/py/test.py --bd qemu_mips64el --build -k 'not sleep';
195 - CROSS_COMPILE="/usr/bin/powerpc-linux-gnu-"
197 - ./test/py/test.py --bd qemu-ppce500 --build -k 'not sleep'
201 CROSS_COMPILE="${HOME}/.buildman-toolchains/gcc-4.9.0-nolibc/x86_64-linux/bin/x86_64-linux-"
203 - ./test/py/test.py --bd qemu-x86 --build -k 'not sleep'
205 # TODO make it perfect ;-r