]>
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: | |
13 | packages: | |
14 | - cppcheck | |
15 | - sloccount | |
16 | - sparse | |
17 | - bc | |
18 | - build-essential | |
19 | - libsdl1.2-dev | |
07bf2122 SW |
20 | - python |
21 | - python-virtualenv | |
cd402e01 TR |
22 | - gcc-powerpc-linux-gnu |
23 | - gcc-arm-linux-gnueabihf | |
24 | - iasl | |
c7cb334d MR |
25 | |
26 | install: | |
c7cb334d | 27 | # install latest device tree compiler |
4084c7fa | 28 | - git clone --depth=1 git://git.kernel.org/pub/scm/utils/dtc/dtc.git /tmp/dtc |
c7cb334d MR |
29 | - make -j4 -C /tmp/dtc |
30 | # prepare buildman environment | |
31 | - export BUILDMAN_ROOT="root:" | |
cd402e01 TR |
32 | - echo -e "[toolchain]\n${BUILDMAN_ROOT} /usr" > ~/.buildman |
33 | - echo -e "\n[toolchain-alias]\nblackfin = bfin\nsh = sh4\nopenrisc = or32" >> ~/.buildman | |
c7cb334d | 34 | - cat ~/.buildman |
07bf2122 SW |
35 | - virtualenv /tmp/venv |
36 | - . /tmp/venv/bin/activate | |
37 | - pip install pytest | |
c7cb334d MR |
38 | |
39 | env: | |
40 | global: | |
41 | - PATH=/tmp/dtc:$PATH | |
42 | - BUILD_DIR=build | |
c7cb334d MR |
43 | - HOSTCC="cc" |
44 | - HOSTCXX="c++" | |
c7cb334d MR |
45 | |
46 | before_script: | |
050c7569 RM |
47 | # install toolchains based on TOOLCHAIN} variable |
48 | - if [[ "${TOOLCHAIN}" == *aarch64* ]]; then ./tools/buildman/buildman --fetch-arch aarch64 ; fi | |
050c7569 | 49 | - if [[ "${TOOLCHAIN}" == *avr32* ]]; then ./tools/buildman/buildman --fetch-arch avr32 ; fi |
cd402e01 | 50 | - if [[ "${TOOLCHAIN}" == *bfin* ]]; then ./tools/buildman/buildman --fetch-arch bfin ; fi |
050c7569 | 51 | - if [[ "${TOOLCHAIN}" == *m68k* ]]; then ./tools/buildman/buildman --fetch-arch m68k ; fi |
cd402e01 | 52 | - if [[ "${TOOLCHAIN}" == *microblaze* ]]; then ./tools/buildman/buildman --fetch-arch microblaze ; fi |
050c7569 | 53 | - if [[ "${TOOLCHAIN}" == *mips* ]]; then ./tools/buildman/buildman --fetch-arch mips ; fi |
cd402e01 TR |
54 | - if [[ "${TOOLCHAIN}" == *or32* ]]; then ./tools/buildman/buildman --fetch-arch or32 ; fi |
55 | - if [[ "${TOOLCHAIN}" == *sh4* ]]; then ./tools/buildman/buildman --fetch-arch sh4 ; fi | |
56 | - if [[ "${TOOLCHAIN}" == *x86_64* ]]; then ./tools/buildman/buildman --fetch-arch x86_64 ; fi | |
57 | - if [[ "${TOOLCHAIN}" == *xtensa* ]]; then ./tools/buildman/buildman --fetch-arch xtensa ; fi | |
c7cb334d MR |
58 | |
59 | script: | |
4899210c | 60 | # Exit code 129 means warnings only. |
050c7569 | 61 | - if [[ "${BUILDMAN}" != "" ]]; then |
4899210c | 62 | set +e; |
050c7569 | 63 | tools/buildman/buildman ${BUILDMAN}; |
4899210c TR |
64 | if [[ "$?" == "0" || "$?" == "129" ]]; then |
65 | exit 0; | |
66 | else | |
67 | exit $?; | |
68 | fi | |
050c7569 | 69 | fi |
c7cb334d MR |
70 | |
71 | matrix: | |
72 | include: | |
73 | # we need to build by vendor due to 50min time limit for builds | |
74 | # each env setting here is a dedicated build | |
75 | - env: | |
050c7569 | 76 | - BUILDMAN="arm1136" |
050c7569 RM |
77 | - env: |
78 | - BUILDMAN="arm1136" | |
050c7569 RM |
79 | - env: |
80 | - BUILDMAN="arm1176" | |
c7cb334d | 81 | - env: |
050c7569 | 82 | - BUILDMAN="arm720t" |
c7cb334d | 83 | - env: |
050c7569 | 84 | - BUILDMAN="arm920t" |
c7cb334d | 85 | - env: |
050c7569 | 86 | - BUILDMAN="atmel -x avr32" |
c7cb334d | 87 | - env: |
050c7569 RM |
88 | - BUILDMAN="avr32" |
89 | TOOLCHAIN="avr32" | |
c7cb334d | 90 | - env: |
050c7569 | 91 | - BUILDMAN="davinci" |
c7cb334d | 92 | - env: |
050c7569 | 93 | - BUILDMAN="denx" |
c7cb334d | 94 | - env: |
050c7569 | 95 | - BUILDMAN="freescale -x powerpc,m68k,aarch64" |
c7cb334d | 96 | - env: |
050c7569 | 97 | - BUILDMAN="sandbox x86" |
cd402e01 TR |
98 | TOOLCHAIN="x86_64" |
99 | script: | |
100 | - export BUILDMAN_X86="x86:"; | |
101 | 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 | 102 | - env: |
050c7569 | 103 | - BUILDMAN="kirkwood" |
c7cb334d | 104 | - env: |
050c7569 RM |
105 | - BUILDMAN="m68k" |
106 | TOOLCHAIN="m68k" | |
76761e7f TR |
107 | - env: |
108 | - BUILDMAN="microblaze" | |
109 | TOOLCHAIN="microblaze" | |
c7cb334d | 110 | - env: |
050c7569 RM |
111 | - BUILDMAN="mips" |
112 | TOOLCHAIN="mips" | |
d9aa0197 | 113 | - env: |
050c7569 | 114 | - BUILDMAN="mpc512x" |
d9aa0197 | 115 | - env: |
050c7569 | 116 | - BUILDMAN="mpc5xx" |
d9aa0197 | 117 | - env: |
050c7569 | 118 | - BUILDMAN="mpc5xxx" |
d9aa0197 | 119 | - env: |
050c7569 | 120 | - BUILDMAN="mpc8260" |
c7cb334d | 121 | - env: |
050c7569 | 122 | - BUILDMAN="mpc83xx" |
c7cb334d | 123 | - env: |
050c7569 | 124 | - BUILDMAN="mpc85xx -x freescale" |
d9aa0197 | 125 | - env: |
050c7569 | 126 | - 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 | 127 | - env: |
050c7569 | 128 | - BUILDMAN="t208xrdb t4qds t102*" |
8cb2101b | 129 | - env: |
050c7569 | 130 | - BUILDMAN="p1_p2_rdb_pc p1010rdb" |
d9aa0197 | 131 | - env: |
050c7569 | 132 | - BUILDMAN="corenet_ds b4860qds sbc8548 bsc91*" |
c7cb334d | 133 | - env: |
050c7569 | 134 | - BUILDMAN="mpc86xx" |
c7cb334d | 135 | - env: |
050c7569 | 136 | - BUILDMAN="mpc8xx" |
c7cb334d | 137 | - env: |
050c7569 | 138 | - BUILDMAN="siemens" |
050c7569 RM |
139 | - env: |
140 | - BUILDMAN="ti" | |
050c7569 RM |
141 | - env: |
142 | - BUILDMAN="aarch64" | |
143 | TOOLCHAIN="aarch64" | |
76761e7f TR |
144 | - env: |
145 | - BUILDMAN="sh4" | |
146 | TOOLCHAIN="sh4" | |
147 | - env: | |
148 | - BUILDMAN="xtensa" | |
149 | TOOLCHAIN="xtensa" | |
c7cb334d MR |
150 | |
151 | # QA jobs for code analytics | |
152 | # static code analysis with cppcheck (we can add --enable=all later) | |
c85b52e4 TR |
153 | - script: |
154 | - cppcheck --force --quiet --inline-suppr . | |
c7cb334d | 155 | # search for TODO within source tree |
c85b52e4 TR |
156 | - script: |
157 | - grep -r TODO . | |
c7cb334d | 158 | # search for FIXME within source tree |
c85b52e4 TR |
159 | - script: |
160 | - grep -r FIXME . | |
c7cb334d | 161 | # search for HACK within source tree and ignore HACKKIT board |
c7cb334d MR |
162 | script: |
163 | - grep -r HACK . | grep -v HACKKIT | |
164 | # some statistics about the code base | |
c85b52e4 TR |
165 | - script: |
166 | - sloccount . | |
07bf2122 | 167 | # test/py |
c85b52e4 TR |
168 | - script: |
169 | - ./test/py/test.py --bd sandbox --build | |
c7cb334d | 170 | |
c7cb334d | 171 | # TODO make it perfect ;-r |