2014-11-19 14:26:18 +00:00
|
|
|
# Copyright Roger Meier <r.meier@siemens.com>
|
|
|
|
# SPDX-License-Identifier: GPL-2.0+
|
|
|
|
|
|
|
|
# build U-Boot on Travis CI - https://travis-ci.org/
|
|
|
|
|
2016-10-20 15:03:19 +00:00
|
|
|
sudo: required
|
|
|
|
dist: trusty
|
2016-02-03 17:41:34 +00:00
|
|
|
|
2014-11-19 14:26:18 +00:00
|
|
|
language: c
|
|
|
|
|
2016-01-25 19:22:41 +00:00
|
|
|
addons:
|
|
|
|
apt:
|
2016-10-20 15:26:40 +00:00
|
|
|
sources:
|
|
|
|
- sourceline: 'ppa:gns3/qemu'
|
2016-01-25 19:22:41 +00:00
|
|
|
packages:
|
|
|
|
- cppcheck
|
|
|
|
- sloccount
|
|
|
|
- sparse
|
|
|
|
- bc
|
|
|
|
- build-essential
|
|
|
|
- libsdl1.2-dev
|
2016-02-09 01:23:35 +00:00
|
|
|
- python
|
|
|
|
- python-virtualenv
|
2016-10-20 15:26:40 +00:00
|
|
|
- qemu-system-arm
|
|
|
|
- qemu-system-mips
|
|
|
|
- qemu-system-ppc
|
|
|
|
- qemu-system-x86
|
2016-10-20 15:08:26 +00:00
|
|
|
- gcc-powerpc-linux-gnu
|
|
|
|
- gcc-arm-linux-gnueabihf
|
|
|
|
- iasl
|
2014-11-19 14:26:18 +00:00
|
|
|
|
|
|
|
install:
|
|
|
|
# install latest device tree compiler
|
2016-10-20 15:04:10 +00:00
|
|
|
- git clone --depth=1 git://git.kernel.org/pub/scm/utils/dtc/dtc.git /tmp/dtc
|
2014-11-19 14:26:18 +00:00
|
|
|
- make -j4 -C /tmp/dtc
|
2016-10-20 15:26:40 +00:00
|
|
|
# Clone uboot-test-hooks
|
|
|
|
- git clone --depth=1 git://github.com/swarren/uboot-test-hooks.git /tmp/uboot-test-hooks
|
|
|
|
- ln -s travis-ci /tmp/uboot-test-hooks/bin/`hostname`
|
|
|
|
- ln -s travis-ci /tmp/uboot-test-hooks/py/`hostname`
|
2014-11-19 14:26:18 +00:00
|
|
|
# prepare buildman environment
|
2016-10-26 17:05:31 +00:00
|
|
|
- echo -e "[toolchain]\nroot = /usr" > ~/.buildman
|
2016-10-20 15:08:26 +00:00
|
|
|
- echo -e "\n[toolchain-alias]\nblackfin = bfin\nsh = sh4\nopenrisc = or32" >> ~/.buildman
|
2014-11-19 14:26:18 +00:00
|
|
|
- cat ~/.buildman
|
2016-02-09 01:23:35 +00:00
|
|
|
- virtualenv /tmp/venv
|
|
|
|
- . /tmp/venv/bin/activate
|
|
|
|
- pip install pytest
|
2014-11-19 14:26:18 +00:00
|
|
|
|
|
|
|
env:
|
|
|
|
global:
|
2016-10-20 15:26:40 +00:00
|
|
|
- PATH=/tmp/dtc:/tmp/uboot-test-hooks/bin:$PATH
|
2014-11-19 14:26:18 +00:00
|
|
|
- BUILD_DIR=build
|
|
|
|
- HOSTCC="cc"
|
|
|
|
- HOSTCXX="c++"
|
|
|
|
|
|
|
|
before_script:
|
2016-01-25 19:22:41 +00:00
|
|
|
# install toolchains based on TOOLCHAIN} variable
|
|
|
|
- if [[ "${TOOLCHAIN}" == *aarch64* ]]; then ./tools/buildman/buildman --fetch-arch aarch64 ; fi
|
|
|
|
- if [[ "${TOOLCHAIN}" == *avr32* ]]; then ./tools/buildman/buildman --fetch-arch avr32 ; fi
|
2016-10-20 15:08:26 +00:00
|
|
|
- if [[ "${TOOLCHAIN}" == *bfin* ]]; then ./tools/buildman/buildman --fetch-arch bfin ; fi
|
2016-01-25 19:22:41 +00:00
|
|
|
- if [[ "${TOOLCHAIN}" == *m68k* ]]; then ./tools/buildman/buildman --fetch-arch m68k ; fi
|
2016-10-20 15:08:26 +00:00
|
|
|
- if [[ "${TOOLCHAIN}" == *microblaze* ]]; then ./tools/buildman/buildman --fetch-arch microblaze ; fi
|
2016-01-25 19:22:41 +00:00
|
|
|
- if [[ "${TOOLCHAIN}" == *mips* ]]; then ./tools/buildman/buildman --fetch-arch mips ; fi
|
2016-10-20 15:08:26 +00:00
|
|
|
- if [[ "${TOOLCHAIN}" == *or32* ]]; then ./tools/buildman/buildman --fetch-arch or32 ; fi
|
|
|
|
- if [[ "${TOOLCHAIN}" == *sh4* ]]; then ./tools/buildman/buildman --fetch-arch sh4 ; fi
|
2016-10-26 17:05:33 +00:00
|
|
|
- if [[ "${TOOLCHAIN}" == *x86_64* ]]; then
|
|
|
|
./tools/buildman/buildman --fetch-arch x86_64;
|
|
|
|
echo -e "\n[toolchain-prefix]\nx86 = ${HOME}/.buildman-toolchains/gcc-4.9.0-nolibc/x86_64-linux/bin/x86_64-linux-" >> ~/.buildman;
|
|
|
|
fi
|
2016-10-20 15:08:26 +00:00
|
|
|
- if [[ "${TOOLCHAIN}" == *xtensa* ]]; then ./tools/buildman/buildman --fetch-arch xtensa ; fi
|
2014-11-19 14:26:18 +00:00
|
|
|
|
|
|
|
script:
|
2016-10-20 15:05:57 +00:00
|
|
|
# Exit code 129 means warnings only.
|
2016-01-25 19:22:41 +00:00
|
|
|
- if [[ "${BUILDMAN}" != "" ]]; then
|
2016-10-20 15:05:57 +00:00
|
|
|
set +e;
|
2016-01-25 19:22:41 +00:00
|
|
|
tools/buildman/buildman ${BUILDMAN};
|
2016-10-26 17:05:32 +00:00
|
|
|
ret=$?;
|
|
|
|
if [[ $ret -eq 0 || $ret -eq 129 ]]; then
|
2016-10-20 15:05:57 +00:00
|
|
|
exit 0;
|
|
|
|
else
|
2016-10-26 17:05:32 +00:00
|
|
|
exit $ret;
|
|
|
|
fi;
|
2016-01-25 19:22:41 +00:00
|
|
|
fi
|
2014-11-19 14:26:18 +00:00
|
|
|
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
# we need to build by vendor due to 50min time limit for builds
|
|
|
|
# each env setting here is a dedicated build
|
2016-01-25 19:22:41 +00:00
|
|
|
- env:
|
|
|
|
- BUILDMAN="arm1136"
|
|
|
|
- env:
|
|
|
|
- BUILDMAN="arm1176"
|
2014-11-19 14:26:18 +00:00
|
|
|
- env:
|
2016-01-25 19:22:41 +00:00
|
|
|
- BUILDMAN="arm720t"
|
2014-11-19 14:26:18 +00:00
|
|
|
- env:
|
2016-01-25 19:22:41 +00:00
|
|
|
- BUILDMAN="arm920t"
|
2014-11-19 14:26:18 +00:00
|
|
|
- env:
|
2016-01-25 19:22:41 +00:00
|
|
|
- BUILDMAN="atmel -x avr32"
|
2014-11-19 14:26:18 +00:00
|
|
|
- env:
|
2016-01-25 19:22:41 +00:00
|
|
|
- BUILDMAN="avr32"
|
|
|
|
TOOLCHAIN="avr32"
|
2014-11-19 14:26:18 +00:00
|
|
|
- env:
|
2016-01-25 19:22:41 +00:00
|
|
|
- BUILDMAN="davinci"
|
2014-11-19 14:26:18 +00:00
|
|
|
- env:
|
2016-01-25 19:22:41 +00:00
|
|
|
- BUILDMAN="denx"
|
2014-11-19 14:26:18 +00:00
|
|
|
- env:
|
2016-01-25 19:22:41 +00:00
|
|
|
- BUILDMAN="freescale -x powerpc,m68k,aarch64"
|
2014-11-19 14:26:18 +00:00
|
|
|
- env:
|
2016-01-25 19:22:41 +00:00
|
|
|
- BUILDMAN="sandbox x86"
|
2016-10-20 15:08:26 +00:00
|
|
|
TOOLCHAIN="x86_64"
|
2014-11-19 14:26:18 +00:00
|
|
|
- env:
|
2016-01-25 19:22:41 +00:00
|
|
|
- BUILDMAN="kirkwood"
|
2014-11-19 14:26:18 +00:00
|
|
|
- env:
|
2016-01-25 19:22:41 +00:00
|
|
|
- BUILDMAN="m68k"
|
|
|
|
TOOLCHAIN="m68k"
|
2016-10-20 15:23:15 +00:00
|
|
|
- env:
|
|
|
|
- BUILDMAN="microblaze"
|
|
|
|
TOOLCHAIN="microblaze"
|
2014-11-19 14:26:18 +00:00
|
|
|
- env:
|
2016-01-25 19:22:41 +00:00
|
|
|
- BUILDMAN="mips"
|
|
|
|
TOOLCHAIN="mips"
|
2015-03-05 08:02:23 +00:00
|
|
|
- env:
|
2016-01-25 19:22:41 +00:00
|
|
|
- BUILDMAN="mpc512x"
|
2015-03-05 08:02:23 +00:00
|
|
|
- env:
|
2016-01-25 19:22:41 +00:00
|
|
|
- BUILDMAN="mpc5xx"
|
2015-03-05 08:02:23 +00:00
|
|
|
- env:
|
2016-01-25 19:22:41 +00:00
|
|
|
- BUILDMAN="mpc5xxx"
|
2015-03-05 08:02:23 +00:00
|
|
|
- env:
|
2016-01-25 19:22:41 +00:00
|
|
|
- BUILDMAN="mpc8260"
|
2014-11-19 14:26:18 +00:00
|
|
|
- env:
|
2016-01-25 19:22:41 +00:00
|
|
|
- BUILDMAN="mpc83xx"
|
2014-11-19 14:26:18 +00:00
|
|
|
- env:
|
2016-01-25 19:22:41 +00:00
|
|
|
- BUILDMAN="mpc85xx -x freescale"
|
2015-03-05 08:02:23 +00:00
|
|
|
- env:
|
2016-01-25 19:22:41 +00:00
|
|
|
- BUILDMAN="mpc85xx -x t208xrdb -x t4qds -x t102* -x p1_p2_rdb_pc -x p1010rdb -x corenet_ds -x b4860qds -x sbc8548 -x bsc91*"
|
2015-03-05 08:02:23 +00:00
|
|
|
- env:
|
2016-01-25 19:22:41 +00:00
|
|
|
- BUILDMAN="t208xrdb t4qds t102*"
|
2015-03-17 07:21:41 +00:00
|
|
|
- env:
|
2016-01-25 19:22:41 +00:00
|
|
|
- BUILDMAN="p1_p2_rdb_pc p1010rdb"
|
2015-03-05 08:02:23 +00:00
|
|
|
- env:
|
2016-01-25 19:22:41 +00:00
|
|
|
- BUILDMAN="corenet_ds b4860qds sbc8548 bsc91*"
|
2014-11-19 14:26:18 +00:00
|
|
|
- env:
|
2016-01-25 19:22:41 +00:00
|
|
|
- BUILDMAN="mpc86xx"
|
2014-11-19 14:26:18 +00:00
|
|
|
- env:
|
2016-01-25 19:22:41 +00:00
|
|
|
- BUILDMAN="mpc8xx"
|
2014-11-19 14:26:18 +00:00
|
|
|
- env:
|
2016-01-25 19:22:41 +00:00
|
|
|
- BUILDMAN="siemens"
|
|
|
|
- env:
|
|
|
|
- BUILDMAN="ti"
|
|
|
|
- env:
|
|
|
|
- BUILDMAN="aarch64"
|
|
|
|
TOOLCHAIN="aarch64"
|
2016-10-20 15:23:15 +00:00
|
|
|
- env:
|
|
|
|
- BUILDMAN="sh4"
|
|
|
|
TOOLCHAIN="sh4"
|
|
|
|
- env:
|
|
|
|
- BUILDMAN="xtensa"
|
|
|
|
TOOLCHAIN="xtensa"
|
2014-11-19 14:26:18 +00:00
|
|
|
|
|
|
|
# QA jobs for code analytics
|
|
|
|
# static code analysis with cppcheck (we can add --enable=all later)
|
2016-10-24 22:41:48 +00:00
|
|
|
- env:
|
|
|
|
- JOB="cppcheck"
|
|
|
|
script:
|
2016-10-20 15:24:52 +00:00
|
|
|
- cppcheck --force --quiet --inline-suppr .
|
2014-11-19 14:26:18 +00:00
|
|
|
# search for TODO within source tree
|
2016-10-24 22:41:48 +00:00
|
|
|
- env:
|
|
|
|
- JOB="grep TODO"
|
|
|
|
script:
|
2016-10-20 15:24:52 +00:00
|
|
|
- grep -r TODO .
|
2014-11-19 14:26:18 +00:00
|
|
|
# search for FIXME within source tree
|
2016-10-24 22:41:48 +00:00
|
|
|
- env:
|
|
|
|
- JOB="grep FIXME HACK"
|
|
|
|
script:
|
2016-10-20 15:24:52 +00:00
|
|
|
- grep -r FIXME .
|
2014-11-19 14:26:18 +00:00
|
|
|
# search for HACK within source tree and ignore HACKKIT board
|
|
|
|
script:
|
|
|
|
- grep -r HACK . | grep -v HACKKIT
|
|
|
|
# some statistics about the code base
|
2016-10-24 22:41:48 +00:00
|
|
|
- env:
|
|
|
|
- JOB="sloccount"
|
|
|
|
script:
|
2016-10-20 15:24:52 +00:00
|
|
|
- sloccount .
|
2016-02-09 01:23:35 +00:00
|
|
|
# test/py
|
2016-10-24 22:41:48 +00:00
|
|
|
- env:
|
|
|
|
- JOB="test.py sandbox"
|
|
|
|
script:
|
2016-10-20 15:24:52 +00:00
|
|
|
- ./test/py/test.py --bd sandbox --build
|
2016-10-20 15:26:40 +00:00
|
|
|
- env:
|
2016-10-24 22:41:48 +00:00
|
|
|
- JOB="test.py ARM"
|
2016-10-20 15:26:40 +00:00
|
|
|
- CROSS_COMPILE="/usr/bin/arm-linux-gnueabihf-"
|
|
|
|
script:
|
|
|
|
- ./test/py/test.py --bd vexpress_ca15_tc2 --id qemu --build;
|
|
|
|
./test/py/test.py --bd vexpress_ca9x4 --id qemu --build;
|
|
|
|
./test/py/test.py --bd integratorcp_cm926ejs --id qemu --build;
|
|
|
|
- env:
|
2016-10-24 22:41:48 +00:00
|
|
|
- JOB="test.py MIPS"
|
2016-10-20 15:26:40 +00:00
|
|
|
- TOOLCHAIN="mips"
|
|
|
|
CROSS_COMPILE="${HOME}/.buildman-toolchains/gcc-4.9.0-nolibc/mips-linux/bin/mips-linux-"
|
|
|
|
script:
|
|
|
|
- ./test/py/test.py --bd qemu_mips --build -k 'not sleep';
|
|
|
|
./test/py/test.py --bd qemu_mipsel --build -k 'not sleep';
|
|
|
|
./test/py/test.py --bd qemu_mips64 --build -k 'not sleep';
|
|
|
|
./test/py/test.py --bd qemu_mips64el --build -k 'not sleep';
|
|
|
|
- env:
|
2016-10-24 22:41:48 +00:00
|
|
|
- JOB="test.py PowerPC"
|
2016-10-20 15:26:40 +00:00
|
|
|
- CROSS_COMPILE="/usr/bin/powerpc-linux-gnu-"
|
|
|
|
script:
|
|
|
|
- ./test/py/test.py --bd qemu-ppce500 --build -k 'not sleep'
|
|
|
|
- env:
|
2016-10-24 22:41:48 +00:00
|
|
|
- JOB="test.py x86-64"
|
2016-10-20 15:26:40 +00:00
|
|
|
- TOOLCHAIN="x86_64"
|
|
|
|
BUILD_ROM=yes
|
|
|
|
CROSS_COMPILE="${HOME}/.buildman-toolchains/gcc-4.9.0-nolibc/x86_64-linux/bin/x86_64-linux-"
|
|
|
|
script:
|
|
|
|
- ./test/py/test.py --bd qemu-x86 --build -k 'not sleep'
|
2014-11-19 14:26:18 +00:00
|
|
|
|
|
|
|
# TODO make it perfect ;-r
|