blob: 923c9ddc3efdba52d3a2e989ac7b8c85528e17de [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
8cache:
9 - apt
10
11install:
12 # install U-Boot build dependencies
13 - sudo apt-get install -qq cppcheck sloccount sparse bc libsdl-dev gcc-arm-linux-gnueabi gcc-arm-linux-gnueabihf
14 # install latest device tree compiler
15 - git clone --depth=1 https://git.kernel.org/pub/scm/utils/dtc/dtc.git /tmp/dtc
16 - make -j4 -C /tmp/dtc
17 # prepare buildman environment
18 - export BUILDMAN_ROOT="root:"
19 - export BUILDMAN_MIPS="mips:"
20 - export BUILDMAN_PPC="ppc:"
21 - echo -e "[toolchain]\\n${BUILDMAN_ROOT} /\n" > ~/.buildman
22 - echo -e "${BUILDMAN_MIPS} /opt/eldk-5.4/mips/sysroots/i686-eldk-linux/usr/bin/mips32-linux/" >> ~/.buildman
23 - echo -e "${BUILDMAN_PPC} /opt/eldk-5.4/powerpc/sysroots/i686-eldk-linux/usr/bin/powerpc-linux/" >> ~/.buildman
24 - export BUILDMAN_ALIAS="x86:"
25 - echo -e "[toolchain-alias]\\n${BUILDMAN_ALIAS} i386" >> ~/.buildman
26 - cat ~/.buildman
27
28env:
29 global:
30 - PATH=/tmp/dtc:$PATH
31 - BUILD_DIR=build
32 - CROSS_COMPILE=""
33 - HOSTCC="cc"
34 - HOSTCXX="c++"
35 - TEST_CONFIG_CMD=""
36
37before_script:
38 # install toolchains based on INSTALL_TOOLCHAIN} variable
39 - if [[ "${INSTALL_TOOLCHAIN}" == *ppc* ]]; then wget ftp://ftp.denx.de/pub/eldk/5.4/targets/powerpc/eldk-eglibc-i686-powerpc-toolchain-gmae-5.4.sh ; fi
40 - if [[ "${INSTALL_TOOLCHAIN}" == *ppc* ]]; then sh eldk-eglibc-i686-powerpc-toolchain-gmae-5.4.sh -y ; fi
41 - if [[ "${INSTALL_TOOLCHAIN}" == *mips* ]]; then wget ftp://ftp.denx.de/pub/eldk/5.4/targets/mips/eldk-eglibc-i686-mips-toolchain-gmae-5.4.sh ; fi
42 - if [[ "${INSTALL_TOOLCHAIN}" == *mips* ]]; then sh eldk-eglibc-i686-mips-toolchain-gmae-5.4.sh -y ; fi
43
44script:
45 # the execution sequence for each test
46 - echo ${TEST_CONFIG_CMD}
47 - ${TEST_CONFIG_CMD}
48 - echo ${TEST_CMD}
49 - ${TEST_CMD}
50
51matrix:
52 include:
53 # we need to build by vendor due to 50min time limit for builds
54 # each env setting here is a dedicated build
55 - env:
56 - TEST_CMD="./MAKEALL -a arm -v atmel"
57 CROSS_COMPILE="arm-linux-gnueabi-"
58 - env:
59 - TEST_CMD="./MAKEALL -a arm -v denx"
60 CROSS_COMPILE="arm-linux-gnueabi-"
61 - env:
62 - TEST_CMD="./MAKEALL -a arm -v freescale"
63 CROSS_COMPILE="arm-linux-gnueabi-"
64 - env:
65 - TEST_CMD="./MAKEALL -a arm -v siemens"
66 CROSS_COMPILE="arm-linux-gnueabi-"
67 - env:
68 - TEST_CMD="./MAKEALL -a arm -v ti"
69 CROSS_COMPILE="arm-linux-gnueabi-"
70 - env:
71 - TEST_CONFIG_CMD="make sandbox_defconfig"
72 TEST_CMD="make -j4"
73 HOSTCC = "gcc"
74 HOSTCXX = "g++"
75 - env:
76 - TEST_CONFIG_CMD="make sandbox_defconfig"
77 TEST_CMD="make -j4"
78 HOSTCC = "clang"
79 HOSTCXX = "clang++"
80 - env:
81 - TEST_CMD="./MAKEALL -a mips"
82 INSTALL_TOOLCHAIN="mips"
83 CROSS_COMPILE="/opt/eldk-5.4/mips/sysroots/i686-eldk-linux/usr/bin/mips32-linux/mips-linux-"
84 - env:
85 - TEST_CMD="tools/buildman/buildman --list-error-boards atmel"
86 - env:
87 - TEST_CMD="tools/buildman/buildman --list-error-boards denx"
88 - env:
89 - TEST_CMD="tools/buildman/buildman --list-error-boards freescale arm"
90 - env:
91 - TEST_CMD="tools/buildman/buildman --list-error-boards siemens"
92 - env:
93 - TEST_CMD="tools/buildman/buildman --list-error-boards ti"
94 - env:
95 - TEST_CMD="tools/buildman/buildman mips"
96 INSTALL_TOOLCHAIN="mips"
97 - env:
98 - TEST_CMD="tools/buildman/buildman mpc5xx"
99 INSTALL_TOOLCHAIN="ppc"
100 - env:
101 - TEST_CMD="tools/buildman/buildman mpc8xx"
102 INSTALL_TOOLCHAIN="ppc"
103 - env:
104 - TEST_CMD="tools/buildman/buildman mpc5xxx"
105 INSTALL_TOOLCHAIN="ppc"
106 - env:
107 - TEST_CMD="tools/buildman/buildman mpc512x"
108 INSTALL_TOOLCHAIN="ppc"
109 - env:
Meier, Rogerc7cb3342014-11-19 15:26:18 +0100110 - TEST_CMD="tools/buildman/buildman mpc8260"
111 INSTALL_TOOLCHAIN="ppc"
112 - env:
113 - TEST_CMD="tools/buildman/buildman mpc83xx"
114 INSTALL_TOOLCHAIN="ppc"
115 - env:
116 - TEST_CMD="tools/buildman/buildman mpc85xx"
117 INSTALL_TOOLCHAIN="ppc"
118 - env:
119 - TEST_CMD="tools/buildman/buildman mpc86xx"
120 INSTALL_TOOLCHAIN="ppc"
121
122 - env:
123 - TEST_CMD="tools/buildman/buildman --list-error-boards sandbox x86"
124
125 # QA jobs for code analytics
126 # static code analysis with cppcheck (we can add --enable=all later)
127 - env:
128 - TEST_CMD="cppcheck --force --quiet --inline-suppr ."
129 # search for TODO within source tree
130 - env:
131 - TEST_CMD="grep -r TODO ."
132 # search for FIXME within source tree
133 - env:
134 - TEST_CMD="grep -r FIXME ."
135 # search for HACK within source tree and ignore HACKKIT board
136 - env:
137 - TEST_CMD="grep -r HACK . | grep -v HACKKIT"
138 script:
139 - grep -r HACK . | grep -v HACKKIT
140 # some statistics about the code base
141 - env:
142 - TEST_CMD="sloccount ."
143
144notifications:
145 email: false
146
147# TODO make it perfect ;-r