diff --git a/.travis.yml b/.travis.yml index ab3b3f817ee3e..f9a44222413fb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,8 @@ notifications: env: matrix: + - BUILD_TYPE=checkpatch + - BUILD_TYPE=dtb_build_test - DEFCONFIG_NAME=zynq_xcomm_adv7511_defconfig ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- DTS_FILES=arch/arm/boot/dts/zynq-*.dts IMAGE=uImage - DEFCONFIG_NAME=zynq_pluto_defconfig ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- @@ -18,8 +20,8 @@ env: DTS_FILES=arch/arm/boot/dts/zynq-*.dts IMAGE=uImage - DEFCONFIG_NAME=adi_zynqmp_defconfig ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- DTS_FILES=arch/arm64/boot/dts/xilinx/zynqmp-*.dts DTS_PREFIX=xilinx/ IMAGE=Image - - COMPILE_TEST=y DEFCONFIG_NAME=zynq_xcomm_adv7511_defconfig ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- - - COMPILE_TEST=y DEFCONFIG_NAME=adi_zynqmp_defconfig ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- + - BUILD_TYPE=compile_test DEFCONFIG_NAME=zynq_xcomm_adv7511_defconfig ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- + - BUILD_TYPE=compile_test DEFCONFIG_NAME=adi_zynqmp_defconfig ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- before_install: - sudo apt-get update -qq diff --git a/ci/travis/run-build.sh b/ci/travis/run-build.sh index c72da48bcf54b..eed54a45dfebe 100755 --- a/ci/travis/run-build.sh +++ b/ci/travis/run-build.sh @@ -2,19 +2,21 @@ set -xe build_default() { - if [ -n "$TRAVIS_BRANCH" ]; then - git fetch origin +refs/heads/${TRAVIS_BRANCH}:${TRAVIS_BRANCH} - fi - - COMMIT_RANGE=$([ "$TRAVIS_PULL_REQUEST" == "false" ] && echo HEAD || echo ${TRAVIS_BRANCH}..) - make ${DEFCONFIG_NAME} make -j`getconf _NPROCESSORS_ONLN` $IMAGE UIMAGE_LOADADDR=0x8000 +} - for file in $DTS_FILES; do - make ${DTS_PREFIX}`basename $file | sed -e 's\dts\dtb\g'` || exit 1 - done +build_compile_test() { + export COMPILE_TEST=y + make ${DEFCONFIG_NAME} + make -j`getconf _NPROCESSORS_ONLN` +} +build_checkpatch() { + if [ -n "$TRAVIS_BRANCH" ]; then + git fetch origin +refs/heads/${TRAVIS_BRANCH}:${TRAVIS_BRANCH} + fi + COMMIT_RANGE=$([ "$TRAVIS_PULL_REQUEST" == "false" ] && echo HEAD || echo ${TRAVIS_BRANCH}..) scripts/checkpatch.pl --git ${COMMIT_RANGE} \ --ignore FILE_PATH_CHANGES \ --ignore LONG_LINE \ @@ -22,15 +24,12 @@ build_default() { --ignore LONG_LINE_COMMENT } -build_compile_test() { - make ${DEFCONFIG_NAME} - make -j`getconf _NPROCESSORS_ONLN` +build_dtb_build_test() { + for file in $DTS_FILES; do + make ${DTS_PREFIX}`basename $file | sed -e 's\dts\dtb\g'` || exit 1 + done } -BUILD_TYPE=default - -if [ "$COMPILE_TEST" == "y" ] ; then - BUILD_TYPE=compile_test -fi +BUILD_TYPE=${BUILD_TYPE:-default} build_${BUILD_TYPE}