]>
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: | |
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 | |
30 | - iasl | |
c7cb334d MR |
31 | |
32 | install: | |
c7cb334d | 33 | # install latest device tree compiler |
4084c7fa | 34 | - git clone --depth=1 git://git.kernel.org/pub/scm/utils/dtc/dtc.git /tmp/dtc |
c7cb334d | 35 | - make -j4 -C /tmp/dtc |
5ac5861c TR |
36 | # Clone uboot-test-hooks |
37 | - git clone --depth=1 git://github.com/swarren/uboot-test-hooks.git /tmp/uboot-test-hooks | |
38 | - ln -s travis-ci /tmp/uboot-test-hooks/bin/`hostname` | |
39 | - ln -s travis-ci /tmp/uboot-test-hooks/py/`hostname` | |
c7cb334d MR |
40 | # prepare buildman environment |
41 | - export BUILDMAN_ROOT="root:" | |
cd402e01 TR |
42 | - echo -e "[toolchain]\n${BUILDMAN_ROOT} /usr" > ~/.buildman |
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 RM |
57 | # install toolchains based on TOOLCHAIN} variable |
58 | - if [[ "${TOOLCHAIN}" == *aarch64* ]]; then ./tools/buildman/buildman --fetch-arch aarch64 ; fi | |
050c7569 | 59 | - if [[ "${TOOLCHAIN}" == *avr32* ]]; then ./tools/buildman/buildman --fetch-arch avr32 ; fi |
cd402e01 | 60 | - if [[ "${TOOLCHAIN}" == *bfin* ]]; then ./tools/buildman/buildman --fetch-arch bfin ; fi |
050c7569 | 61 | - if [[ "${TOOLCHAIN}" == *m68k* ]]; then ./tools/buildman/buildman --fetch-arch m68k ; fi |
cd402e01 | 62 | - if [[ "${TOOLCHAIN}" == *microblaze* ]]; then ./tools/buildman/buildman --fetch-arch microblaze ; fi |
050c7569 | 63 | - if [[ "${TOOLCHAIN}" == *mips* ]]; then ./tools/buildman/buildman --fetch-arch mips ; fi |
cd402e01 TR |
64 | - if [[ "${TOOLCHAIN}" == *or32* ]]; then ./tools/buildman/buildman --fetch-arch or32 ; fi |
65 | - if [[ "${TOOLCHAIN}" == *sh4* ]]; then ./tools/buildman/buildman --fetch-arch sh4 ; fi | |
66 | - if [[ "${TOOLCHAIN}" == *x86_64* ]]; then ./tools/buildman/buildman --fetch-arch x86_64 ; fi | |
67 | - if [[ "${TOOLCHAIN}" == *xtensa* ]]; then ./tools/buildman/buildman --fetch-arch xtensa ; fi | |
c7cb334d MR |
68 | |
69 | script: | |
4899210c | 70 | # Exit code 129 means warnings only. |
050c7569 | 71 | - if [[ "${BUILDMAN}" != "" ]]; then |
4899210c | 72 | set +e; |
050c7569 | 73 | tools/buildman/buildman ${BUILDMAN}; |
4899210c TR |
74 | if [[ "$?" == "0" || "$?" == "129" ]]; then |
75 | exit 0; | |
76 | else | |
77 | exit $?; | |
78 | fi | |
050c7569 | 79 | fi |
c7cb334d MR |
80 | |
81 | matrix: | |
82 | include: | |
83 | # we need to build by vendor due to 50min time limit for builds | |
84 | # each env setting here is a dedicated build | |
85 | - env: | |
050c7569 | 86 | - BUILDMAN="arm1136" |
050c7569 RM |
87 | - env: |
88 | - BUILDMAN="arm1136" | |
050c7569 RM |
89 | - env: |
90 | - BUILDMAN="arm1176" | |
c7cb334d | 91 | - env: |
050c7569 | 92 | - BUILDMAN="arm720t" |
c7cb334d | 93 | - env: |
050c7569 | 94 | - BUILDMAN="arm920t" |
c7cb334d | 95 | - env: |
050c7569 | 96 | - BUILDMAN="atmel -x avr32" |
c7cb334d | 97 | - env: |
050c7569 RM |
98 | - BUILDMAN="avr32" |
99 | TOOLCHAIN="avr32" | |
c7cb334d | 100 | - env: |
050c7569 | 101 | - BUILDMAN="davinci" |
c7cb334d | 102 | - env: |
050c7569 | 103 | - BUILDMAN="denx" |
c7cb334d | 104 | - env: |
050c7569 | 105 | - BUILDMAN="freescale -x powerpc,m68k,aarch64" |
c7cb334d | 106 | - env: |
050c7569 | 107 | - BUILDMAN="sandbox x86" |
cd402e01 TR |
108 | TOOLCHAIN="x86_64" |
109 | script: | |
110 | - export BUILDMAN_X86="x86:"; | |
111 | echo -e "\n[toolchain-prefix]\n${BUILDMAN_X86} ${HOME}/.buildman-toolchains/gcc-4.9.0-nolibc/x86_64-linux/bin/x86_64-linux-" >> ~/.buildman | |
c7cb334d | 112 | - env: |
050c7569 | 113 | - BUILDMAN="kirkwood" |
c7cb334d | 114 | - env: |
050c7569 RM |
115 | - BUILDMAN="m68k" |
116 | TOOLCHAIN="m68k" | |
76761e7f TR |
117 | - env: |
118 | - BUILDMAN="microblaze" | |
119 | TOOLCHAIN="microblaze" | |
c7cb334d | 120 | - env: |
050c7569 RM |
121 | - BUILDMAN="mips" |
122 | TOOLCHAIN="mips" | |
d9aa0197 | 123 | - env: |
050c7569 | 124 | - BUILDMAN="mpc512x" |
d9aa0197 | 125 | - env: |
050c7569 | 126 | - BUILDMAN="mpc5xx" |
d9aa0197 | 127 | - env: |
050c7569 | 128 | - BUILDMAN="mpc5xxx" |
d9aa0197 | 129 | - env: |
050c7569 | 130 | - BUILDMAN="mpc8260" |
c7cb334d | 131 | - env: |
050c7569 | 132 | - BUILDMAN="mpc83xx" |
c7cb334d | 133 | - env: |
050c7569 | 134 | - BUILDMAN="mpc85xx -x freescale" |
d9aa0197 | 135 | - env: |
050c7569 | 136 | - 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 | 137 | - env: |
050c7569 | 138 | - BUILDMAN="t208xrdb t4qds t102*" |
8cb2101b | 139 | - env: |
050c7569 | 140 | - BUILDMAN="p1_p2_rdb_pc p1010rdb" |
d9aa0197 | 141 | - env: |
050c7569 | 142 | - BUILDMAN="corenet_ds b4860qds sbc8548 bsc91*" |
c7cb334d | 143 | - env: |
050c7569 | 144 | - BUILDMAN="mpc86xx" |
c7cb334d | 145 | - env: |
050c7569 | 146 | - BUILDMAN="mpc8xx" |
c7cb334d | 147 | - env: |
050c7569 | 148 | - BUILDMAN="siemens" |
050c7569 RM |
149 | - env: |
150 | - BUILDMAN="ti" | |
050c7569 RM |
151 | - env: |
152 | - BUILDMAN="aarch64" | |
153 | TOOLCHAIN="aarch64" | |
76761e7f TR |
154 | - env: |
155 | - BUILDMAN="sh4" | |
156 | TOOLCHAIN="sh4" | |
157 | - env: | |
158 | - BUILDMAN="xtensa" | |
159 | TOOLCHAIN="xtensa" | |
c7cb334d MR |
160 | |
161 | # QA jobs for code analytics | |
162 | # static code analysis with cppcheck (we can add --enable=all later) | |
c85b52e4 TR |
163 | - script: |
164 | - cppcheck --force --quiet --inline-suppr . | |
c7cb334d | 165 | # search for TODO within source tree |
c85b52e4 TR |
166 | - script: |
167 | - grep -r TODO . | |
c7cb334d | 168 | # search for FIXME within source tree |
c85b52e4 TR |
169 | - script: |
170 | - grep -r FIXME . | |
c7cb334d | 171 | # search for HACK within source tree and ignore HACKKIT board |
c7cb334d MR |
172 | script: |
173 | - grep -r HACK . | grep -v HACKKIT | |
174 | # some statistics about the code base | |
c85b52e4 TR |
175 | - script: |
176 | - sloccount . | |
07bf2122 | 177 | # test/py |
c85b52e4 TR |
178 | - script: |
179 | - ./test/py/test.py --bd sandbox --build | |
5ac5861c TR |
180 | - env: |
181 | - CROSS_COMPILE="/usr/bin/arm-linux-gnueabihf-" | |
182 | script: | |
183 | - ./test/py/test.py --bd vexpress_ca15_tc2 --id qemu --build; | |
184 | ./test/py/test.py --bd vexpress_ca9x4 --id qemu --build; | |
185 | ./test/py/test.py --bd integratorcp_cm926ejs --id qemu --build; | |
186 | - env: | |
187 | - TOOLCHAIN="mips" | |
188 | CROSS_COMPILE="${HOME}/.buildman-toolchains/gcc-4.9.0-nolibc/mips-linux/bin/mips-linux-" | |
189 | script: | |
190 | - ./test/py/test.py --bd qemu_mips --build -k 'not sleep'; | |
191 | ./test/py/test.py --bd qemu_mipsel --build -k 'not sleep'; | |
192 | ./test/py/test.py --bd qemu_mips64 --build -k 'not sleep'; | |
193 | ./test/py/test.py --bd qemu_mips64el --build -k 'not sleep'; | |
194 | - env: | |
195 | - CROSS_COMPILE="/usr/bin/powerpc-linux-gnu-" | |
196 | script: | |
197 | - ./test/py/test.py --bd qemu-ppce500 --build -k 'not sleep' | |
198 | - env: | |
199 | - TOOLCHAIN="x86_64" | |
200 | BUILD_ROM=yes | |
201 | CROSS_COMPILE="${HOME}/.buildman-toolchains/gcc-4.9.0-nolibc/x86_64-linux/bin/x86_64-linux-" | |
202 | script: | |
203 | - ./test/py/test.py --bd qemu-x86 --build -k 'not sleep' | |
c7cb334d | 204 | |
c7cb334d | 205 | # TODO make it perfect ;-r |