blob: 67674e2f5878396ac853b4f15336d2ae6e5183c4 [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
6language: c
7
Roger Meier050c7562016-01-25 20:22:41 +01008addons:
9 apt:
10 packages:
11 - cppcheck
12 - sloccount
13 - sparse
14 - bc
15 - build-essential
16 - libsdl1.2-dev
17
Meier, Rogerc7cb3342014-11-19 15:26:18 +010018cache:
19 - apt
20
21install:
Meier, Rogerc7cb3342014-11-19 15:26:18 +010022 # 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, Rogerc7cb3342014-11-19 15:26:18 +010027 - export BUILDMAN_PPC="ppc:"
Heiko Schocherd9aa0192015-03-05 09:02:23 +010028 - export BUILDMAN_ARM="arm:"
29 - export BUILDMAN_SANDBOX="sandbox:"
30 - echo -e "[toolchain]\n${BUILDMAN_ROOT} /\n" > ~/.buildman
Heiko Schocherd9aa0192015-03-05 09:02:23 +010031 - 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, Rogerc7cb3342014-11-19 15:26:18 +010034 - export BUILDMAN_ALIAS="x86:"
Heiko Schocherd9aa0192015-03-05 09:02:23 +010035 - 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, Rogerc7cb3342014-11-19 15:26:18 +010038 - cat ~/.buildman
39
40env:
41 global:
42 - PATH=/tmp/dtc:$PATH
43 - BUILD_DIR=build
Meier, Rogerc7cb3342014-11-19 15:26:18 +010044 - HOSTCC="cc"
45 - HOSTCXX="c++"
Meier, Rogerc7cb3342014-11-19 15:26:18 +010046
47before_script:
Roger Meier050c7562016-01-25 20:22:41 +010048 # 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, Rogerc7cb3342014-11-19 15:26:18 +010058
59script:
60 # the execution sequence for each test
Roger Meier050c7562016-01-25 20:22:41 +010061 - if [[ "${TEST_CMD}" != "" ]]; then
62 ${TEST_CMD};
63 fi
64 - if [[ "${BUILDMAN}" != "" ]]; then
65 tools/buildman/buildman ${BUILDMAN};
66 fi
Meier, Rogerc7cb3342014-11-19 15:26:18 +010067
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:
Roger Meier050c7562016-01-25 20:22:41 +010073 - BUILDMAN="arm1136"
74 TOOLCHAIN="arm"
Meier, Rogerc7cb3342014-11-19 15:26:18 +010075 - env:
Roger Meier050c7562016-01-25 20:22:41 +010076 - BUILDMAN="arm1136"
77 TOOLCHAIN="arm"
Meier, Rogerc7cb3342014-11-19 15:26:18 +010078 - env:
Roger Meier050c7562016-01-25 20:22:41 +010079 - BUILDMAN="arm1176"
80 TOOLCHAIN="arm"
Meier, Rogerc7cb3342014-11-19 15:26:18 +010081 - env:
Roger Meier050c7562016-01-25 20:22:41 +010082 - BUILDMAN="arm720t"
83 TOOLCHAIN="arm"
Meier, Rogerc7cb3342014-11-19 15:26:18 +010084 - env:
Roger Meier050c7562016-01-25 20:22:41 +010085 - BUILDMAN="arm920t"
86 TOOLCHAIN="arm"
Meier, Rogerc7cb3342014-11-19 15:26:18 +010087 - env:
Roger Meier050c7562016-01-25 20:22:41 +010088 - BUILDMAN="atmel -x avr32"
89 TOOLCHAIN="arm"
Meier, Rogerc7cb3342014-11-19 15:26:18 +010090 - env:
Roger Meier050c7562016-01-25 20:22:41 +010091 - BUILDMAN="avr32"
92 TOOLCHAIN="avr32"
Meier, Rogerc7cb3342014-11-19 15:26:18 +010093 - env:
Roger Meier050c7562016-01-25 20:22:41 +010094 - BUILDMAN="davinci"
95 TOOLCHAIN="arm"
Meier, Rogerc7cb3342014-11-19 15:26:18 +010096 - env:
Roger Meier050c7562016-01-25 20:22:41 +010097 - BUILDMAN="denx"
98 TOOLCHAIN="arm"
Heiko Schocherd9aa0192015-03-05 09:02:23 +010099 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100100 - BUILDMAN="freescale -x powerpc,m68k,aarch64"
101 TOOLCHAIN="arm"
Heiko Schocherd9aa0192015-03-05 09:02:23 +0100102 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100103 - BUILDMAN="sandbox x86"
104 TOOLCHAIN="i386"
Heiko Schocherd9aa0192015-03-05 09:02:23 +0100105 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100106 - BUILDMAN="kirkwood"
107 TOOLCHAIN="arm"
Heiko Schocherd9aa0192015-03-05 09:02:23 +0100108 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100109 - BUILDMAN="m68k"
110 TOOLCHAIN="m68k"
Heiko Schocher8cb21012015-03-17 08:21:41 +0100111 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100112 - BUILDMAN="mips"
113 TOOLCHAIN="mips"
Heiko Schocher8cb21012015-03-17 08:21:41 +0100114 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100115 - BUILDMAN="mpc512x"
116 TOOLCHAIN="ppc"
Heiko Schocherd9aa0192015-03-05 09:02:23 +0100117 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100118 - BUILDMAN="mpc5xx"
119 TOOLCHAIN="ppc"
Heiko Schocher8cb21012015-03-17 08:21:41 +0100120 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100121 - BUILDMAN="mpc5xxx"
122 TOOLCHAIN="ppc"
Heiko Schocher8cb21012015-03-17 08:21:41 +0100123 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100124 - BUILDMAN="mpc8260"
125 TOOLCHAIN="ppc"
Heiko Schocher8cb21012015-03-17 08:21:41 +0100126 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100127 - BUILDMAN="mpc83xx"
128 TOOLCHAIN="ppc"
Heiko Schocher8cb21012015-03-17 08:21:41 +0100129 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100130 - BUILDMAN="mpc85xx -x freescale"
131 TOOLCHAIN="ppc"
Heiko Schocherd9aa0192015-03-05 09:02:23 +0100132 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100133 - 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"
Heiko Schocher8cb21012015-03-17 08:21:41 +0100135 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100136 - BUILDMAN="t208xrdb t4qds t102*"
137 TOOLCHAIN="ppc"
Meier, Rogerc7cb3342014-11-19 15:26:18 +0100138 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100139 - BUILDMAN="p1_p2_rdb_pc p1010rdb"
140 TOOLCHAIN="ppc"
Heiko Schocher8cb21012015-03-17 08:21:41 +0100141 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100142 - BUILDMAN="corenet_ds b4860qds sbc8548 bsc91*"
143 TOOLCHAIN="ppc"
Meier, Rogerc7cb3342014-11-19 15:26:18 +0100144 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100145 - BUILDMAN="mpc86xx"
146 TOOLCHAIN="ppc"
Meier, Rogerc7cb3342014-11-19 15:26:18 +0100147 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100148 - BUILDMAN="mpc8xx"
149 TOOLCHAIN="ppc"
Meier, Rogerc7cb3342014-11-19 15:26:18 +0100150 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100151 - BUILDMAN="siemens"
152 TOOLCHAIN="arm"
Meier, Rogerc7cb3342014-11-19 15:26:18 +0100153 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100154 - BUILDMAN="ti"
155 TOOLCHAIN="arm"
Meier, Rogerc7cb3342014-11-19 15:26:18 +0100156 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100157 - BUILDMAN="aarch64"
158 TOOLCHAIN="aarch64"
Meier, Rogerc7cb3342014-11-19 15:26:18 +0100159
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, Rogerc7cb3342014-11-19 15:26:18 +0100179# TODO make it perfect ;-r