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 # install latest device tree compiler
25 - git clone --depth=1 https://git.kernel.org/pub/scm/utils/dtc/dtc.git /tmp/dtc
26 - make -j4 -C /tmp/dtc
27 # prepare buildman environment
28 - export BUILDMAN_ROOT="root:"
29 - export BUILDMAN_PPC="ppc:"
30 - export BUILDMAN_ARM="arm:"
31 - export BUILDMAN_SANDBOX="sandbox:"
32 - echo -e "[toolchain]\n${BUILDMAN_ROOT} /\n" > ~/.buildman
33 - echo -e "${BUILDMAN_PPC} /opt/eldk-5.4/powerpc/sysroots/i686-eldk-linux/usr/bin/powerpc-linux/\n" >> ~/.buildman
34 - echo -e "${BUILDMAN_ARM} /opt/eldk-5.4/armv5te/sysroots/i686-eldk-linux/usr/bin/armv5te-linux-gnueabi/\n" >> ~/.buildman
35 - echo -e "${BUILDMAN_SANDBOX} /usr/bin/gcc\n" >> ~/.buildman
36 - export BUILDMAN_ALIAS="x86:"
37 - export BUILDMAN_ALIAS_ARM="arm:"
38 - echo -e "\n\n[toolchain-alias]\n${BUILDMAN_ALIAS} i386\n" >> ~/.buildman
39 - echo -e "${BUILDMAN_ALIAS_ARM} armv5te\n" >> ~/.buildman
50 # install toolchains based on TOOLCHAIN} variable
51 - if [[ "${TOOLCHAIN}" == *aarch64* ]]; then ./tools/buildman/buildman --fetch-arch aarch64 ; fi
52 - if [[ "${TOOLCHAIN}" == *arm* ]]; then wget ftp://ftp.denx.de/pub/eldk/5.4/targets/armv5te/eldk-eglibc-i686-arm-toolchain-gmae-5.4.sh ; fi
53 - if [[ "${TOOLCHAIN}" == *arm* ]]; then sh eldk-eglibc-i686-arm-toolchain-gmae-5.4.sh -y ; fi
54 - if [[ "${TOOLCHAIN}" == *avr32* ]]; then ./tools/buildman/buildman --fetch-arch avr32 ; fi
55 - if [[ "${TOOLCHAIN}" == *i386* ]]; then ./tools/buildman/buildman sandbox --fetch-arch i386 ; fi
56 - if [[ "${TOOLCHAIN}" == *m68k* ]]; then ./tools/buildman/buildman --fetch-arch m68k ; fi
57 - if [[ "${TOOLCHAIN}" == *mips* ]]; then ./tools/buildman/buildman --fetch-arch mips ; fi
58 - if [[ "${TOOLCHAIN}" == *ppc* ]]; then wget ftp://ftp.denx.de/pub/eldk/5.4/targets/powerpc/eldk-eglibc-i686-powerpc-toolchain-gmae-5.4.sh ; fi
59 - if [[ "${TOOLCHAIN}" == *ppc* ]]; then sh eldk-eglibc-i686-powerpc-toolchain-gmae-5.4.sh -y ; fi
62 # the execution sequence for each test
63 - if [[ "${TEST_CMD}" != "" ]]; then
66 - if [[ "${BUILDMAN}" != "" ]]; then
67 tools/buildman/buildman ${BUILDMAN};
72 # we need to build by vendor due to 50min time limit for builds
73 # each env setting here is a dedicated build
90 - BUILDMAN="atmel -x avr32"
102 - BUILDMAN="freescale -x powerpc,m68k,aarch64"
105 - BUILDMAN="sandbox x86"
108 - BUILDMAN="kirkwood"
132 - BUILDMAN="mpc85xx -x freescale"
135 - 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*"
141 - BUILDMAN="p1_p2_rdb_pc p1010rdb"
144 - BUILDMAN="corenet_ds b4860qds sbc8548 bsc91*"
162 # QA jobs for code analytics
163 # static code analysis with cppcheck (we can add --enable=all later)
165 - TEST_CMD="cppcheck --force --quiet --inline-suppr ."
166 # search for TODO within source tree
168 - TEST_CMD="grep -r TODO ."
169 # search for FIXME within source tree
171 - TEST_CMD="grep -r FIXME ."
172 # search for HACK within source tree and ignore HACKKIT board
174 - TEST_CMD="grep -r HACK . | grep -v HACKKIT"
176 - grep -r HACK . | grep -v HACKKIT
177 # some statistics about the code base
179 - TEST_CMD="sloccount ."
181 # TODO make it perfect ;-r