]>
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 | 40 | # prepare buildman environment |
43a68e49 | 41 | - echo -e "[toolchain]\nroot = /usr" > ~/.buildman |
cd402e01 | 42 | - echo -e "\n[toolchain-alias]\nblackfin = bfin\nsh = sh4\nopenrisc = or32" >> ~/.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: | |
5ac5861c | 50 | - PATH=/tmp/dtc:/tmp/uboot-test-hooks/bin:$PATH |
c7cb334d | 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 | |
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 |
0c5145fc SW |
81 | exit $ret; |
82 | fi; | |
050c7569 | 83 | fi |
8304f053 SW |
84 | # "not a_test_which_does_not_exist" is a dummy -k parameter which will |
85 | # never prevent any test from running. That way, we can always pass | |
86 | # "-k something" even when $TEST_PY_TEST_SPEC doesnt need a custom | |
87 | # value. | |
88 | - if [[ "${TEST_PY_BD}" != "" ]]; then | |
89 | ./test/py/test.py --bd ${TEST_PY_BD} ${TEST_PY_ID} | |
90 | -k "${TEST_PY_TEST_SPEC:-not a_test_which_does_not_exist}" | |
91 | --build-dir `cd .. && pwd`/.bm-work/${TEST_PY_BD}; | |
92 | fi | |
c7cb334d MR |
93 | |
94 | matrix: | |
95 | include: | |
96 | # we need to build by vendor due to 50min time limit for builds | |
97 | # each env setting here is a dedicated build | |
050c7569 RM |
98 | - env: |
99 | - BUILDMAN="arm1136" | |
050c7569 RM |
100 | - env: |
101 | - BUILDMAN="arm1176" | |
c7cb334d | 102 | - env: |
050c7569 | 103 | - BUILDMAN="arm720t" |
c7cb334d | 104 | - env: |
050c7569 | 105 | - BUILDMAN="arm920t" |
c7cb334d | 106 | - env: |
050c7569 | 107 | - BUILDMAN="atmel -x avr32" |
c7cb334d | 108 | - env: |
050c7569 RM |
109 | - BUILDMAN="avr32" |
110 | TOOLCHAIN="avr32" | |
c7cb334d | 111 | - env: |
050c7569 | 112 | - BUILDMAN="davinci" |
c7cb334d | 113 | - env: |
050c7569 | 114 | - BUILDMAN="denx" |
c7cb334d | 115 | - env: |
050c7569 | 116 | - BUILDMAN="freescale -x powerpc,m68k,aarch64" |
c7cb334d | 117 | - env: |
050c7569 | 118 | - BUILDMAN="sandbox x86" |
cd402e01 | 119 | TOOLCHAIN="x86_64" |
c7cb334d | 120 | - env: |
050c7569 | 121 | - BUILDMAN="kirkwood" |
c7cb334d | 122 | - env: |
050c7569 RM |
123 | - BUILDMAN="m68k" |
124 | TOOLCHAIN="m68k" | |
76761e7f TR |
125 | - env: |
126 | - BUILDMAN="microblaze" | |
127 | TOOLCHAIN="microblaze" | |
c7cb334d | 128 | - env: |
050c7569 RM |
129 | - BUILDMAN="mips" |
130 | TOOLCHAIN="mips" | |
d9aa0197 | 131 | - env: |
050c7569 | 132 | - BUILDMAN="mpc512x" |
d9aa0197 | 133 | - env: |
050c7569 | 134 | - BUILDMAN="mpc5xx" |
d9aa0197 | 135 | - env: |
050c7569 | 136 | - BUILDMAN="mpc5xxx" |
d9aa0197 | 137 | - env: |
050c7569 | 138 | - BUILDMAN="mpc8260" |
c7cb334d | 139 | - env: |
050c7569 | 140 | - BUILDMAN="mpc83xx" |
c7cb334d | 141 | - env: |
050c7569 | 142 | - BUILDMAN="mpc85xx -x freescale" |
d9aa0197 | 143 | - env: |
050c7569 | 144 | - 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 | 145 | - env: |
050c7569 | 146 | - BUILDMAN="t208xrdb t4qds t102*" |
8cb2101b | 147 | - env: |
050c7569 | 148 | - BUILDMAN="p1_p2_rdb_pc p1010rdb" |
d9aa0197 | 149 | - env: |
050c7569 | 150 | - BUILDMAN="corenet_ds b4860qds sbc8548 bsc91*" |
c7cb334d | 151 | - env: |
050c7569 | 152 | - BUILDMAN="mpc86xx" |
c7cb334d | 153 | - env: |
050c7569 | 154 | - BUILDMAN="mpc8xx" |
c7cb334d | 155 | - env: |
050c7569 | 156 | - BUILDMAN="siemens" |
050c7569 RM |
157 | - env: |
158 | - BUILDMAN="ti" | |
050c7569 RM |
159 | - env: |
160 | - BUILDMAN="aarch64" | |
161 | TOOLCHAIN="aarch64" | |
76761e7f TR |
162 | - env: |
163 | - BUILDMAN="sh4" | |
164 | TOOLCHAIN="sh4" | |
165 | - env: | |
166 | - BUILDMAN="xtensa" | |
167 | TOOLCHAIN="xtensa" | |
c7cb334d MR |
168 | |
169 | # QA jobs for code analytics | |
170 | # static code analysis with cppcheck (we can add --enable=all later) | |
d7882210 SW |
171 | - env: |
172 | - JOB="cppcheck" | |
173 | script: | |
c85b52e4 | 174 | - cppcheck --force --quiet --inline-suppr . |
c7cb334d | 175 | # search for TODO within source tree |
d7882210 SW |
176 | - env: |
177 | - JOB="grep TODO" | |
178 | script: | |
c85b52e4 | 179 | - grep -r TODO . |
c7cb334d | 180 | # search for FIXME within source tree |
d7882210 SW |
181 | - env: |
182 | - JOB="grep FIXME HACK" | |
183 | script: | |
c85b52e4 | 184 | - grep -r FIXME . |
c7cb334d | 185 | # search for HACK within source tree and ignore HACKKIT board |
c7cb334d MR |
186 | script: |
187 | - grep -r HACK . | grep -v HACKKIT | |
188 | # some statistics about the code base | |
d7882210 SW |
189 | - env: |
190 | - JOB="sloccount" | |
191 | script: | |
c85b52e4 | 192 | - sloccount . |
8304f053 | 193 | |
07bf2122 | 194 | # test/py |
d7882210 | 195 | - env: |
8304f053 SW |
196 | - TEST_PY_BD="sandbox" |
197 | BUILDMAN="^sandbox$" | |
198 | TOOLCHAIN="x86_64" | |
5ac5861c | 199 | - env: |
8304f053 SW |
200 | - TEST_PY_BD="vexpress_ca15_tc2" |
201 | TEST_PY_ID="--id qemu" | |
202 | BUILDMAN="^vexpress_ca15_tc2$" | |
5ac5861c | 203 | - env: |
8304f053 SW |
204 | - TEST_PY_BD="vexpress_ca9x4" |
205 | TEST_PY_ID="--id qemu" | |
206 | BUILDMAN="^vexpress_ca9x4$" | |
5ac5861c | 207 | - env: |
8304f053 SW |
208 | - TEST_PY_BD="integratorcp_cm926ejs" |
209 | TEST_PY_ID="--id qemu" | |
210 | BUILDMAN="^integratorcp_cm926ejs$" | |
5ac5861c | 211 | - env: |
8304f053 SW |
212 | - TEST_PY_BD="qemu_mips" |
213 | TEST_PY_TEST_SPEC="not sleep" | |
214 | BUILDMAN="^qemu_mips$" | |
215 | TOOLCHAIN="mips" | |
216 | - env: | |
217 | - TEST_PY_BD="qemu_mipsel" | |
218 | TEST_PY_TEST_SPEC="not sleep" | |
219 | BUILDMAN="^qemu_mipsel$" | |
220 | TOOLCHAIN="mips" | |
221 | - env: | |
222 | - TEST_PY_BD="qemu_mips64" | |
223 | TEST_PY_TEST_SPEC="not sleep" | |
224 | BUILDMAN="^qemu_mips64$" | |
225 | TOOLCHAIN="mips" | |
226 | - env: | |
227 | - TEST_PY_BD="qemu_mips64el" | |
228 | TEST_PY_TEST_SPEC="not sleep" | |
229 | BUILDMAN="^qemu_mips64el$" | |
230 | TOOLCHAIN="mips" | |
231 | - env: | |
232 | - TEST_PY_BD="qemu-ppce500" | |
233 | TEST_PY_TEST_SPEC="not sleep" | |
234 | BUILDMAN="^qemu-ppce500$" | |
235 | - env: | |
236 | - TEST_PY_BD="qemu-x86" | |
237 | TEST_PY_TEST_SPEC="not sleep" | |
238 | BUILDMAN="^qemu-x86$" | |
239 | TOOLCHAIN="x86_64" | |
240 | BUILD_ROM="yes" | |
c7cb334d | 241 | |
c7cb334d | 242 | # TODO make it perfect ;-r |