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