Meier, Roger | c7cb334 | 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 | |
Stephen Warren | e4c1b4d | 2016-02-03 10:41:34 -0700 | [diff] [blame] | 6 | sudo: true |
| 7 | |
Meier, Roger | c7cb334 | 2014-11-19 15:26:18 +0100 | [diff] [blame] | 8 | language: c |
| 9 | |
Roger Meier | 050c756 | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 10 | addons: |
| 11 | apt: |
| 12 | packages: |
| 13 | - cppcheck |
| 14 | - sloccount |
| 15 | - sparse |
| 16 | - bc |
| 17 | - build-essential |
| 18 | - libsdl1.2-dev |
| 19 | |
Meier, Roger | c7cb334 | 2014-11-19 15:26:18 +0100 | [diff] [blame] | 20 | cache: |
| 21 | - apt |
| 22 | |
| 23 | install: |
Meier, Roger | c7cb334 | 2014-11-19 15:26:18 +0100 | [diff] [blame] | 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:" |
Meier, Roger | c7cb334 | 2014-11-19 15:26:18 +0100 | [diff] [blame] | 29 | - export BUILDMAN_PPC="ppc:" |
Heiko Schocher | d9aa019 | 2015-03-05 09:02:23 +0100 | [diff] [blame] | 30 | - export BUILDMAN_ARM="arm:" |
| 31 | - export BUILDMAN_SANDBOX="sandbox:" |
| 32 | - echo -e "[toolchain]\n${BUILDMAN_ROOT} /\n" > ~/.buildman |
Heiko Schocher | d9aa019 | 2015-03-05 09:02:23 +0100 | [diff] [blame] | 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 |
Meier, Roger | c7cb334 | 2014-11-19 15:26:18 +0100 | [diff] [blame] | 36 | - export BUILDMAN_ALIAS="x86:" |
Heiko Schocher | d9aa019 | 2015-03-05 09:02:23 +0100 | [diff] [blame] | 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 |
Meier, Roger | c7cb334 | 2014-11-19 15:26:18 +0100 | [diff] [blame] | 40 | - cat ~/.buildman |
| 41 | |
| 42 | env: |
| 43 | global: |
| 44 | - PATH=/tmp/dtc:$PATH |
| 45 | - BUILD_DIR=build |
Meier, Roger | c7cb334 | 2014-11-19 15:26:18 +0100 | [diff] [blame] | 46 | - HOSTCC="cc" |
| 47 | - HOSTCXX="c++" |
Meier, Roger | c7cb334 | 2014-11-19 15:26:18 +0100 | [diff] [blame] | 48 | |
| 49 | before_script: |
Roger Meier | 050c756 | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 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 |
Meier, Roger | c7cb334 | 2014-11-19 15:26:18 +0100 | [diff] [blame] | 60 | |
| 61 | script: |
| 62 | # the execution sequence for each test |
Roger Meier | 050c756 | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 63 | - if [[ "${TEST_CMD}" != "" ]]; then |
| 64 | ${TEST_CMD}; |
| 65 | fi |
| 66 | - if [[ "${BUILDMAN}" != "" ]]; then |
| 67 | tools/buildman/buildman ${BUILDMAN}; |
| 68 | fi |
Meier, Roger | c7cb334 | 2014-11-19 15:26:18 +0100 | [diff] [blame] | 69 | |
| 70 | matrix: |
| 71 | include: |
| 72 | # we need to build by vendor due to 50min time limit for builds |
| 73 | # each env setting here is a dedicated build |
| 74 | - env: |
Roger Meier | 050c756 | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 75 | - BUILDMAN="arm1136" |
| 76 | TOOLCHAIN="arm" |
Meier, Roger | c7cb334 | 2014-11-19 15:26:18 +0100 | [diff] [blame] | 77 | - env: |
Roger Meier | 050c756 | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 78 | - BUILDMAN="arm1136" |
| 79 | TOOLCHAIN="arm" |
Meier, Roger | c7cb334 | 2014-11-19 15:26:18 +0100 | [diff] [blame] | 80 | - env: |
Roger Meier | 050c756 | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 81 | - BUILDMAN="arm1176" |
| 82 | TOOLCHAIN="arm" |
Meier, Roger | c7cb334 | 2014-11-19 15:26:18 +0100 | [diff] [blame] | 83 | - env: |
Roger Meier | 050c756 | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 84 | - BUILDMAN="arm720t" |
| 85 | TOOLCHAIN="arm" |
Meier, Roger | c7cb334 | 2014-11-19 15:26:18 +0100 | [diff] [blame] | 86 | - env: |
Roger Meier | 050c756 | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 87 | - BUILDMAN="arm920t" |
| 88 | TOOLCHAIN="arm" |
Meier, Roger | c7cb334 | 2014-11-19 15:26:18 +0100 | [diff] [blame] | 89 | - env: |
Roger Meier | 050c756 | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 90 | - BUILDMAN="atmel -x avr32" |
| 91 | TOOLCHAIN="arm" |
Meier, Roger | c7cb334 | 2014-11-19 15:26:18 +0100 | [diff] [blame] | 92 | - env: |
Roger Meier | 050c756 | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 93 | - BUILDMAN="avr32" |
| 94 | TOOLCHAIN="avr32" |
Meier, Roger | c7cb334 | 2014-11-19 15:26:18 +0100 | [diff] [blame] | 95 | - env: |
Roger Meier | 050c756 | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 96 | - BUILDMAN="davinci" |
| 97 | TOOLCHAIN="arm" |
Meier, Roger | c7cb334 | 2014-11-19 15:26:18 +0100 | [diff] [blame] | 98 | - env: |
Roger Meier | 050c756 | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 99 | - BUILDMAN="denx" |
| 100 | TOOLCHAIN="arm" |
Heiko Schocher | d9aa019 | 2015-03-05 09:02:23 +0100 | [diff] [blame] | 101 | - env: |
Roger Meier | 050c756 | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 102 | - BUILDMAN="freescale -x powerpc,m68k,aarch64" |
| 103 | TOOLCHAIN="arm" |
Heiko Schocher | d9aa019 | 2015-03-05 09:02:23 +0100 | [diff] [blame] | 104 | - env: |
Roger Meier | 050c756 | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 105 | - BUILDMAN="sandbox x86" |
| 106 | TOOLCHAIN="i386" |
Heiko Schocher | d9aa019 | 2015-03-05 09:02:23 +0100 | [diff] [blame] | 107 | - env: |
Roger Meier | 050c756 | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 108 | - BUILDMAN="kirkwood" |
| 109 | TOOLCHAIN="arm" |
Heiko Schocher | d9aa019 | 2015-03-05 09:02:23 +0100 | [diff] [blame] | 110 | - env: |
Roger Meier | 050c756 | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 111 | - BUILDMAN="m68k" |
| 112 | TOOLCHAIN="m68k" |
Heiko Schocher | 8cb2101 | 2015-03-17 08:21:41 +0100 | [diff] [blame] | 113 | - env: |
Roger Meier | 050c756 | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 114 | - BUILDMAN="mips" |
| 115 | TOOLCHAIN="mips" |
Heiko Schocher | 8cb2101 | 2015-03-17 08:21:41 +0100 | [diff] [blame] | 116 | - env: |
Roger Meier | 050c756 | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 117 | - BUILDMAN="mpc512x" |
| 118 | TOOLCHAIN="ppc" |
Heiko Schocher | d9aa019 | 2015-03-05 09:02:23 +0100 | [diff] [blame] | 119 | - env: |
Roger Meier | 050c756 | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 120 | - BUILDMAN="mpc5xx" |
| 121 | TOOLCHAIN="ppc" |
Heiko Schocher | 8cb2101 | 2015-03-17 08:21:41 +0100 | [diff] [blame] | 122 | - env: |
Roger Meier | 050c756 | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 123 | - BUILDMAN="mpc5xxx" |
| 124 | TOOLCHAIN="ppc" |
Heiko Schocher | 8cb2101 | 2015-03-17 08:21:41 +0100 | [diff] [blame] | 125 | - env: |
Roger Meier | 050c756 | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 126 | - BUILDMAN="mpc8260" |
| 127 | TOOLCHAIN="ppc" |
Heiko Schocher | 8cb2101 | 2015-03-17 08:21:41 +0100 | [diff] [blame] | 128 | - env: |
Roger Meier | 050c756 | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 129 | - BUILDMAN="mpc83xx" |
| 130 | TOOLCHAIN="ppc" |
Heiko Schocher | 8cb2101 | 2015-03-17 08:21:41 +0100 | [diff] [blame] | 131 | - env: |
Roger Meier | 050c756 | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 132 | - BUILDMAN="mpc85xx -x freescale" |
| 133 | TOOLCHAIN="ppc" |
Heiko Schocher | d9aa019 | 2015-03-05 09:02:23 +0100 | [diff] [blame] | 134 | - env: |
Roger Meier | 050c756 | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 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*" |
| 136 | TOOLCHAIN="ppc" |
Heiko Schocher | 8cb2101 | 2015-03-17 08:21:41 +0100 | [diff] [blame] | 137 | - env: |
Roger Meier | 050c756 | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 138 | - BUILDMAN="t208xrdb t4qds t102*" |
| 139 | TOOLCHAIN="ppc" |
Meier, Roger | c7cb334 | 2014-11-19 15:26:18 +0100 | [diff] [blame] | 140 | - env: |
Roger Meier | 050c756 | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 141 | - BUILDMAN="p1_p2_rdb_pc p1010rdb" |
| 142 | TOOLCHAIN="ppc" |
Heiko Schocher | 8cb2101 | 2015-03-17 08:21:41 +0100 | [diff] [blame] | 143 | - env: |
Roger Meier | 050c756 | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 144 | - BUILDMAN="corenet_ds b4860qds sbc8548 bsc91*" |
| 145 | TOOLCHAIN="ppc" |
Meier, Roger | c7cb334 | 2014-11-19 15:26:18 +0100 | [diff] [blame] | 146 | - env: |
Roger Meier | 050c756 | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 147 | - BUILDMAN="mpc86xx" |
| 148 | TOOLCHAIN="ppc" |
Meier, Roger | c7cb334 | 2014-11-19 15:26:18 +0100 | [diff] [blame] | 149 | - env: |
Roger Meier | 050c756 | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 150 | - BUILDMAN="mpc8xx" |
| 151 | TOOLCHAIN="ppc" |
Meier, Roger | c7cb334 | 2014-11-19 15:26:18 +0100 | [diff] [blame] | 152 | - env: |
Roger Meier | 050c756 | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 153 | - BUILDMAN="siemens" |
| 154 | TOOLCHAIN="arm" |
Meier, Roger | c7cb334 | 2014-11-19 15:26:18 +0100 | [diff] [blame] | 155 | - env: |
Roger Meier | 050c756 | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 156 | - BUILDMAN="ti" |
| 157 | TOOLCHAIN="arm" |
Meier, Roger | c7cb334 | 2014-11-19 15:26:18 +0100 | [diff] [blame] | 158 | - env: |
Roger Meier | 050c756 | 2016-01-25 20:22:41 +0100 | [diff] [blame] | 159 | - BUILDMAN="aarch64" |
| 160 | TOOLCHAIN="aarch64" |
Meier, Roger | c7cb334 | 2014-11-19 15:26:18 +0100 | [diff] [blame] | 161 | |
| 162 | # QA jobs for code analytics |
| 163 | # static code analysis with cppcheck (we can add --enable=all later) |
| 164 | - env: |
| 165 | - TEST_CMD="cppcheck --force --quiet --inline-suppr ." |
| 166 | # search for TODO within source tree |
| 167 | - env: |
| 168 | - TEST_CMD="grep -r TODO ." |
| 169 | # search for FIXME within source tree |
| 170 | - env: |
| 171 | - TEST_CMD="grep -r FIXME ." |
| 172 | # search for HACK within source tree and ignore HACKKIT board |
| 173 | - env: |
| 174 | - TEST_CMD="grep -r HACK . | grep -v HACKKIT" |
| 175 | script: |
| 176 | - grep -r HACK . | grep -v HACKKIT |
| 177 | # some statistics about the code base |
| 178 | - env: |
| 179 | - TEST_CMD="sloccount ." |
| 180 | |
Meier, Roger | c7cb334 | 2014-11-19 15:26:18 +0100 | [diff] [blame] | 181 | # TODO make it perfect ;-r |