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