blob: 18bf2ed4fcdbca85aa30226e986a3ffbc49a37ec [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
Stephen Warren07bf2122016-02-08 18:23:35 -070019 - python
20 - python-virtualenv
Roger Meier050c7562016-01-25 20:22:41 +010021
Meier, Rogerc7cb3342014-11-19 15:26:18 +010022cache:
23 - apt
24
25install:
Meier, Rogerc7cb3342014-11-19 15:26:18 +010026 # install latest device tree compiler
27 - git clone --depth=1 https://git.kernel.org/pub/scm/utils/dtc/dtc.git /tmp/dtc
28 - make -j4 -C /tmp/dtc
29 # prepare buildman environment
30 - export BUILDMAN_ROOT="root:"
Meier, Rogerc7cb3342014-11-19 15:26:18 +010031 - export BUILDMAN_PPC="ppc:"
Heiko Schocherd9aa0192015-03-05 09:02:23 +010032 - export BUILDMAN_ARM="arm:"
33 - export BUILDMAN_SANDBOX="sandbox:"
34 - echo -e "[toolchain]\n${BUILDMAN_ROOT} /\n" > ~/.buildman
Heiko Schocherd9aa0192015-03-05 09:02:23 +010035 - echo -e "${BUILDMAN_PPC} /opt/eldk-5.4/powerpc/sysroots/i686-eldk-linux/usr/bin/powerpc-linux/\n" >> ~/.buildman
36 - echo -e "${BUILDMAN_ARM} /opt/eldk-5.4/armv5te/sysroots/i686-eldk-linux/usr/bin/armv5te-linux-gnueabi/\n" >> ~/.buildman
37 - echo -e "${BUILDMAN_SANDBOX} /usr/bin/gcc\n" >> ~/.buildman
Meier, Rogerc7cb3342014-11-19 15:26:18 +010038 - export BUILDMAN_ALIAS="x86:"
Heiko Schocherd9aa0192015-03-05 09:02:23 +010039 - export BUILDMAN_ALIAS_ARM="arm:"
40 - echo -e "\n\n[toolchain-alias]\n${BUILDMAN_ALIAS} i386\n" >> ~/.buildman
41 - echo -e "${BUILDMAN_ALIAS_ARM} armv5te\n" >> ~/.buildman
Meier, Rogerc7cb3342014-11-19 15:26:18 +010042 - cat ~/.buildman
Stephen Warren07bf2122016-02-08 18:23:35 -070043 - virtualenv /tmp/venv
44 - . /tmp/venv/bin/activate
45 - pip install pytest
Meier, Rogerc7cb3342014-11-19 15:26:18 +010046
47env:
48 global:
49 - PATH=/tmp/dtc:$PATH
50 - BUILD_DIR=build
Meier, Rogerc7cb3342014-11-19 15:26:18 +010051 - HOSTCC="cc"
52 - HOSTCXX="c++"
Meier, Rogerc7cb3342014-11-19 15:26:18 +010053
54before_script:
Roger Meier050c7562016-01-25 20:22:41 +010055 # install toolchains based on TOOLCHAIN} variable
56 - if [[ "${TOOLCHAIN}" == *aarch64* ]]; then ./tools/buildman/buildman --fetch-arch aarch64 ; fi
57 - 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
58 - if [[ "${TOOLCHAIN}" == *arm* ]]; then sh eldk-eglibc-i686-arm-toolchain-gmae-5.4.sh -y ; fi
59 - if [[ "${TOOLCHAIN}" == *avr32* ]]; then ./tools/buildman/buildman --fetch-arch avr32 ; fi
60 - if [[ "${TOOLCHAIN}" == *i386* ]]; then ./tools/buildman/buildman sandbox --fetch-arch i386 ; fi
61 - if [[ "${TOOLCHAIN}" == *m68k* ]]; then ./tools/buildman/buildman --fetch-arch m68k ; fi
62 - if [[ "${TOOLCHAIN}" == *mips* ]]; then ./tools/buildman/buildman --fetch-arch mips ; fi
63 - 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
64 - if [[ "${TOOLCHAIN}" == *ppc* ]]; then sh eldk-eglibc-i686-powerpc-toolchain-gmae-5.4.sh -y ; fi
Meier, Rogerc7cb3342014-11-19 15:26:18 +010065
66script:
67 # the execution sequence for each test
Roger Meier050c7562016-01-25 20:22:41 +010068 - if [[ "${TEST_CMD}" != "" ]]; then
69 ${TEST_CMD};
70 fi
71 - if [[ "${BUILDMAN}" != "" ]]; then
72 tools/buildman/buildman ${BUILDMAN};
73 fi
Meier, Rogerc7cb3342014-11-19 15:26:18 +010074
75matrix:
76 include:
77 # we need to build by vendor due to 50min time limit for builds
78 # each env setting here is a dedicated build
79 - env:
Roger Meier050c7562016-01-25 20:22:41 +010080 - BUILDMAN="arm1136"
81 TOOLCHAIN="arm"
Meier, Rogerc7cb3342014-11-19 15:26:18 +010082 - env:
Roger Meier050c7562016-01-25 20:22:41 +010083 - BUILDMAN="arm1136"
84 TOOLCHAIN="arm"
Meier, Rogerc7cb3342014-11-19 15:26:18 +010085 - env:
Roger Meier050c7562016-01-25 20:22:41 +010086 - BUILDMAN="arm1176"
87 TOOLCHAIN="arm"
Meier, Rogerc7cb3342014-11-19 15:26:18 +010088 - env:
Roger Meier050c7562016-01-25 20:22:41 +010089 - BUILDMAN="arm720t"
90 TOOLCHAIN="arm"
Meier, Rogerc7cb3342014-11-19 15:26:18 +010091 - env:
Roger Meier050c7562016-01-25 20:22:41 +010092 - BUILDMAN="arm920t"
93 TOOLCHAIN="arm"
Meier, Rogerc7cb3342014-11-19 15:26:18 +010094 - env:
Roger Meier050c7562016-01-25 20:22:41 +010095 - BUILDMAN="atmel -x avr32"
96 TOOLCHAIN="arm"
Meier, Rogerc7cb3342014-11-19 15:26:18 +010097 - env:
Roger Meier050c7562016-01-25 20:22:41 +010098 - BUILDMAN="avr32"
99 TOOLCHAIN="avr32"
Meier, Rogerc7cb3342014-11-19 15:26:18 +0100100 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100101 - BUILDMAN="davinci"
102 TOOLCHAIN="arm"
Meier, Rogerc7cb3342014-11-19 15:26:18 +0100103 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100104 - BUILDMAN="denx"
105 TOOLCHAIN="arm"
Heiko Schocherd9aa0192015-03-05 09:02:23 +0100106 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100107 - BUILDMAN="freescale -x powerpc,m68k,aarch64"
108 TOOLCHAIN="arm"
Heiko Schocherd9aa0192015-03-05 09:02:23 +0100109 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100110 - BUILDMAN="sandbox x86"
111 TOOLCHAIN="i386"
Heiko Schocherd9aa0192015-03-05 09:02:23 +0100112 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100113 - BUILDMAN="kirkwood"
114 TOOLCHAIN="arm"
Heiko Schocherd9aa0192015-03-05 09:02:23 +0100115 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100116 - BUILDMAN="m68k"
117 TOOLCHAIN="m68k"
Heiko Schocher8cb21012015-03-17 08:21:41 +0100118 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100119 - BUILDMAN="mips"
120 TOOLCHAIN="mips"
Heiko Schocher8cb21012015-03-17 08:21:41 +0100121 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100122 - BUILDMAN="mpc512x"
123 TOOLCHAIN="ppc"
Heiko Schocherd9aa0192015-03-05 09:02:23 +0100124 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100125 - BUILDMAN="mpc5xx"
126 TOOLCHAIN="ppc"
Heiko Schocher8cb21012015-03-17 08:21:41 +0100127 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100128 - BUILDMAN="mpc5xxx"
129 TOOLCHAIN="ppc"
Heiko Schocher8cb21012015-03-17 08:21:41 +0100130 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100131 - BUILDMAN="mpc8260"
132 TOOLCHAIN="ppc"
Heiko Schocher8cb21012015-03-17 08:21:41 +0100133 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100134 - BUILDMAN="mpc83xx"
135 TOOLCHAIN="ppc"
Heiko Schocher8cb21012015-03-17 08:21:41 +0100136 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100137 - BUILDMAN="mpc85xx -x freescale"
138 TOOLCHAIN="ppc"
Heiko Schocherd9aa0192015-03-05 09:02:23 +0100139 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100140 - BUILDMAN="mpc85xx -x t208xrdb -x t4qds -x t102* -x p1_p2_rdb_pc -x p1010rdb -x corenet_ds -x b4860qds -x sbc8548 -x bsc91*"
141 TOOLCHAIN="ppc"
Heiko Schocher8cb21012015-03-17 08:21:41 +0100142 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100143 - BUILDMAN="t208xrdb t4qds t102*"
144 TOOLCHAIN="ppc"
Meier, Rogerc7cb3342014-11-19 15:26:18 +0100145 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100146 - BUILDMAN="p1_p2_rdb_pc p1010rdb"
147 TOOLCHAIN="ppc"
Heiko Schocher8cb21012015-03-17 08:21:41 +0100148 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100149 - BUILDMAN="corenet_ds b4860qds sbc8548 bsc91*"
150 TOOLCHAIN="ppc"
Meier, Rogerc7cb3342014-11-19 15:26:18 +0100151 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100152 - BUILDMAN="mpc86xx"
153 TOOLCHAIN="ppc"
Meier, Rogerc7cb3342014-11-19 15:26:18 +0100154 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100155 - BUILDMAN="mpc8xx"
156 TOOLCHAIN="ppc"
Meier, Rogerc7cb3342014-11-19 15:26:18 +0100157 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100158 - BUILDMAN="siemens"
159 TOOLCHAIN="arm"
Meier, Rogerc7cb3342014-11-19 15:26:18 +0100160 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100161 - BUILDMAN="ti"
162 TOOLCHAIN="arm"
Meier, Rogerc7cb3342014-11-19 15:26:18 +0100163 - env:
Roger Meier050c7562016-01-25 20:22:41 +0100164 - BUILDMAN="aarch64"
165 TOOLCHAIN="aarch64"
Meier, Rogerc7cb3342014-11-19 15:26:18 +0100166
167 # QA jobs for code analytics
168 # static code analysis with cppcheck (we can add --enable=all later)
169 - env:
170 - TEST_CMD="cppcheck --force --quiet --inline-suppr ."
171 # search for TODO within source tree
172 - env:
173 - TEST_CMD="grep -r TODO ."
174 # search for FIXME within source tree
175 - env:
176 - TEST_CMD="grep -r FIXME ."
177 # search for HACK within source tree and ignore HACKKIT board
178 - env:
179 - TEST_CMD="grep -r HACK . | grep -v HACKKIT"
180 script:
181 - grep -r HACK . | grep -v HACKKIT
182 # some statistics about the code base
183 - env:
184 - TEST_CMD="sloccount ."
Stephen Warren07bf2122016-02-08 18:23:35 -0700185 # test/py
186 - env:
187 - TEST_CMD="./test/py/test.py --bd sandbox --build"
Meier, Rogerc7cb3342014-11-19 15:26:18 +0100188
Meier, Rogerc7cb3342014-11-19 15:26:18 +0100189# TODO make it perfect ;-r