Meier, Roger | 3029f5b | 2014-11-19 15:26:18 +0100 | [diff] [blame] | 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 | |
| 6 | language: c |
| 7 | |
Roger Meier | aad5beb | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 8 | addons: |
| 9 | apt: |
| 10 | packages: |
| 11 | - cppcheck |
| 12 | - sloccount |
| 13 | - sparse |
| 14 | - bc |
| 15 | - build-essential |
| 16 | - libsdl1.2-dev |
| 17 | |
Meier, Roger | 3029f5b | 2014-11-19 15:26:18 +0100 | [diff] [blame] | 18 | cache: |
| 19 | - apt |
| 20 | |
| 21 | install: |
Meier, Roger | 3029f5b | 2014-11-19 15:26:18 +0100 | [diff] [blame] | 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:" |
Meier, Roger | 3029f5b | 2014-11-19 15:26:18 +0100 | [diff] [blame] | 27 | - export BUILDMAN_PPC="ppc:" |
Heiko Schocher | b52b66f | 2015-03-05 09:02:23 +0100 | [diff] [blame] | 28 | - export BUILDMAN_ARM="arm:" |
| 29 | - export BUILDMAN_SANDBOX="sandbox:" |
| 30 | - echo -e "[toolchain]\n${BUILDMAN_ROOT} /\n" > ~/.buildman |
Heiko Schocher | b52b66f | 2015-03-05 09:02:23 +0100 | [diff] [blame] | 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 |
Meier, Roger | 3029f5b | 2014-11-19 15:26:18 +0100 | [diff] [blame] | 34 | - export BUILDMAN_ALIAS="x86:" |
Heiko Schocher | b52b66f | 2015-03-05 09:02:23 +0100 | [diff] [blame] | 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 |
Meier, Roger | 3029f5b | 2014-11-19 15:26:18 +0100 | [diff] [blame] | 38 | - cat ~/.buildman |
| 39 | |
| 40 | env: |
| 41 | global: |
| 42 | - PATH=/tmp/dtc:$PATH |
| 43 | - BUILD_DIR=build |
Meier, Roger | 3029f5b | 2014-11-19 15:26:18 +0100 | [diff] [blame] | 44 | - HOSTCC="cc" |
| 45 | - HOSTCXX="c++" |
Meier, Roger | 3029f5b | 2014-11-19 15:26:18 +0100 | [diff] [blame] | 46 | |
| 47 | before_script: |
Roger Meier | aad5beb | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 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 |
Meier, Roger | 3029f5b | 2014-11-19 15:26:18 +0100 | [diff] [blame] | 58 | |
| 59 | script: |
| 60 | # the execution sequence for each test |
Roger Meier | aad5beb | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 61 | - if [[ "${TEST_CMD}" != "" ]]; then |
| 62 | ${TEST_CMD}; |
| 63 | fi |
| 64 | - if [[ "${BUILDMAN}" != "" ]]; then |
| 65 | tools/buildman/buildman ${BUILDMAN}; |
| 66 | fi |
Meier, Roger | 3029f5b | 2014-11-19 15:26:18 +0100 | [diff] [blame] | 67 | |
| 68 | matrix: |
| 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: |
Roger Meier | aad5beb | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 73 | - BUILDMAN="arm1136" |
| 74 | TOOLCHAIN="arm" |
Meier, Roger | 3029f5b | 2014-11-19 15:26:18 +0100 | [diff] [blame] | 75 | - env: |
Roger Meier | aad5beb | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 76 | - BUILDMAN="arm1136" |
| 77 | TOOLCHAIN="arm" |
Meier, Roger | 3029f5b | 2014-11-19 15:26:18 +0100 | [diff] [blame] | 78 | - env: |
Roger Meier | aad5beb | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 79 | - BUILDMAN="arm1176" |
| 80 | TOOLCHAIN="arm" |
Meier, Roger | 3029f5b | 2014-11-19 15:26:18 +0100 | [diff] [blame] | 81 | - env: |
Roger Meier | aad5beb | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 82 | - BUILDMAN="arm720t" |
| 83 | TOOLCHAIN="arm" |
Meier, Roger | 3029f5b | 2014-11-19 15:26:18 +0100 | [diff] [blame] | 84 | - env: |
Roger Meier | aad5beb | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 85 | - BUILDMAN="arm920t" |
| 86 | TOOLCHAIN="arm" |
Meier, Roger | 3029f5b | 2014-11-19 15:26:18 +0100 | [diff] [blame] | 87 | - env: |
Roger Meier | aad5beb | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 88 | - BUILDMAN="atmel -x avr32" |
| 89 | TOOLCHAIN="arm" |
Meier, Roger | 3029f5b | 2014-11-19 15:26:18 +0100 | [diff] [blame] | 90 | - env: |
Roger Meier | aad5beb | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 91 | - BUILDMAN="avr32" |
| 92 | TOOLCHAIN="avr32" |
Meier, Roger | 3029f5b | 2014-11-19 15:26:18 +0100 | [diff] [blame] | 93 | - env: |
Roger Meier | aad5beb | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 94 | - BUILDMAN="davinci" |
| 95 | TOOLCHAIN="arm" |
Meier, Roger | 3029f5b | 2014-11-19 15:26:18 +0100 | [diff] [blame] | 96 | - env: |
Roger Meier | aad5beb | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 97 | - BUILDMAN="denx" |
| 98 | TOOLCHAIN="arm" |
Meier, Roger | 3029f5b | 2014-11-19 15:26:18 +0100 | [diff] [blame] | 99 | - env: |
Roger Meier | aad5beb | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 100 | - BUILDMAN="freescale -x powerpc,m68k,aarch64" |
| 101 | TOOLCHAIN="arm" |
Meier, Roger | 3029f5b | 2014-11-19 15:26:18 +0100 | [diff] [blame] | 102 | - env: |
Roger Meier | aad5beb | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 103 | - BUILDMAN="sandbox x86" |
| 104 | TOOLCHAIN="i386" |
Heiko Schocher | b52b66f | 2015-03-05 09:02:23 +0100 | [diff] [blame] | 105 | - env: |
Roger Meier | aad5beb | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 106 | - BUILDMAN="kirkwood" |
| 107 | TOOLCHAIN="arm" |
Heiko Schocher | b52b66f | 2015-03-05 09:02:23 +0100 | [diff] [blame] | 108 | - env: |
Roger Meier | aad5beb | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 109 | - BUILDMAN="m68k" |
| 110 | TOOLCHAIN="m68k" |
Heiko Schocher | b52b66f | 2015-03-05 09:02:23 +0100 | [diff] [blame] | 111 | - env: |
Roger Meier | aad5beb | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 112 | - BUILDMAN="mips" |
| 113 | TOOLCHAIN="mips" |
Heiko Schocher | b52b66f | 2015-03-05 09:02:23 +0100 | [diff] [blame] | 114 | - env: |
Roger Meier | aad5beb | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 115 | - BUILDMAN="mpc512x" |
| 116 | TOOLCHAIN="ppc" |
Meier, Roger | 3029f5b | 2014-11-19 15:26:18 +0100 | [diff] [blame] | 117 | - env: |
Roger Meier | aad5beb | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 118 | - BUILDMAN="mpc5xx" |
| 119 | TOOLCHAIN="ppc" |
Meier, Roger | 3029f5b | 2014-11-19 15:26:18 +0100 | [diff] [blame] | 120 | - env: |
Roger Meier | aad5beb | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 121 | - BUILDMAN="mpc5xxx" |
| 122 | TOOLCHAIN="ppc" |
Heiko Schocher | b52b66f | 2015-03-05 09:02:23 +0100 | [diff] [blame] | 123 | - env: |
Roger Meier | aad5beb | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 124 | - BUILDMAN="mpc8260" |
| 125 | TOOLCHAIN="ppc" |
Heiko Schocher | b52b66f | 2015-03-05 09:02:23 +0100 | [diff] [blame] | 126 | - env: |
Roger Meier | aad5beb | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 127 | - BUILDMAN="mpc83xx" |
| 128 | TOOLCHAIN="ppc" |
Heiko Schocher | b52b66f | 2015-03-05 09:02:23 +0100 | [diff] [blame] | 129 | - env: |
Roger Meier | aad5beb | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 130 | - BUILDMAN="mpc85xx -x freescale" |
| 131 | TOOLCHAIN="ppc" |
Heiko Schocher | 8fbc893 | 2015-03-17 08:21:41 +0100 | [diff] [blame] | 132 | - env: |
Roger Meier | aad5beb | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 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" |
Meier, Roger | 3029f5b | 2014-11-19 15:26:18 +0100 | [diff] [blame] | 135 | - env: |
Roger Meier | aad5beb | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 136 | - BUILDMAN="t208xrdb t4qds t102*" |
| 137 | TOOLCHAIN="ppc" |
Meier, Roger | 3029f5b | 2014-11-19 15:26:18 +0100 | [diff] [blame] | 138 | - env: |
Roger Meier | aad5beb | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 139 | - BUILDMAN="p1_p2_rdb_pc p1010rdb" |
| 140 | TOOLCHAIN="ppc" |
Meier, Roger | 3029f5b | 2014-11-19 15:26:18 +0100 | [diff] [blame] | 141 | - env: |
Roger Meier | aad5beb | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 142 | - BUILDMAN="corenet_ds b4860qds sbc8548 bsc91*" |
| 143 | TOOLCHAIN="ppc" |
Meier, Roger | 3029f5b | 2014-11-19 15:26:18 +0100 | [diff] [blame] | 144 | - env: |
Roger Meier | aad5beb | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 145 | - BUILDMAN="mpc86xx" |
| 146 | TOOLCHAIN="ppc" |
Meier, Roger | 3029f5b | 2014-11-19 15:26:18 +0100 | [diff] [blame] | 147 | - env: |
Roger Meier | aad5beb | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 148 | - BUILDMAN="mpc8xx" |
| 149 | TOOLCHAIN="ppc" |
Meier, Roger | 3029f5b | 2014-11-19 15:26:18 +0100 | [diff] [blame] | 150 | - env: |
Roger Meier | aad5beb | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 151 | - BUILDMAN="siemens" |
| 152 | TOOLCHAIN="arm" |
Meier, Roger | 3029f5b | 2014-11-19 15:26:18 +0100 | [diff] [blame] | 153 | - env: |
Roger Meier | aad5beb | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 154 | - BUILDMAN="ti" |
| 155 | TOOLCHAIN="arm" |
Meier, Roger | 3029f5b | 2014-11-19 15:26:18 +0100 | [diff] [blame] | 156 | - env: |
Roger Meier | aad5beb | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 157 | - BUILDMAN="aarch64" |
| 158 | TOOLCHAIN="aarch64" |
Meier, Roger | 3029f5b | 2014-11-19 15:26:18 +0100 | [diff] [blame] | 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 | |
Meier, Roger | 3029f5b | 2014-11-19 15:26:18 +0100 | [diff] [blame] | 179 | # TODO make it perfect ;-r |