From fbae32235b5379d88e78eeb23831b7c82011e298 Mon Sep 17 00:00:00 2001 From: Bernhard Nortmann Date: Sat, 29 Oct 2016 10:55:36 +0200 Subject: [PATCH] travisci: Adjust build config to use "make all" on Linux For Linux build testing, we want all targets compiled. To do so without a cross-toolchain, simply use the host compiler for the target tools. This can be achieved by setting CROSS_COMPILE to an empty string. OSX can't handle this: It neither supports "-static", nor would it successfully compile meminfo.c. Thus we keep the default "make", which should only build the 'tools' target. On Linux we'll also test the install-* targets by requesting installation to /tmp/sunxi-tools as a post-build step. Signed-off-by: Bernhard Nortmann --- .travis.yml | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5da1f51..47aa891 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,9 @@ sudo: false language: c +# treat all warnings as errors +env: EXTRA_CFLAGS=-Werror + os: - linux - osx @@ -10,7 +13,7 @@ compiler: - gcc - clang -# OSX uses Apple's flavor of clang anyway, so there's no point in using "gcc". +# OSX uses Apple's flavor of clang anyway, so there's no point in trying "gcc". # This excludes the "gcc" compiler from the build matrix for OSX: matrix: exclude: @@ -23,17 +26,24 @@ addons: packages: - libusb-1.0-0-dev -# take care of the libusb dependency for Mac OS X +# take care of the libusb dependency for Mac OS X; on Linux use "make all" later before_install: - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; brew install libusb; + else + export TARGET="all CROSS_COMPILE="; fi -# build using the Makefile, treat all warnings as errors +# build using the Makefile script: - - make EXTRA_CFLAGS=-Werror - - make misc EXTRA_CFLAGS=-Werror + - make ${TARGET} && make misc + +# when on Linux: run/simulate a test install +after_success: + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then + make install-all install-misc DESTDIR=/tmp PREFIX=/sunxi-tools; + fi # turn off email notifications notifications: