blob: 845f6cad9400dada7bd76c56983fbd38cd4307c3 [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
Tom Rini2bb76f32016-10-20 11:03:19 -04006sudo: required
7dist: trusty
Stephen Warrene4c1b4d2016-02-03 10:41:34 -07008
Meier, Rogerc7cb3342014-11-19 15:26:18 +01009language: c
10
Roger Meier050c7562016-01-25 20:22:41 +010011addons:
12 apt:
13 packages:
14 - cppcheck
15 - sloccount
16 - sparse
17 - bc
18 - build-essential
19 - libsdl1.2-dev
Stephen Warren07bf2122016-02-08 18:23:35 -070020 - python
21 - python-virtualenv
Roger Meier050c7562016-01-25 20:22:41 +010022
Meier, Rogerc7cb3342014-11-19 15:26:18 +010023cache:
24 - apt
25
26install:
Meier, Rogerc7cb3342014-11-19 15:26:18 +010027 # install latest device tree compiler
28 - git clone --depth=1 https://git.kernel.org/pub/scm/utils/dtc/dtc.git /tmp/dtc
29 - make -j4 -C /tmp/dtc
30 # prepare buildman environment
31 - export BUILDMAN_ROOT="root:"
Meier, Rogerc7cb3342014-11-19 15:26:18 +010032 - export BUILDMAN_PPC="ppc:"
Heiko Schocherd9aa0192015-03-05 09:02:23 +010033 - export BUILDMAN_ARM="arm:"
34 - export BUILDMAN_SANDBOX="sandbox:"
35 - echo -e "[toolchain]\n${BUILDMAN_ROOT} /\n" > ~/.buildman
Heiko Schocherd9aa0192015-03-05 09:02:23 +010036 - echo -e "${BUILDMAN_PPC} /opt/eldk-5.4/powerpc/sysroots/i686-eldk-linux/usr/bin/powerpc-linux/\n" >> ~/.buildman
37 - echo -e "${BUILDMAN_ARM} /opt/eldk-5.4/armv5te/sysroots/i686-eldk-linux/usr/bin/armv5te-linux-gnueabi/\n" >> ~/.buildman
38 - echo -e "${BUILDMAN_SANDBOX} /usr/bin/gcc\n" >> ~/.buildman
Meier, Rogerc7cb3342014-11-19 15:26:18 +010039 - export BUILDMAN_ALIAS="x86:"
Heiko Schocherd9aa0192015-03-05 09:02:23 +010040 - export BUILDMAN_ALIAS_ARM="arm:"
41 - echo -e "\n\n[toolchain-alias]\n${BUILDMAN_ALIAS} i386\n" >> ~/.buildman
42 - echo -e "${BUILDMAN_ALIAS_ARM} armv5te\n" >> ~/.buildman
Meier, Rogerc7cb3342014-11-19 15:26:18 +010043 - cat ~/.buildman
Stephen Warren07bf2122016-02-08 18:23:35 -070044 - virtualenv /tmp/venv
45 - . /tmp/venv/bin/activate
46 - pip install pytest
Meier, Rogerc7cb3342014-11-19 15:26:18 +010047
48env:
49 global:
50 - PATH=/tmp/dtc:$PATH
51 - BUILD_DIR=build
Meier, Rogerc7cb3342014-11-19 15:26:18 +010052 - HOSTCC="cc"
53 - HOSTCXX="c++"
Meier, Rogerc7cb3342014-11-19 15:26:18 +010054
55before_script:
Roger Meier050c7562016-01-25 20:22:41 +010056 # install toolchains based on TOOLCHAIN} variable
57 - if [[ "${TOOLCHAIN}" == *aarch64* ]]; then ./tools/buildman/buildman --fetch-arch aarch64 ; fi
58 - 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
59 - if [[ "${TOOLCHAIN}" == *arm* ]]; then sh eldk-eglibc-i686-arm-toolchain-gmae-5.4.sh -y ; fi
60 - if [[ "${TOOLCHAIN}" == *avr32* ]]; then ./tools/buildman/buildman --fetch-arch avr32 ; fi
61 - if [[ "${TOOLCHAIN}" == *i386* ]]; then ./tools/buildman/buildman sandbox --fetch-arch i386 ; fi
62 - if [[ "${TOOLCHAIN}" == *m68k* ]]; then ./tools/buildman/buildman --fetch-arch m68k ; fi
63 - if [[ "${TOOLCHAIN}" == *mips* ]]; then ./tools/buildman/buildman --fetch-arch mips ; fi
64 - 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
65 - if [[ "${TOOLCHAIN}" == *ppc* ]]; then sh eldk-eglibc-i686-powerpc-toolchain-gmae-5.4.sh -y ; fi
Meier, Rogerc7cb3342014-11-19 15:26:18 +010066
67script:
68 # the execution sequence for each test
Roger Meier050c7562016-01-25 20:22:41 +010069 - if [[ "${TEST_CMD}" != "" ]]; then
70 ${TEST_CMD};
71 fi
72 - if [[ "${BUILDMAN}" != "" ]]; then
73 tools/buildman/buildman ${BUILDMAN};
74 fi
Meier, Rogerc7cb3342014-11-19 15:26:18 +010075
76matrix:
77 include:
78 # we need to build by vendor due to 50min time limit for builds
79 # each env setting here is a dedicated build
80 - env:
Roger Meier050c7562016-01-25 20:22:41 +010081 - BUILDMAN="arm1136"
82 TOOLCHAIN="arm"
Meier, Rogerc7cb3342014-11-19 15:26:18 +010083 - env:
Roger Meier050c7562016-01-25 20:22:41 +010084 - BUILDMAN="arm1136"
85 TOOLCHAIN="arm"
Meier, Rogerc7cb3342014-11-19 15:26:18 +010086 - env:
Roger Meier050c7562016-01-25 20:22:41 +010087 - BUILDMAN="arm1176"
88 TOOLCHAIN="arm"
Meier, Rogerc7cb3342014-11-19 15:26:18 +010089 - env:
Roger Meier050c7562016-01-25 20:22:41 +010090 - BUILDMAN="arm720t"
91 TOOLCHAIN="arm"
Meier, Rogerc7cb3342014-11-19 15:26:18 +010092 - env:
Roger Meier050c7562016-01-25 20:22:41 +010093 - BUILDMAN="arm920t"
94 TOOLCHAIN="arm"
Meier, Rogerc7cb3342014-11-19 15:26:18 +010095 - env:
Roger Meier050c7562016-01-25 20:22:41 +010096 - BUILDMAN="atmel -x avr32"
97 TOOLCHAIN="arm"
Meier, Rogerc7cb3342014-11-19 15:26:18 +010098 - env:
Roger Meier050c7562016-01-25 20:22:41 +010099 - BUILDMAN="avr32"
100 TOOLCHAIN="avr32"
Meier, Rogerc7cb3342014-11-19 15:26:18 +0100101 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100102 - BUILDMAN="davinci"
103 TOOLCHAIN="arm"
Meier, Rogerc7cb3342014-11-19 15:26:18 +0100104 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100105 - BUILDMAN="denx"
106 TOOLCHAIN="arm"
Heiko Schocherd9aa0192015-03-05 09:02:23 +0100107 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100108 - BUILDMAN="freescale -x powerpc,m68k,aarch64"
109 TOOLCHAIN="arm"
Heiko Schocherd9aa0192015-03-05 09:02:23 +0100110 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100111 - BUILDMAN="sandbox x86"
112 TOOLCHAIN="i386"
Heiko Schocherd9aa0192015-03-05 09:02:23 +0100113 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100114 - BUILDMAN="kirkwood"
115 TOOLCHAIN="arm"
Heiko Schocherd9aa0192015-03-05 09:02:23 +0100116 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100117 - BUILDMAN="m68k"
118 TOOLCHAIN="m68k"
Heiko Schocher8cb21012015-03-17 08:21:41 +0100119 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100120 - BUILDMAN="mips"
121 TOOLCHAIN="mips"
Heiko Schocher8cb21012015-03-17 08:21:41 +0100122 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100123 - BUILDMAN="mpc512x"
124 TOOLCHAIN="ppc"
Heiko Schocherd9aa0192015-03-05 09:02:23 +0100125 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100126 - BUILDMAN="mpc5xx"
127 TOOLCHAIN="ppc"
Heiko Schocher8cb21012015-03-17 08:21:41 +0100128 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100129 - BUILDMAN="mpc5xxx"
130 TOOLCHAIN="ppc"
Heiko Schocher8cb21012015-03-17 08:21:41 +0100131 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100132 - BUILDMAN="mpc8260"
133 TOOLCHAIN="ppc"
Heiko Schocher8cb21012015-03-17 08:21:41 +0100134 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100135 - BUILDMAN="mpc83xx"
136 TOOLCHAIN="ppc"
Heiko Schocher8cb21012015-03-17 08:21:41 +0100137 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100138 - BUILDMAN="mpc85xx -x freescale"
139 TOOLCHAIN="ppc"
Heiko Schocherd9aa0192015-03-05 09:02:23 +0100140 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100141 - BUILDMAN="mpc85xx -x t208xrdb -x t4qds -x t102* -x p1_p2_rdb_pc -x p1010rdb -x corenet_ds -x b4860qds -x sbc8548 -x bsc91*"
142 TOOLCHAIN="ppc"
Heiko Schocher8cb21012015-03-17 08:21:41 +0100143 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100144 - BUILDMAN="t208xrdb t4qds t102*"
145 TOOLCHAIN="ppc"
Meier, Rogerc7cb3342014-11-19 15:26:18 +0100146 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100147 - BUILDMAN="p1_p2_rdb_pc p1010rdb"
148 TOOLCHAIN="ppc"
Heiko Schocher8cb21012015-03-17 08:21:41 +0100149 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100150 - BUILDMAN="corenet_ds b4860qds sbc8548 bsc91*"
151 TOOLCHAIN="ppc"
Meier, Rogerc7cb3342014-11-19 15:26:18 +0100152 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100153 - BUILDMAN="mpc86xx"
154 TOOLCHAIN="ppc"
Meier, Rogerc7cb3342014-11-19 15:26:18 +0100155 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100156 - BUILDMAN="mpc8xx"
157 TOOLCHAIN="ppc"
Meier, Rogerc7cb3342014-11-19 15:26:18 +0100158 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100159 - BUILDMAN="siemens"
160 TOOLCHAIN="arm"
Meier, Rogerc7cb3342014-11-19 15:26:18 +0100161 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100162 - BUILDMAN="ti"
163 TOOLCHAIN="arm"
Meier, Rogerc7cb3342014-11-19 15:26:18 +0100164 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100165 - BUILDMAN="aarch64"
166 TOOLCHAIN="aarch64"
Meier, Rogerc7cb3342014-11-19 15:26:18 +0100167
168 # QA jobs for code analytics
169 # static code analysis with cppcheck (we can add --enable=all later)
170 - env:
171 - TEST_CMD="cppcheck --force --quiet --inline-suppr ."
172 # search for TODO within source tree
173 - env:
174 - TEST_CMD="grep -r TODO ."
175 # search for FIXME within source tree
176 - env:
177 - TEST_CMD="grep -r FIXME ."
178 # search for HACK within source tree and ignore HACKKIT board
179 - env:
180 - TEST_CMD="grep -r HACK . | grep -v HACKKIT"
181 script:
182 - grep -r HACK . | grep -v HACKKIT
183 # some statistics about the code base
184 - env:
185 - TEST_CMD="sloccount ."
Stephen Warren07bf2122016-02-08 18:23:35 -0700186 # test/py
187 - env:
188 - TEST_CMD="./test/py/test.py --bd sandbox --build"
Meier, Rogerc7cb3342014-11-19 15:26:18 +0100189
Meier, Rogerc7cb3342014-11-19 15:26:18 +0100190# TODO make it perfect ;-r