]>
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 | ||
2bb76f33 TR |
6 | sudo: required |
7 | dist: trusty | |
e4c1b4d8 | 8 | |
c7cb334d MR |
9 | language: c |
10 | ||
050c7569 RM |
11 | addons: |
12 | apt: | |
5ac5861c TR |
13 | sources: |
14 | - sourceline: 'ppa:gns3/qemu' | |
050c7569 RM |
15 | packages: |
16 | - cppcheck | |
17 | - sloccount | |
18 | - sparse | |
19 | - bc | |
20 | - build-essential | |
21 | - libsdl1.2-dev | |
07bf2122 SW |
22 | - python |
23 | - python-virtualenv | |
5ac5861c TR |
24 | - qemu-system-arm |
25 | - qemu-system-mips | |
26 | - qemu-system-ppc | |
27 | - qemu-system-x86 | |
cd402e01 TR |
28 | - gcc-powerpc-linux-gnu |
29 | - gcc-arm-linux-gnueabihf | |
5eba31c3 | 30 | - gcc-aarch64-linux-gnu |
cd402e01 | 31 | - iasl |
c7cb334d MR |
32 | |
33 | install: | |
c7cb334d | 34 | # install latest device tree compiler |
4084c7fa | 35 | - git clone --depth=1 git://git.kernel.org/pub/scm/utils/dtc/dtc.git /tmp/dtc |
c7cb334d | 36 | - make -j4 -C /tmp/dtc |
5ac5861c TR |
37 | # Clone uboot-test-hooks |
38 | - git clone --depth=1 git://github.com/swarren/uboot-test-hooks.git /tmp/uboot-test-hooks | |
39 | - ln -s travis-ci /tmp/uboot-test-hooks/bin/`hostname` | |
40 | - ln -s travis-ci /tmp/uboot-test-hooks/py/`hostname` | |
c7cb334d | 41 | # prepare buildman environment |
43a68e49 | 42 | - echo -e "[toolchain]\nroot = /usr" > ~/.buildman |
cd402e01 | 43 | - echo -e "\n[toolchain-alias]\nblackfin = bfin\nsh = sh4\nopenrisc = or32" >> ~/.buildman |
c7cb334d | 44 | - cat ~/.buildman |
07bf2122 SW |
45 | - virtualenv /tmp/venv |
46 | - . /tmp/venv/bin/activate | |
47 | - pip install pytest | |
c7cb334d MR |
48 | |
49 | env: | |
50 | global: | |
5ac5861c | 51 | - PATH=/tmp/dtc:/tmp/uboot-test-hooks/bin:$PATH |
c7cb334d | 52 | - BUILD_DIR=build |
c7cb334d MR |
53 | - HOSTCC="cc" |
54 | - HOSTCXX="c++" | |
c7cb334d MR |
55 | |
56 | before_script: | |
050c7569 | 57 | # install toolchains based on TOOLCHAIN} variable |
050c7569 | 58 | - if [[ "${TOOLCHAIN}" == *avr32* ]]; then ./tools/buildman/buildman --fetch-arch avr32 ; fi |
cd402e01 | 59 | - if [[ "${TOOLCHAIN}" == *bfin* ]]; then ./tools/buildman/buildman --fetch-arch bfin ; fi |
050c7569 | 60 | - if [[ "${TOOLCHAIN}" == *m68k* ]]; then ./tools/buildman/buildman --fetch-arch m68k ; fi |
cd402e01 | 61 | - if [[ "${TOOLCHAIN}" == *microblaze* ]]; then ./tools/buildman/buildman --fetch-arch microblaze ; fi |
050c7569 | 62 | - if [[ "${TOOLCHAIN}" == *mips* ]]; then ./tools/buildman/buildman --fetch-arch mips ; fi |
cd402e01 TR |
63 | - if [[ "${TOOLCHAIN}" == *or32* ]]; then ./tools/buildman/buildman --fetch-arch or32 ; fi |
64 | - if [[ "${TOOLCHAIN}" == *sh4* ]]; then ./tools/buildman/buildman --fetch-arch sh4 ; fi | |
2ded4bf9 SW |
65 | - if [[ "${TOOLCHAIN}" == *x86_64* ]]; then |
66 | ./tools/buildman/buildman --fetch-arch x86_64; | |
67 | echo -e "\n[toolchain-prefix]\nx86 = ${HOME}/.buildman-toolchains/gcc-4.9.0-nolibc/x86_64-linux/bin/x86_64-linux-" >> ~/.buildman; | |
68 | fi | |
cd402e01 | 69 | - if [[ "${TOOLCHAIN}" == *xtensa* ]]; then ./tools/buildman/buildman --fetch-arch xtensa ; fi |
c7cb334d MR |
70 | |
71 | script: | |
8304f053 SW |
72 | # Comments must be outside the command strings below, or the Travis parser |
73 | # will get confused. | |
74 | # | |
4899210c | 75 | # Exit code 129 means warnings only. |
050c7569 | 76 | - if [[ "${BUILDMAN}" != "" ]]; then |
4899210c | 77 | set +e; |
440d8467 | 78 | tools/buildman/buildman -P ${BUILDMAN}; |
0c5145fc | 79 | ret=$?; |
bf1c0889 | 80 | if [[ $ret -ne 0 && $ret -ne 129 ]]; then |
baade496 | 81 | tools/buildman/buildman -sdeP ${BUILDMAN}; |
0c5145fc SW |
82 | exit $ret; |
83 | fi; | |
050c7569 | 84 | fi |
8304f053 SW |
85 | # "not a_test_which_does_not_exist" is a dummy -k parameter which will |
86 | # never prevent any test from running. That way, we can always pass | |
87 | # "-k something" even when $TEST_PY_TEST_SPEC doesnt need a custom | |
88 | # value. | |
faec290f AG |
89 | - export UBOOT_TRAVIS_BUILD_DIR=`cd .. && pwd`/.bm-work/${TEST_PY_BD}; |
90 | if [[ "${TEST_PY_BD}" != "" ]]; then | |
8304f053 SW |
91 | ./test/py/test.py --bd ${TEST_PY_BD} ${TEST_PY_ID} |
92 | -k "${TEST_PY_TEST_SPEC:-not a_test_which_does_not_exist}" | |
faec290f | 93 | --build-dir "$UBOOT_TRAVIS_BUILD_DIR"; |
8304f053 | 94 | fi |
c7cb334d MR |
95 | |
96 | matrix: | |
97 | include: | |
98 | # we need to build by vendor due to 50min time limit for builds | |
99 | # each env setting here is a dedicated build | |
050c7569 | 100 | - env: |
baade496 | 101 | - BUILDMAN="arm11" |
050c7569 | 102 | - env: |
baade496 | 103 | - BUILDMAN="arm7" |
c7cb334d | 104 | - env: |
050c7569 | 105 | - BUILDMAN="arm920t" |
baade496 TR |
106 | - env: |
107 | - JOB="arm926ejs" | |
108 | BUILDMAN="arm926ejs -x mx,siemens,atmel" | |
109 | - env: | |
110 | - BUILDMAN="arm946es" | |
c7cb334d | 111 | - env: |
050c7569 | 112 | - BUILDMAN="atmel -x avr32" |
c7cb334d | 113 | - env: |
050c7569 RM |
114 | - BUILDMAN="avr32" |
115 | TOOLCHAIN="avr32" | |
c7cb334d | 116 | - env: |
050c7569 | 117 | - BUILDMAN="denx" |
c7cb334d | 118 | - env: |
5eba31c3 TR |
119 | - JOB="Freescale ARM" |
120 | BUILDMAN="freescale -x powerpc,m68k" | |
baade496 TR |
121 | - env: |
122 | - JOB="i.MX (non-Freescale)" | |
123 | BUILDMAN="mx -x freescale" | |
124 | - env: | |
125 | - BUILDMAN="sun4i" | |
126 | - env: | |
127 | - BUILDMAN="sun5i" | |
128 | - env: | |
129 | - BUILDMAN="sun6i" | |
130 | - env: | |
131 | - BUILDMAN="sun7i" | |
132 | - env: | |
133 | - BUILDMAN="sun8i" | |
134 | - env: | |
135 | - BUILDMAN="sun9i" | |
136 | - env: | |
137 | - BUILDMAN="sun50i" | |
138 | - env: | |
139 | - JOB="Catch-all ARM" | |
140 | BUILDMAN="arm -x arm11,arm7,arm9,aarch64,atmel,denx,freescale,kirkwood,siemens,tegra,uniphier,mx,sunxi,am33xx,omap3,omap4,omap5,pxa" | |
c7cb334d | 141 | - env: |
050c7569 | 142 | - BUILDMAN="sandbox x86" |
cd402e01 | 143 | TOOLCHAIN="x86_64" |
c7cb334d | 144 | - env: |
050c7569 | 145 | - BUILDMAN="kirkwood" |
baade496 TR |
146 | - env: |
147 | - BUILDMAN="pxa" | |
c7cb334d | 148 | - env: |
050c7569 RM |
149 | - BUILDMAN="m68k" |
150 | TOOLCHAIN="m68k" | |
76761e7f TR |
151 | - env: |
152 | - BUILDMAN="microblaze" | |
153 | TOOLCHAIN="microblaze" | |
c7cb334d | 154 | - env: |
050c7569 RM |
155 | - BUILDMAN="mips" |
156 | TOOLCHAIN="mips" | |
d9aa0197 | 157 | - env: |
050c7569 | 158 | - BUILDMAN="mpc512x" |
d9aa0197 | 159 | - env: |
050c7569 | 160 | - BUILDMAN="mpc5xx" |
d9aa0197 | 161 | - env: |
050c7569 | 162 | - BUILDMAN="mpc5xxx" |
d9aa0197 | 163 | - env: |
050c7569 | 164 | - BUILDMAN="mpc8260" |
c7cb334d | 165 | - env: |
050c7569 | 166 | - BUILDMAN="mpc83xx" |
c7cb334d | 167 | - env: |
050c7569 | 168 | - BUILDMAN="mpc85xx -x freescale" |
d9aa0197 | 169 | - env: |
050c7569 | 170 | - BUILDMAN="mpc85xx -x t208xrdb -x t4qds -x t102* -x p1_p2_rdb_pc -x p1010rdb -x corenet_ds -x b4860qds -x sbc8548 -x bsc91*" |
d9aa0197 | 171 | - env: |
050c7569 | 172 | - BUILDMAN="t208xrdb t4qds t102*" |
8cb2101b | 173 | - env: |
050c7569 | 174 | - BUILDMAN="p1_p2_rdb_pc p1010rdb" |
d9aa0197 | 175 | - env: |
050c7569 | 176 | - BUILDMAN="corenet_ds b4860qds sbc8548 bsc91*" |
c7cb334d | 177 | - env: |
050c7569 | 178 | - BUILDMAN="mpc86xx" |
c7cb334d | 179 | - env: |
050c7569 | 180 | - BUILDMAN="mpc8xx" |
c7cb334d | 181 | - env: |
050c7569 | 182 | - BUILDMAN="siemens" |
1fcf0ee9 | 183 | - env: |
5eba31c3 | 184 | - BUILDMAN="tegra" |
050c7569 | 185 | - env: |
baade496 TR |
186 | - JOB="am33xx" |
187 | BUILDMAN="am33xx -x siemens" | |
188 | - env: | |
189 | - BUILDMAN="omap3" | |
190 | - env: | |
191 | - BUILDMAN="omap4" | |
192 | - env: | |
193 | - BUILDMAN="omap5" | |
050c7569 | 194 | - env: |
5eba31c3 TR |
195 | - BUILDMAN="uniphier" |
196 | - env: | |
baade496 | 197 | - BUILDMAN="aarch64 -x tegra,freescale,uniphier,sunxi" |
050c7569 | 198 | TOOLCHAIN="aarch64" |
76761e7f TR |
199 | - env: |
200 | - BUILDMAN="sh4" | |
201 | TOOLCHAIN="sh4" | |
202 | - env: | |
203 | - BUILDMAN="xtensa" | |
204 | TOOLCHAIN="xtensa" | |
c7cb334d MR |
205 | |
206 | # QA jobs for code analytics | |
207 | # static code analysis with cppcheck (we can add --enable=all later) | |
d7882210 SW |
208 | - env: |
209 | - JOB="cppcheck" | |
210 | script: | |
c85b52e4 | 211 | - cppcheck --force --quiet --inline-suppr . |
c7cb334d | 212 | # search for TODO within source tree |
d7882210 SW |
213 | - env: |
214 | - JOB="grep TODO" | |
215 | script: | |
c85b52e4 | 216 | - grep -r TODO . |
c7cb334d | 217 | # search for FIXME within source tree |
d7882210 SW |
218 | - env: |
219 | - JOB="grep FIXME HACK" | |
220 | script: | |
c85b52e4 | 221 | - grep -r FIXME . |
c7cb334d | 222 | # search for HACK within source tree and ignore HACKKIT board |
c7cb334d MR |
223 | script: |
224 | - grep -r HACK . | grep -v HACKKIT | |
225 | # some statistics about the code base | |
d7882210 SW |
226 | - env: |
227 | - JOB="sloccount" | |
228 | script: | |
c85b52e4 | 229 | - sloccount . |
8304f053 | 230 | |
07bf2122 | 231 | # test/py |
d7882210 | 232 | - env: |
8304f053 SW |
233 | - TEST_PY_BD="sandbox" |
234 | BUILDMAN="^sandbox$" | |
235 | TOOLCHAIN="x86_64" | |
5ac5861c | 236 | - env: |
8304f053 SW |
237 | - TEST_PY_BD="vexpress_ca15_tc2" |
238 | TEST_PY_ID="--id qemu" | |
239 | BUILDMAN="^vexpress_ca15_tc2$" | |
5ac5861c | 240 | - env: |
8304f053 SW |
241 | - TEST_PY_BD="vexpress_ca9x4" |
242 | TEST_PY_ID="--id qemu" | |
243 | BUILDMAN="^vexpress_ca9x4$" | |
5ac5861c | 244 | - env: |
8304f053 SW |
245 | - TEST_PY_BD="integratorcp_cm926ejs" |
246 | TEST_PY_ID="--id qemu" | |
247 | BUILDMAN="^integratorcp_cm926ejs$" | |
5ac5861c | 248 | - env: |
8304f053 SW |
249 | - TEST_PY_BD="qemu_mips" |
250 | TEST_PY_TEST_SPEC="not sleep" | |
251 | BUILDMAN="^qemu_mips$" | |
252 | TOOLCHAIN="mips" | |
253 | - env: | |
254 | - TEST_PY_BD="qemu_mipsel" | |
255 | TEST_PY_TEST_SPEC="not sleep" | |
256 | BUILDMAN="^qemu_mipsel$" | |
257 | TOOLCHAIN="mips" | |
258 | - env: | |
259 | - TEST_PY_BD="qemu_mips64" | |
260 | TEST_PY_TEST_SPEC="not sleep" | |
261 | BUILDMAN="^qemu_mips64$" | |
262 | TOOLCHAIN="mips" | |
263 | - env: | |
264 | - TEST_PY_BD="qemu_mips64el" | |
265 | TEST_PY_TEST_SPEC="not sleep" | |
266 | BUILDMAN="^qemu_mips64el$" | |
267 | TOOLCHAIN="mips" | |
268 | - env: | |
269 | - TEST_PY_BD="qemu-ppce500" | |
270 | TEST_PY_TEST_SPEC="not sleep" | |
271 | BUILDMAN="^qemu-ppce500$" | |
272 | - env: | |
273 | - TEST_PY_BD="qemu-x86" | |
274 | TEST_PY_TEST_SPEC="not sleep" | |
275 | BUILDMAN="^qemu-x86$" | |
276 | TOOLCHAIN="x86_64" | |
277 | BUILD_ROM="yes" | |
c7cb334d | 278 | |
c7cb334d | 279 | # TODO make it perfect ;-r |