-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
105 lines (95 loc) · 4.3 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# Copyright Roger Meier <[email protected]>
# SPDX-License-Identifier: GPL-2.0+
# build U-Boot on Travis CI - https://travis-ci.org/
language: c
dist: xenial
cache:
- apt
install:
# install U-Boot build dependencies
- sudo apt-get install -qq cppcheck sloccount sparse bc libsdl-dev build-essential
# install latest device tree compiler
- git clone --depth=1 https://git.kernel.org/pub/scm/utils/dtc/dtc.git /tmp/dtc
- make -j4 -C /tmp/dtc
# install cross compile dependencies
- sudo apt-get install libc6-armel-cross libc6-dev-armel-cross binutils-arm-linux-gnueabi libncurses5-dev
- sudo apt-get install gcc-arm-linux-gnueabi g++-arm-linux-gnueabi
- sudo apt-get install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf
# prepare buildman environment
- export BUILDMAN_ROOT="root:"
- export BUILDMAN_MIPS="mips:"
- export BUILDMAN_PPC="ppc:"
- export BUILDMAN_ARM="arm:"
- export BUILDMAN_SANDBOX="sandbox:"
- echo -e "[toolchain]\n${BUILDMAN_ROOT} /\n" > ~/.buildman
- echo -e "${BUILDMAN_MIPS} /opt/eldk-5.4/mips/sysroots/i686-eldk-linux/usr/bin/mips32-linux/\n" >> ~/.buildman
- echo -e "${BUILDMAN_PPC} /opt/eldk-5.4/powerpc/sysroots/i686-eldk-linux/usr/bin/powerpc-linux/\n" >> ~/.buildman
- echo -e "${BUILDMAN_ARM} /opt/eldk-5.4/armv5te/sysroots/i686-eldk-linux/usr/bin/armv5te-linux-gnueabi/\n" >> ~/.buildman
- echo -e "${BUILDMAN_SANDBOX} /usr/bin/gcc\n" >> ~/.buildman
- export BUILDMAN_ALIAS="x86:"
- export BUILDMAN_ALIAS_ARM="arm:"
- echo -e "\n\n[toolchain-alias]\n${BUILDMAN_ALIAS} i386\n" >> ~/.buildman
- echo -e "${BUILDMAN_ALIAS_ARM} armv5te\n" >> ~/.buildman
- cat ~/.buildman
env:
global:
- PATH=/tmp/dtc:$PATH
- BUILD_DIR=build
- CROSS_COMPILE=""
- HOSTCC="gcc"
- HOSTCXX="g++"
- TEST_CONFIG_CMD=""
- ARCH="arm"
before_script:
# install toolchains based on INSTALL_TOOLCHAIN} variable
- if [[ "${INSTALL_TOOLCHAIN}" == *arm* ]]; then wget ftp://ftp.denx.de/pub/eldk/5.4/targets/armv5te/eldk-eglibc-i686-arm-toolchain-gmae-5.4.sh ; fi
- if [[ "${INSTALL_TOOLCHAIN}" == *arm* ]]; then sh eldk-eglibc-i686-arm-toolchain-gmae-5.4.sh -y ; fi
- if [[ "${INSTALL_TOOLCHAIN}" == *arm* ]]; then ls -al /opt/eldk-5.4/armv5te/sysroots/i686-eldk-linux/usr/bin/armv5te-linux-gnueabi ; fi
- if [[ "${INSTALL_TOOLCHAIN}" == *avr32* ]]; then ./tools/buildman/buildman --fetch-arch avr32 ; fi
- if [[ "${INSTALL_TOOLCHAIN}" == *i386* ]]; then ./tools/buildman/buildman sandbox --fetch-arch i386 ; fi
- if [[ "${INSTALL_TOOLCHAIN}" == *m68k* ]]; then ./tools/buildman/buildman --fetch-arch m68k ; fi
- if [[ "${INSTALL_TOOLCHAIN}" == *mips* ]]; then wget ftp://ftp.denx.de/pub/eldk/5.4/targets/mips/eldk-eglibc-i686-mips-toolchain-gmae-5.4.sh ; fi
- if [[ "${INSTALL_TOOLCHAIN}" == *mips* ]]; then sh eldk-eglibc-i686-mips-toolchain-gmae-5.4.sh -y ; fi
- if [[ "${INSTALL_TOOLCHAIN}" == *ppc* ]]; then wget ftp://ftp.denx.de/pub/eldk/5.4/targets/powerpc/eldk-eglibc-i686-powerpc-toolchain-gmae-5.4.sh ; fi
- if [[ "${INSTALL_TOOLCHAIN}" == *ppc* ]]; then sh eldk-eglibc-i686-powerpc-toolchain-gmae-5.4.sh -y ; fi
script:
# the execution sequence for each test
- export ARCH=arm
- export CROSS_COMPILE=arm-linux-gnueabihf-
- printenv
- echo ${TEST_CONFIG_CMD}
- ${TEST_CONFIG_CMD}
- echo ${TEST_CMD}
- ${TEST_CMD}
matrix:
include:
# we need to build by vendor due to 50min time limit for builds
# each env setting here is a dedicated build
- env:
# - ARCH = "arm"
# HOSTCC = "arm-linux-gnueabihf-gcc"
# HOSTCXX = "arm-linux-gnueabihf-g++"
# CROSS_COMPILE = "arm-linux-gnueabihf-"
TEST_CONFIG_CMD="make mx6_ktc_defconfig"
TEST_CMD="make -j4"
# QA jobs for code analytics
# static code analysis with cppcheck (we can add --enable=all later)
- env:
- TEST_CMD="cppcheck --force --quiet --inline-suppr ."
# search for TODO within source tree
- env:
- TEST_CMD="grep -r TODO ."
# search for FIXME within source tree
- env:
- TEST_CMD="grep -r FIXME ."
# search for HACK within source tree and ignore HACKKIT board
- env:
- TEST_CMD="grep -r HACK . | grep -v HACKKIT"
script:
- grep -r HACK . | grep -v HACKKIT
# some statistics about the code base
- env:
- TEST_CMD="sloccount ."
notifications:
email: false
# TODO make it perfect ;-r