]>
Commit | Line | Data |
---|---|---|
c7cb334d MR |
1 | # 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 | ||
2bb76f33 TR |
6 | sudo: required |
7 | dist: trusty | |
e4c1b4d8 | 8 | |
c7cb334d MR |
9 | language: c |
10 | ||
050c7569 RM |
11 | addons: |
12 | apt: | |
13 | packages: | |
14 | - cppcheck | |
15 | - sloccount | |
16 | - sparse | |
17 | - bc | |
18 | - build-essential | |
19 | - libsdl1.2-dev | |
07bf2122 SW |
20 | - python |
21 | - python-virtualenv | |
050c7569 | 22 | |
c7cb334d MR |
23 | cache: |
24 | - apt | |
25 | ||
26 | install: | |
c7cb334d MR |
27 | # 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:" | |
c7cb334d | 32 | - export BUILDMAN_PPC="ppc:" |
d9aa0197 HS |
33 | - export BUILDMAN_ARM="arm:" |
34 | - export BUILDMAN_SANDBOX="sandbox:" | |
35 | - echo -e "[toolchain]\n${BUILDMAN_ROOT} /\n" > ~/.buildman | |
d9aa0197 HS |
36 | - 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 | |
c7cb334d | 39 | - export BUILDMAN_ALIAS="x86:" |
d9aa0197 HS |
40 | - 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 | |
c7cb334d | 43 | - cat ~/.buildman |
07bf2122 SW |
44 | - virtualenv /tmp/venv |
45 | - . /tmp/venv/bin/activate | |
46 | - pip install pytest | |
c7cb334d MR |
47 | |
48 | env: | |
49 | global: | |
50 | - PATH=/tmp/dtc:$PATH | |
51 | - BUILD_DIR=build | |
c7cb334d MR |
52 | - HOSTCC="cc" |
53 | - HOSTCXX="c++" | |
c7cb334d MR |
54 | |
55 | before_script: | |
050c7569 RM |
56 | # 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 | |
c7cb334d MR |
66 | |
67 | script: | |
68 | # the execution sequence for each test | |
050c7569 RM |
69 | - if [[ "${TEST_CMD}" != "" ]]; then |
70 | ${TEST_CMD}; | |
71 | fi | |
72 | - if [[ "${BUILDMAN}" != "" ]]; then | |
73 | tools/buildman/buildman ${BUILDMAN}; | |
74 | fi | |
c7cb334d MR |
75 | |
76 | matrix: | |
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: | |
050c7569 RM |
81 | - BUILDMAN="arm1136" |
82 | TOOLCHAIN="arm" | |
83 | - env: | |
84 | - BUILDMAN="arm1136" | |
85 | TOOLCHAIN="arm" | |
86 | - env: | |
87 | - BUILDMAN="arm1176" | |
88 | TOOLCHAIN="arm" | |
c7cb334d | 89 | - env: |
050c7569 RM |
90 | - BUILDMAN="arm720t" |
91 | TOOLCHAIN="arm" | |
c7cb334d | 92 | - env: |
050c7569 RM |
93 | - BUILDMAN="arm920t" |
94 | TOOLCHAIN="arm" | |
c7cb334d | 95 | - env: |
050c7569 RM |
96 | - BUILDMAN="atmel -x avr32" |
97 | TOOLCHAIN="arm" | |
c7cb334d | 98 | - env: |
050c7569 RM |
99 | - BUILDMAN="avr32" |
100 | TOOLCHAIN="avr32" | |
c7cb334d | 101 | - env: |
050c7569 RM |
102 | - BUILDMAN="davinci" |
103 | TOOLCHAIN="arm" | |
c7cb334d | 104 | - env: |
050c7569 RM |
105 | - BUILDMAN="denx" |
106 | TOOLCHAIN="arm" | |
c7cb334d | 107 | - env: |
050c7569 RM |
108 | - BUILDMAN="freescale -x powerpc,m68k,aarch64" |
109 | TOOLCHAIN="arm" | |
c7cb334d | 110 | - env: |
050c7569 RM |
111 | - BUILDMAN="sandbox x86" |
112 | TOOLCHAIN="i386" | |
c7cb334d | 113 | - env: |
050c7569 RM |
114 | - BUILDMAN="kirkwood" |
115 | TOOLCHAIN="arm" | |
c7cb334d | 116 | - env: |
050c7569 RM |
117 | - BUILDMAN="m68k" |
118 | TOOLCHAIN="m68k" | |
c7cb334d | 119 | - env: |
050c7569 RM |
120 | - BUILDMAN="mips" |
121 | TOOLCHAIN="mips" | |
d9aa0197 | 122 | - env: |
050c7569 RM |
123 | - BUILDMAN="mpc512x" |
124 | TOOLCHAIN="ppc" | |
d9aa0197 | 125 | - env: |
050c7569 RM |
126 | - BUILDMAN="mpc5xx" |
127 | TOOLCHAIN="ppc" | |
d9aa0197 | 128 | - env: |
050c7569 RM |
129 | - BUILDMAN="mpc5xxx" |
130 | TOOLCHAIN="ppc" | |
d9aa0197 | 131 | - env: |
050c7569 RM |
132 | - BUILDMAN="mpc8260" |
133 | TOOLCHAIN="ppc" | |
c7cb334d | 134 | - env: |
050c7569 RM |
135 | - BUILDMAN="mpc83xx" |
136 | TOOLCHAIN="ppc" | |
c7cb334d | 137 | - env: |
050c7569 RM |
138 | - BUILDMAN="mpc85xx -x freescale" |
139 | TOOLCHAIN="ppc" | |
d9aa0197 | 140 | - env: |
050c7569 RM |
141 | - 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" | |
d9aa0197 | 143 | - env: |
050c7569 RM |
144 | - BUILDMAN="t208xrdb t4qds t102*" |
145 | TOOLCHAIN="ppc" | |
8cb2101b | 146 | - env: |
050c7569 RM |
147 | - BUILDMAN="p1_p2_rdb_pc p1010rdb" |
148 | TOOLCHAIN="ppc" | |
d9aa0197 | 149 | - env: |
050c7569 RM |
150 | - BUILDMAN="corenet_ds b4860qds sbc8548 bsc91*" |
151 | TOOLCHAIN="ppc" | |
c7cb334d | 152 | - env: |
050c7569 RM |
153 | - BUILDMAN="mpc86xx" |
154 | TOOLCHAIN="ppc" | |
c7cb334d | 155 | - env: |
050c7569 RM |
156 | - BUILDMAN="mpc8xx" |
157 | TOOLCHAIN="ppc" | |
c7cb334d | 158 | - env: |
050c7569 RM |
159 | - BUILDMAN="siemens" |
160 | TOOLCHAIN="arm" | |
161 | - env: | |
162 | - BUILDMAN="ti" | |
163 | TOOLCHAIN="arm" | |
164 | - env: | |
165 | - BUILDMAN="aarch64" | |
166 | TOOLCHAIN="aarch64" | |
c7cb334d MR |
167 | |
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 ." | |
07bf2122 SW |
186 | # test/py |
187 | - env: | |
188 | - TEST_CMD="./test/py/test.py --bd sandbox --build" | |
c7cb334d | 189 | |
c7cb334d | 190 | # TODO make it perfect ;-r |