blob: 8caaeb34553efef4862adf930b64b1128682b05a [file] [log] [blame]
Meier, Rogerc7cb3342014-11-19 15:26:18 +01001# 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 Warrene4c1b4d2016-02-03 10:41:34 -07006sudo: true
7
Meier, Rogerc7cb3342014-11-19 15:26:18 +01008language: c
9
Roger Meier050c7562016-01-25 20:22:41 +010010addons:
11 apt:
12 packages:
13 - cppcheck
14 - sloccount
15 - sparse
16 - bc
17 - build-essential
18 - libsdl1.2-dev
19
Meier, Rogerc7cb3342014-11-19 15:26:18 +010020cache:
21 - apt
22
23install:
Meier, Rogerc7cb3342014-11-19 15:26:18 +010024 # 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, Rogerc7cb3342014-11-19 15:26:18 +010029 - export BUILDMAN_PPC="ppc:"
Heiko Schocherd9aa0192015-03-05 09:02:23 +010030 - export BUILDMAN_ARM="arm:"
31 - export BUILDMAN_SANDBOX="sandbox:"
32 - echo -e "[toolchain]\n${BUILDMAN_ROOT} /\n" > ~/.buildman
Heiko Schocherd9aa0192015-03-05 09:02:23 +010033 - 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, Rogerc7cb3342014-11-19 15:26:18 +010036 - export BUILDMAN_ALIAS="x86:"
Heiko Schocherd9aa0192015-03-05 09:02:23 +010037 - 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, Rogerc7cb3342014-11-19 15:26:18 +010040 - cat ~/.buildman
41
42env:
43 global:
44 - PATH=/tmp/dtc:$PATH
45 - BUILD_DIR=build
Meier, Rogerc7cb3342014-11-19 15:26:18 +010046 - HOSTCC="cc"
47 - HOSTCXX="c++"
Meier, Rogerc7cb3342014-11-19 15:26:18 +010048
49before_script:
Roger Meier050c7562016-01-25 20:22:41 +010050 # 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, Rogerc7cb3342014-11-19 15:26:18 +010060
61script:
62 # the execution sequence for each test
Roger Meier050c7562016-01-25 20:22:41 +010063 - if [[ "${TEST_CMD}" != "" ]]; then
64 ${TEST_CMD};
65 fi
66 - if [[ "${BUILDMAN}" != "" ]]; then
67 tools/buildman/buildman ${BUILDMAN};
68 fi
Meier, Rogerc7cb3342014-11-19 15:26:18 +010069
70matrix:
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 Meier050c7562016-01-25 20:22:41 +010075 - BUILDMAN="arm1136"
76 TOOLCHAIN="arm"
Meier, Rogerc7cb3342014-11-19 15:26:18 +010077 - env:
Roger Meier050c7562016-01-25 20:22:41 +010078 - BUILDMAN="arm1136"
79 TOOLCHAIN="arm"
Meier, Rogerc7cb3342014-11-19 15:26:18 +010080 - env:
Roger Meier050c7562016-01-25 20:22:41 +010081 - BUILDMAN="arm1176"
82 TOOLCHAIN="arm"
Meier, Rogerc7cb3342014-11-19 15:26:18 +010083 - env:
Roger Meier050c7562016-01-25 20:22:41 +010084 - BUILDMAN="arm720t"
85 TOOLCHAIN="arm"
Meier, Rogerc7cb3342014-11-19 15:26:18 +010086 - env:
Roger Meier050c7562016-01-25 20:22:41 +010087 - BUILDMAN="arm920t"
88 TOOLCHAIN="arm"
Meier, Rogerc7cb3342014-11-19 15:26:18 +010089 - env:
Roger Meier050c7562016-01-25 20:22:41 +010090 - BUILDMAN="atmel -x avr32"
91 TOOLCHAIN="arm"
Meier, Rogerc7cb3342014-11-19 15:26:18 +010092 - env:
Roger Meier050c7562016-01-25 20:22:41 +010093 - BUILDMAN="avr32"
94 TOOLCHAIN="avr32"
Meier, Rogerc7cb3342014-11-19 15:26:18 +010095 - env:
Roger Meier050c7562016-01-25 20:22:41 +010096 - BUILDMAN="davinci"
97 TOOLCHAIN="arm"
Meier, Rogerc7cb3342014-11-19 15:26:18 +010098 - env:
Roger Meier050c7562016-01-25 20:22:41 +010099 - BUILDMAN="denx"
100 TOOLCHAIN="arm"
Heiko Schocherd9aa0192015-03-05 09:02:23 +0100101 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100102 - BUILDMAN="freescale -x powerpc,m68k,aarch64"
103 TOOLCHAIN="arm"
Heiko Schocherd9aa0192015-03-05 09:02:23 +0100104 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100105 - BUILDMAN="sandbox x86"
106 TOOLCHAIN="i386"
Heiko Schocherd9aa0192015-03-05 09:02:23 +0100107 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100108 - BUILDMAN="kirkwood"
109 TOOLCHAIN="arm"
Heiko Schocherd9aa0192015-03-05 09:02:23 +0100110 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100111 - BUILDMAN="m68k"
112 TOOLCHAIN="m68k"
Heiko Schocher8cb21012015-03-17 08:21:41 +0100113 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100114 - BUILDMAN="mips"
115 TOOLCHAIN="mips"
Heiko Schocher8cb21012015-03-17 08:21:41 +0100116 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100117 - BUILDMAN="mpc512x"
118 TOOLCHAIN="ppc"
Heiko Schocherd9aa0192015-03-05 09:02:23 +0100119 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100120 - BUILDMAN="mpc5xx"
121 TOOLCHAIN="ppc"
Heiko Schocher8cb21012015-03-17 08:21:41 +0100122 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100123 - BUILDMAN="mpc5xxx"
124 TOOLCHAIN="ppc"
Heiko Schocher8cb21012015-03-17 08:21:41 +0100125 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100126 - BUILDMAN="mpc8260"
127 TOOLCHAIN="ppc"
Heiko Schocher8cb21012015-03-17 08:21:41 +0100128 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100129 - BUILDMAN="mpc83xx"
130 TOOLCHAIN="ppc"
Heiko Schocher8cb21012015-03-17 08:21:41 +0100131 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100132 - BUILDMAN="mpc85xx -x freescale"
133 TOOLCHAIN="ppc"
Heiko Schocherd9aa0192015-03-05 09:02:23 +0100134 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100135 - 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 Schocher8cb21012015-03-17 08:21:41 +0100137 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100138 - BUILDMAN="t208xrdb t4qds t102*"
139 TOOLCHAIN="ppc"
Meier, Rogerc7cb3342014-11-19 15:26:18 +0100140 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100141 - BUILDMAN="p1_p2_rdb_pc p1010rdb"
142 TOOLCHAIN="ppc"
Heiko Schocher8cb21012015-03-17 08:21:41 +0100143 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100144 - BUILDMAN="corenet_ds b4860qds sbc8548 bsc91*"
145 TOOLCHAIN="ppc"
Meier, Rogerc7cb3342014-11-19 15:26:18 +0100146 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100147 - BUILDMAN="mpc86xx"
148 TOOLCHAIN="ppc"
Meier, Rogerc7cb3342014-11-19 15:26:18 +0100149 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100150 - BUILDMAN="mpc8xx"
151 TOOLCHAIN="ppc"
Meier, Rogerc7cb3342014-11-19 15:26:18 +0100152 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100153 - BUILDMAN="siemens"
154 TOOLCHAIN="arm"
Meier, Rogerc7cb3342014-11-19 15:26:18 +0100155 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100156 - BUILDMAN="ti"
157 TOOLCHAIN="arm"
Meier, Rogerc7cb3342014-11-19 15:26:18 +0100158 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100159 - BUILDMAN="aarch64"
160 TOOLCHAIN="aarch64"
Meier, Rogerc7cb3342014-11-19 15:26:18 +0100161
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, Rogerc7cb3342014-11-19 15:26:18 +0100181# TODO make it perfect ;-r