1# Copyright Roger Meier <r.meier@siemens.com> 2# SPDX-License-Identifier: GPL-2.0+ 3 4# build U-Boot on Travis CI - https://travis-ci.org/ 5 6language: c 7 8addons: 9 apt: 10 packages: 11 - cppcheck 12 - sloccount 13 - sparse 14 - bc 15 - build-essential 16 - libsdl1.2-dev 17 18cache: 19 - apt 20 21install: 22 # install latest device tree compiler 23 - git clone --depth=1 https://git.kernel.org/pub/scm/utils/dtc/dtc.git /tmp/dtc 24 - make -j4 -C /tmp/dtc 25 # prepare buildman environment 26 - export BUILDMAN_ROOT="root:" 27 - export BUILDMAN_PPC="ppc:" 28 - export BUILDMAN_ARM="arm:" 29 - export BUILDMAN_SANDBOX="sandbox:" 30 - echo -e "[toolchain]\n${BUILDMAN_ROOT} /\n" > ~/.buildman 31 - echo -e "${BUILDMAN_PPC} /opt/eldk-5.4/powerpc/sysroots/i686-eldk-linux/usr/bin/powerpc-linux/\n" >> ~/.buildman 32 - echo -e "${BUILDMAN_ARM} /opt/eldk-5.4/armv5te/sysroots/i686-eldk-linux/usr/bin/armv5te-linux-gnueabi/\n" >> ~/.buildman 33 - echo -e "${BUILDMAN_SANDBOX} /usr/bin/gcc\n" >> ~/.buildman 34 - export BUILDMAN_ALIAS="x86:" 35 - export BUILDMAN_ALIAS_ARM="arm:" 36 - echo -e "\n\n[toolchain-alias]\n${BUILDMAN_ALIAS} i386\n" >> ~/.buildman 37 - echo -e "${BUILDMAN_ALIAS_ARM} armv5te\n" >> ~/.buildman 38 - cat ~/.buildman 39 40env: 41 global: 42 - PATH=/tmp/dtc:$PATH 43 - BUILD_DIR=build 44 - HOSTCC="cc" 45 - HOSTCXX="c++" 46 47before_script: 48 # install toolchains based on TOOLCHAIN} variable 49 - if [[ "${TOOLCHAIN}" == *aarch64* ]]; then ./tools/buildman/buildman --fetch-arch aarch64 ; fi 50 - 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 51 - if [[ "${TOOLCHAIN}" == *arm* ]]; then sh eldk-eglibc-i686-arm-toolchain-gmae-5.4.sh -y ; fi 52 - if [[ "${TOOLCHAIN}" == *avr32* ]]; then ./tools/buildman/buildman --fetch-arch avr32 ; fi 53 - if [[ "${TOOLCHAIN}" == *i386* ]]; then ./tools/buildman/buildman sandbox --fetch-arch i386 ; fi 54 - if [[ "${TOOLCHAIN}" == *m68k* ]]; then ./tools/buildman/buildman --fetch-arch m68k ; fi 55 - if [[ "${TOOLCHAIN}" == *mips* ]]; then ./tools/buildman/buildman --fetch-arch mips ; fi 56 - 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 57 - if [[ "${TOOLCHAIN}" == *ppc* ]]; then sh eldk-eglibc-i686-powerpc-toolchain-gmae-5.4.sh -y ; fi 58 59script: 60 # the execution sequence for each test 61 - if [[ "${TEST_CMD}" != "" ]]; then 62 ${TEST_CMD}; 63 fi 64 - if [[ "${BUILDMAN}" != "" ]]; then 65 tools/buildman/buildman ${BUILDMAN}; 66 fi 67 68matrix: 69 include: 70 # we need to build by vendor due to 50min time limit for builds 71 # each env setting here is a dedicated build 72 - env: 73 - BUILDMAN="arm1136" 74 TOOLCHAIN="arm" 75 - env: 76 - BUILDMAN="arm1136" 77 TOOLCHAIN="arm" 78 - env: 79 - BUILDMAN="arm1176" 80 TOOLCHAIN="arm" 81 - env: 82 - BUILDMAN="arm720t" 83 TOOLCHAIN="arm" 84 - env: 85 - BUILDMAN="arm920t" 86 TOOLCHAIN="arm" 87 - env: 88 - BUILDMAN="atmel -x avr32" 89 TOOLCHAIN="arm" 90 - env: 91 - BUILDMAN="avr32" 92 TOOLCHAIN="avr32" 93 - env: 94 - BUILDMAN="davinci" 95 TOOLCHAIN="arm" 96 - env: 97 - BUILDMAN="denx" 98 TOOLCHAIN="arm" 99 - env: 100 - BUILDMAN="freescale -x powerpc,m68k,aarch64" 101 TOOLCHAIN="arm" 102 - env: 103 - BUILDMAN="sandbox x86" 104 TOOLCHAIN="i386" 105 - env: 106 - BUILDMAN="kirkwood" 107 TOOLCHAIN="arm" 108 - env: 109 - BUILDMAN="m68k" 110 TOOLCHAIN="m68k" 111 - env: 112 - BUILDMAN="mips" 113 TOOLCHAIN="mips" 114 - env: 115 - BUILDMAN="mpc512x" 116 TOOLCHAIN="ppc" 117 - env: 118 - BUILDMAN="mpc5xx" 119 TOOLCHAIN="ppc" 120 - env: 121 - BUILDMAN="mpc5xxx" 122 TOOLCHAIN="ppc" 123 - env: 124 - BUILDMAN="mpc8260" 125 TOOLCHAIN="ppc" 126 - env: 127 - BUILDMAN="mpc83xx" 128 TOOLCHAIN="ppc" 129 - env: 130 - BUILDMAN="mpc85xx -x freescale" 131 TOOLCHAIN="ppc" 132 - env: 133 - BUILDMAN="mpc85xx -x t208xrdb -x t4qds -x t102* -x p1_p2_rdb_pc -x p1010rdb -x corenet_ds -x b4860qds -x sbc8548 -x bsc91*" 134 TOOLCHAIN="ppc" 135 - env: 136 - BUILDMAN="t208xrdb t4qds t102*" 137 TOOLCHAIN="ppc" 138 - env: 139 - BUILDMAN="p1_p2_rdb_pc p1010rdb" 140 TOOLCHAIN="ppc" 141 - env: 142 - BUILDMAN="corenet_ds b4860qds sbc8548 bsc91*" 143 TOOLCHAIN="ppc" 144 - env: 145 - BUILDMAN="mpc86xx" 146 TOOLCHAIN="ppc" 147 - env: 148 - BUILDMAN="mpc8xx" 149 TOOLCHAIN="ppc" 150 - env: 151 - BUILDMAN="siemens" 152 TOOLCHAIN="arm" 153 - env: 154 - BUILDMAN="ti" 155 TOOLCHAIN="arm" 156 - env: 157 - BUILDMAN="aarch64" 158 TOOLCHAIN="aarch64" 159 160 # QA jobs for code analytics 161 # static code analysis with cppcheck (we can add --enable=all later) 162 - env: 163 - TEST_CMD="cppcheck --force --quiet --inline-suppr ." 164 # search for TODO within source tree 165 - env: 166 - TEST_CMD="grep -r TODO ." 167 # search for FIXME within source tree 168 - env: 169 - TEST_CMD="grep -r FIXME ." 170 # search for HACK within source tree and ignore HACKKIT board 171 - env: 172 - TEST_CMD="grep -r HACK . | grep -v HACKKIT" 173 script: 174 - grep -r HACK . | grep -v HACKKIT 175 # some statistics about the code base 176 - env: 177 - TEST_CMD="sloccount ." 178 179# TODO make it perfect ;-r 180