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