From 50c52d2b0f2c1a3f355ff7d281127faa47bb3856 Mon Sep 17 00:00:00 2001 From: Peter Colberg Date: Thu, 23 Jun 2016 23:32:31 -0400 Subject: [PATCH] Use Travis build matrix to test different platforms Create a clean, minimal, cross-platform Travis script with a build matrix for testing different operating systems and architectures. --- .travis.sh | 26 -------------------------- .travis.yml | 21 ++++++++++++--------- 2 files changed, 12 insertions(+), 35 deletions(-) delete mode 100755 .travis.sh diff --git a/.travis.sh b/.travis.sh deleted file mode 100755 index 12296d9..0000000 --- a/.travis.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh -set -eux - -case "$TARGET" in -host) - uname -a - export LOADER= - make ;; -arm32) - sudo bash -c 'echo >> /etc/apt/sources.list "deb http://archive.ubuntu.com/ubuntu/ trusty main restricted universe"' - sudo apt-get update - sudo apt-get -y install gcc-4.7-arm-linux-gnueabihf qemu binfmt-support - make CC="arm-linux-gnueabihf-gcc-4.7" - export LD_LIBRARY_PATH=/usr/arm-linux-gnueabihf/lib - #export LOADER=/usr/arm-linux-gnueabihf/lib/ld-linux-armhf.so.3 - export LOADER="echo TESTS DISABLED ON ARM" - ;; -*) - echo 'Unknown TARGET!' - exit 1 - ;; -esac - -$LOADER make check - -make clean && git status --ignored --porcelain && test -z "$(git status --ignored --porcelain)" diff --git a/.travis.yml b/.travis.yml index d047e73..1ebd486 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,13 +1,16 @@ +sudo: required +dist: trusty language: c -script: ./.travis.sh -os: - - linux -env: - - TARGET=host - - TARGET=arm32 + +script: + - make $FLAGS + - make check $FLAGS + - make clean && git status --ignored --porcelain && test -z "$(git status --ignored --porcelain)" + matrix: - exclude: - - os: osx - env: TARGET=arm32 + include: + - os: linux + env: FLAGS="CC=gcc" + notifications: email: false