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/
26 # install latest device tree compiler
27 - git clone --depth=1 https://git.kernel.org/pub/scm/utils/dtc/dtc.git /tmp/dtc
28 - make -j4 -C /tmp/dtc
29 # prepare buildman environment
30 - export BUILDMAN_ROOT="root:"
31 - export BUILDMAN_PPC="ppc:"
32 - export BUILDMAN_ARM="arm:"
33 - export BUILDMAN_SANDBOX="sandbox:"
34 - echo -e "[toolchain]\n${BUILDMAN_ROOT} /\n" > ~/.buildman
35 - echo -e "${BUILDMAN_PPC} /opt/eldk-5.4/powerpc/sysroots/i686-eldk-linux/usr/bin/powerpc-linux/\n" >> ~/.buildman
36 - echo -e "${BUILDMAN_ARM} /opt/eldk-5.4/armv5te/sysroots/i686-eldk-linux/usr/bin/armv5te-linux-gnueabi/\n" >> ~/.buildman
37 - echo -e "${BUILDMAN_SANDBOX} /usr/bin/gcc\n" >> ~/.buildman
38 - export BUILDMAN_ALIAS="x86:"
39 - export BUILDMAN_ALIAS_ARM="arm:"
40 - echo -e "\n\n[toolchain-alias]\n${BUILDMAN_ALIAS} i386\n" >> ~/.buildman
41 - echo -e "${BUILDMAN_ALIAS_ARM} armv5te\n" >> ~/.buildman
43 - virtualenv /tmp/venv
44 - . /tmp/venv/bin/activate
55 # install toolchains based on TOOLCHAIN} variable
56 - if [[ "${TOOLCHAIN}" == *aarch64* ]]; then ./tools/buildman/buildman --fetch-arch aarch64 ; fi
57 - 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
58 - if [[ "${TOOLCHAIN}" == *arm* ]]; then sh eldk-eglibc-i686-arm-toolchain-gmae-5.4.sh -y ; fi
59 - if [[ "${TOOLCHAIN}" == *avr32* ]]; then ./tools/buildman/buildman --fetch-arch avr32 ; fi
60 - if [[ "${TOOLCHAIN}" == *i386* ]]; then ./tools/buildman/buildman sandbox --fetch-arch i386 ; fi
61 - if [[ "${TOOLCHAIN}" == *m68k* ]]; then ./tools/buildman/buildman --fetch-arch m68k ; fi
62 - if [[ "${TOOLCHAIN}" == *mips* ]]; then ./tools/buildman/buildman --fetch-arch mips ; fi
63 - 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
64 - if [[ "${TOOLCHAIN}" == *ppc* ]]; then sh eldk-eglibc-i686-powerpc-toolchain-gmae-5.4.sh -y ; fi
67 # the execution sequence for each test
68 - if [[ "${TEST_CMD}" != "" ]]; then
71 - if [[ "${BUILDMAN}" != "" ]]; then
72 tools/buildman/buildman ${BUILDMAN};
77 # we need to build by vendor due to 50min time limit for builds
78 # each env setting here is a dedicated build
95 - BUILDMAN="atmel -x avr32"
107 - BUILDMAN="freescale -x powerpc,m68k,aarch64"
110 - BUILDMAN="sandbox x86"
113 - BUILDMAN="kirkwood"
137 - BUILDMAN="mpc85xx -x freescale"
140 - BUILDMAN="mpc85xx -x t208xrdb -x t4qds -x t102* -x p1_p2_rdb_pc -x p1010rdb -x corenet_ds -x b4860qds -x sbc8548 -x bsc91*"
143 - BUILDMAN="t208xrdb t4qds t102*"
146 - BUILDMAN="p1_p2_rdb_pc p1010rdb"
149 - BUILDMAN="corenet_ds b4860qds sbc8548 bsc91*"
167 # QA jobs for code analytics
168 # static code analysis with cppcheck (we can add --enable=all later)
170 - TEST_CMD="cppcheck --force --quiet --inline-suppr ."
171 # search for TODO within source tree
173 - TEST_CMD="grep -r TODO ."
174 # search for FIXME within source tree
176 - TEST_CMD="grep -r FIXME ."
177 # search for HACK within source tree and ignore HACKKIT board
179 - TEST_CMD="grep -r HACK . | grep -v HACKKIT"
181 - grep -r HACK . | grep -v HACKKIT
182 # some statistics about the code base
184 - TEST_CMD="sloccount ."
187 - TEST_CMD="./test/py/test.py --bd sandbox --build"
189 # TODO make it perfect ;-r