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
|
2016-10-29 21:11:17 +00:00
|
|
|
- gcc-aarch64-linux-gnu
|
2016-10-20 15:08:26 +00:00
|
|
|
- iasl
|
2016-11-18 12:18:00 +00:00
|
|
|
- grub-efi-ia32-bin
|
|
|
|
- rpm2cpio
|
|
|
|
- wget
|
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
|
2016-11-18 12:18:00 +00:00
|
|
|
- grub-mkimage -o ~/grub_x86.efi -O i386-efi normal echo lsefimmap lsefi lsefisystab efinet tftp minicmd
|
|
|
|
- mkdir ~/grub2-arm
|
|
|
|
- ( cd ~/grub2-arm; wget -O - http://download.opensuse.org/ports/armv7hl/distribution/leap/42.2/repo/oss/suse/armv7hl/grub2-arm-efi-2.02~beta2-87.1.armv7hl.rpm | rpm2cpio | cpio -di )
|
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
|
2016-11-17 17:31:04 +00:00
|
|
|
- PYTHONPATH=/tmp/uboot-test-hooks/py/travis-ci
|
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}" == *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-26 17:05:36 +00:00
|
|
|
# Comments must be outside the command strings below, or the Travis parser
|
|
|
|
# will get confused.
|
|
|
|
#
|
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-10-26 17:05:34 +00:00
|
|
|
tools/buildman/buildman -P ${BUILDMAN};
|
2016-10-26 17:05:32 +00:00
|
|
|
ret=$?;
|
2016-10-26 17:05:35 +00:00
|
|
|
if [[ $ret -ne 0 && $ret -ne 129 ]]; then
|
2016-11-05 23:34:49 +00:00
|
|
|
tools/buildman/buildman -sdeP ${BUILDMAN};
|
2016-10-26 17:05:32 +00:00
|
|
|
exit $ret;
|
|
|
|
fi;
|
2016-01-25 19:22:41 +00:00
|
|
|
fi
|
2016-10-26 17:05:36 +00:00
|
|
|
# "not a_test_which_does_not_exist" is a dummy -k parameter which will
|
|
|
|
# never prevent any test from running. That way, we can always pass
|
|
|
|
# "-k something" even when $TEST_PY_TEST_SPEC doesnt need a custom
|
|
|
|
# value.
|
2016-11-17 17:31:03 +00:00
|
|
|
- export UBOOT_TRAVIS_BUILD_DIR=`cd .. && pwd`/.bm-work/${TEST_PY_BD};
|
2016-11-18 12:18:00 +00:00
|
|
|
cp ~/grub_x86.efi $UBOOT_TRAVIS_BUILD_DIR/;
|
|
|
|
cp ~/grub2-arm/usr/lib/grub2/arm-efi/grub.efi $UBOOT_TRAVIS_BUILD_DIR/grub_arm.efi;
|
2016-11-17 17:31:03 +00:00
|
|
|
if [[ "${TEST_PY_BD}" != "" ]]; then
|
2016-10-26 17:05:36 +00:00
|
|
|
./test/py/test.py --bd ${TEST_PY_BD} ${TEST_PY_ID}
|
|
|
|
-k "${TEST_PY_TEST_SPEC:-not a_test_which_does_not_exist}"
|
2016-11-17 17:31:03 +00:00
|
|
|
--build-dir "$UBOOT_TRAVIS_BUILD_DIR";
|
2016-10-26 17:05:36 +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:
|
2016-11-05 23:34:49 +00:00
|
|
|
- BUILDMAN="arm11"
|
2016-01-25 19:22:41 +00:00
|
|
|
- env:
|
2016-11-05 23:34:49 +00:00
|
|
|
- BUILDMAN="arm7"
|
2014-11-19 14:26:18 +00:00
|
|
|
- env:
|
2016-01-25 19:22:41 +00:00
|
|
|
- BUILDMAN="arm920t"
|
2016-11-05 23:34:49 +00:00
|
|
|
- env:
|
|
|
|
- JOB="arm926ejs"
|
|
|
|
BUILDMAN="arm926ejs -x mx,siemens,atmel"
|
|
|
|
- env:
|
|
|
|
- BUILDMAN="arm946es"
|
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="denx"
|
2014-11-19 14:26:18 +00:00
|
|
|
- env:
|
2016-11-30 19:05:08 +00:00
|
|
|
- JOB="Freescale ARM32"
|
|
|
|
BUILDMAN="freescale -x powerpc,m68k,aarch64"
|
|
|
|
- env:
|
|
|
|
- JOB="Freescale AArch64"
|
|
|
|
BUILDMAN="freescale -x powerpc,m68k,armv7,arm9,arm11"
|
2016-11-05 23:34:49 +00:00
|
|
|
- env:
|
|
|
|
- JOB="i.MX (non-Freescale)"
|
|
|
|
BUILDMAN="mx -x freescale"
|
2016-11-29 17:41:19 +00:00
|
|
|
- env:
|
|
|
|
- BUILDMAN="samsung"
|
2016-11-05 23:34:49 +00:00
|
|
|
- env:
|
|
|
|
- BUILDMAN="sun4i"
|
|
|
|
- env:
|
|
|
|
- BUILDMAN="sun5i"
|
|
|
|
- env:
|
|
|
|
- BUILDMAN="sun6i"
|
|
|
|
- env:
|
|
|
|
- BUILDMAN="sun7i"
|
|
|
|
- env:
|
|
|
|
- BUILDMAN="sun8i"
|
|
|
|
- env:
|
|
|
|
- BUILDMAN="sun9i"
|
|
|
|
- env:
|
|
|
|
- BUILDMAN="sun50i"
|
|
|
|
- env:
|
|
|
|
- JOB="Catch-all ARM"
|
2016-11-29 17:41:19 +00:00
|
|
|
BUILDMAN="arm -x arm11,arm7,arm9,aarch64,atmel,denx,freescale,kirkwood,siemens,tegra,uniphier,mx,samsung,sunxi,am33xx,omap3,omap4,omap5,pxa,rockchip"
|
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"
|
2016-11-05 23:34:49 +00:00
|
|
|
- env:
|
|
|
|
- BUILDMAN="pxa"
|
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"
|
2016-10-26 19:05:52 +00:00
|
|
|
- env:
|
2016-10-29 21:11:17 +00:00
|
|
|
- BUILDMAN="tegra"
|
2016-01-25 19:22:41 +00:00
|
|
|
- env:
|
2016-11-05 23:34:49 +00:00
|
|
|
- JOB="am33xx"
|
|
|
|
BUILDMAN="am33xx -x siemens"
|
|
|
|
- env:
|
|
|
|
- BUILDMAN="omap3"
|
|
|
|
- env:
|
|
|
|
- BUILDMAN="omap4"
|
|
|
|
- env:
|
|
|
|
- BUILDMAN="omap5"
|
2016-01-25 19:22:41 +00:00
|
|
|
- env:
|
2016-10-29 21:11:17 +00:00
|
|
|
- BUILDMAN="uniphier"
|
|
|
|
- env:
|
2016-11-29 17:41:19 +00:00
|
|
|
- BUILDMAN="aarch64 -x tegra,freescale,uniphier,sunxi,samsung,rockchip"
|
2016-01-25 19:22:41 +00:00
|
|
|
TOOLCHAIN="aarch64"
|
2016-11-29 17:41:19 +00:00
|
|
|
- env:
|
|
|
|
- BUILDMAN="rockchip"
|
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-10-26 17:05:36 +00:00
|
|
|
|
2016-02-09 01:23:35 +00:00
|
|
|
# test/py
|
2016-10-24 22:41:48 +00:00
|
|
|
- env:
|
2016-10-26 17:05:36 +00:00
|
|
|
- TEST_PY_BD="sandbox"
|
|
|
|
BUILDMAN="^sandbox$"
|
|
|
|
TOOLCHAIN="x86_64"
|
2016-10-20 15:26:40 +00:00
|
|
|
- env:
|
2016-10-26 17:05:36 +00:00
|
|
|
- TEST_PY_BD="vexpress_ca15_tc2"
|
|
|
|
TEST_PY_ID="--id qemu"
|
|
|
|
BUILDMAN="^vexpress_ca15_tc2$"
|
2016-10-20 15:26:40 +00:00
|
|
|
- env:
|
2016-10-26 17:05:36 +00:00
|
|
|
- TEST_PY_BD="vexpress_ca9x4"
|
|
|
|
TEST_PY_ID="--id qemu"
|
|
|
|
BUILDMAN="^vexpress_ca9x4$"
|
2016-10-20 15:26:40 +00:00
|
|
|
- env:
|
2016-10-26 17:05:36 +00:00
|
|
|
- TEST_PY_BD="integratorcp_cm926ejs"
|
2016-11-17 17:31:07 +00:00
|
|
|
TEST_PY_TEST_SPEC="not sleep"
|
2016-10-26 17:05:36 +00:00
|
|
|
TEST_PY_ID="--id qemu"
|
|
|
|
BUILDMAN="^integratorcp_cm926ejs$"
|
2016-10-20 15:26:40 +00:00
|
|
|
- env:
|
2016-10-26 17:05:36 +00:00
|
|
|
- TEST_PY_BD="qemu_mips"
|
|
|
|
TEST_PY_TEST_SPEC="not sleep"
|
|
|
|
BUILDMAN="^qemu_mips$"
|
|
|
|
TOOLCHAIN="mips"
|
|
|
|
- env:
|
|
|
|
- TEST_PY_BD="qemu_mipsel"
|
|
|
|
TEST_PY_TEST_SPEC="not sleep"
|
|
|
|
BUILDMAN="^qemu_mipsel$"
|
|
|
|
TOOLCHAIN="mips"
|
|
|
|
- env:
|
|
|
|
- TEST_PY_BD="qemu_mips64"
|
|
|
|
TEST_PY_TEST_SPEC="not sleep"
|
|
|
|
BUILDMAN="^qemu_mips64$"
|
|
|
|
TOOLCHAIN="mips"
|
|
|
|
- env:
|
|
|
|
- TEST_PY_BD="qemu_mips64el"
|
|
|
|
TEST_PY_TEST_SPEC="not sleep"
|
|
|
|
BUILDMAN="^qemu_mips64el$"
|
|
|
|
TOOLCHAIN="mips"
|
|
|
|
- env:
|
|
|
|
- TEST_PY_BD="qemu-ppce500"
|
|
|
|
TEST_PY_TEST_SPEC="not sleep"
|
|
|
|
BUILDMAN="^qemu-ppce500$"
|
|
|
|
- env:
|
|
|
|
- TEST_PY_BD="qemu-x86"
|
|
|
|
TEST_PY_TEST_SPEC="not sleep"
|
|
|
|
BUILDMAN="^qemu-x86$"
|
|
|
|
TOOLCHAIN="x86_64"
|
|
|
|
BUILD_ROM="yes"
|
2014-11-19 14:26:18 +00:00
|
|
|
|
|
|
|
# TODO make it perfect ;-r
|