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/
12 # install U-Boot build dependencies
13 - sudo apt-get install -qq cppcheck sloccount sparse bc libsdl-dev gcc-arm-linux-gnueabi gcc-arm-linux-gnueabihf
14 # install latest device tree compiler
15 - git clone --depth=1 https://git.kernel.org/pub/scm/utils/dtc/dtc.git /tmp/dtc
16 - make -j4 -C /tmp/dtc
17 # prepare buildman environment
18 - export BUILDMAN_ROOT="root:"
19 - export BUILDMAN_MIPS="mips:"
20 - export BUILDMAN_PPC="ppc:"
21 - echo -e "[toolchain]\\n${BUILDMAN_ROOT} /\n" > ~/.buildman
22 - echo -e "${BUILDMAN_MIPS} /opt/eldk-5.4/mips/sysroots/i686-eldk-linux/usr/bin/mips32-linux/" >> ~/.buildman
23 - echo -e "${BUILDMAN_PPC} /opt/eldk-5.4/powerpc/sysroots/i686-eldk-linux/usr/bin/powerpc-linux/" >> ~/.buildman
24 - export BUILDMAN_ALIAS="x86:"
25 - echo -e "[toolchain-alias]\\n${BUILDMAN_ALIAS} i386" >> ~/.buildman
38 # install toolchains based on INSTALL_TOOLCHAIN} variable
39 - if [[ "${INSTALL_TOOLCHAIN}" == *ppc* ]]; then wget ftp://ftp.denx.de/pub/eldk/5.4/targets/powerpc/eldk-eglibc-i686-powerpc-toolchain-gmae-5.4.sh ; fi
40 - if [[ "${INSTALL_TOOLCHAIN}" == *ppc* ]]; then sh eldk-eglibc-i686-powerpc-toolchain-gmae-5.4.sh -y ; fi
41 - if [[ "${INSTALL_TOOLCHAIN}" == *mips* ]]; then wget ftp://ftp.denx.de/pub/eldk/5.4/targets/mips/eldk-eglibc-i686-mips-toolchain-gmae-5.4.sh ; fi
42 - if [[ "${INSTALL_TOOLCHAIN}" == *mips* ]]; then sh eldk-eglibc-i686-mips-toolchain-gmae-5.4.sh -y ; fi
45 # the execution sequence for each test
46 - echo ${TEST_CONFIG_CMD}
53 # we need to build by vendor due to 50min time limit for builds
54 # each env setting here is a dedicated build
56 - TEST_CMD="./MAKEALL -a arm -v atmel"
57 CROSS_COMPILE="arm-linux-gnueabi-"
59 - TEST_CMD="./MAKEALL -a arm -v denx"
60 CROSS_COMPILE="arm-linux-gnueabi-"
62 - TEST_CMD="./MAKEALL -a arm -v freescale"
63 CROSS_COMPILE="arm-linux-gnueabi-"
65 - TEST_CMD="./MAKEALL -a arm -v siemens"
66 CROSS_COMPILE="arm-linux-gnueabi-"
68 - TEST_CMD="./MAKEALL -a arm -v ti"
69 CROSS_COMPILE="arm-linux-gnueabi-"
71 - TEST_CONFIG_CMD="make sandbox_defconfig"
76 - TEST_CONFIG_CMD="make sandbox_defconfig"
81 - TEST_CMD="./MAKEALL -a mips"
82 INSTALL_TOOLCHAIN="mips"
83 CROSS_COMPILE="/opt/eldk-5.4/mips/sysroots/i686-eldk-linux/usr/bin/mips32-linux/mips-linux-"
85 - TEST_CMD="tools/buildman/buildman --list-error-boards atmel"
87 - TEST_CMD="tools/buildman/buildman --list-error-boards denx"
89 - TEST_CMD="tools/buildman/buildman --list-error-boards freescale arm"
91 - TEST_CMD="tools/buildman/buildman --list-error-boards siemens"
93 - TEST_CMD="tools/buildman/buildman --list-error-boards ti"
95 - TEST_CMD="tools/buildman/buildman mips"
96 INSTALL_TOOLCHAIN="mips"
98 - TEST_CMD="tools/buildman/buildman mpc5xx"
99 INSTALL_TOOLCHAIN="ppc"
101 - TEST_CMD="tools/buildman/buildman mpc8xx"
102 INSTALL_TOOLCHAIN="ppc"
104 - TEST_CMD="tools/buildman/buildman mpc5xxx"
105 INSTALL_TOOLCHAIN="ppc"
107 - TEST_CMD="tools/buildman/buildman mpc512x"
108 INSTALL_TOOLCHAIN="ppc"
110 - TEST_CMD="tools/buildman/buildman mpc8260"
111 INSTALL_TOOLCHAIN="ppc"
113 - TEST_CMD="tools/buildman/buildman mpc83xx"
114 INSTALL_TOOLCHAIN="ppc"
116 - TEST_CMD="tools/buildman/buildman mpc85xx"
117 INSTALL_TOOLCHAIN="ppc"
119 - TEST_CMD="tools/buildman/buildman mpc86xx"
120 INSTALL_TOOLCHAIN="ppc"
123 - TEST_CMD="tools/buildman/buildman --list-error-boards sandbox x86"
125 # QA jobs for code analytics
126 # static code analysis with cppcheck (we can add --enable=all later)
128 - TEST_CMD="cppcheck --force --quiet --inline-suppr ."
129 # search for TODO within source tree
131 - TEST_CMD="grep -r TODO ."
132 # search for FIXME within source tree
134 - TEST_CMD="grep -r FIXME ."
135 # search for HACK within source tree and ignore HACKKIT board
137 - TEST_CMD="grep -r HACK . | grep -v HACKKIT"
139 - grep -r HACK . | grep -v HACKKIT
140 # some statistics about the code base
142 - TEST_CMD="sloccount ."
147 # TODO make it perfect ;-r