From 4643c7bf9e70294a471b934348727be3506096e6 Mon Sep 17 00:00:00 2001 From: Francisco Ferreira Date: Wed, 9 Mar 2016 01:03:29 +0000 Subject: [PATCH] travis: add Clang builds PX4 isn't supported at the moment and sitltest always use GCC, so we include the only ones that build Travis has old LLVM installed and old Clang in a strange path (not a package) which interfere with the use of clang-3.7 --- .travis.yml | 10 ++++++++++ Tools/scripts/configure-ci.sh | 1 + 2 files changed, 11 insertions(+) diff --git a/.travis.yml b/.travis.yml index ce0eb1d89d..b2d661c24e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,6 +16,7 @@ addons: branch_pattern: coverity_scan before_install: + - export PATH=$(echo ${PATH} | awk -v RS=':' -v ORS=':' '/clang/ {next} {print}' | sed 's/:*$//') - APMDIR=$(pwd) && pushd .. && $APMDIR/Tools/scripts/configure-ci.sh && . ~/.profile && popd script: @@ -30,6 +31,8 @@ notifications: on_failure: always # options: [always|never|change] default: always on_start: false # default: false +compiler: gcc + env: global: # The next declaration is the encrypted COVERITY_SCAN_TOKEN, created @@ -39,3 +42,10 @@ env: - CI_BUILD_TARGET="px4-v2 sitl linux" - CI_BUILD_TARGET="navio raspilot minlure bebop" - CI_BUILD_TARGET="sitltest" + +matrix: + include: + - compiler: clang + env: CI_BUILD_TARGET="sitl linux minlure" + - compiler: clang + env: CI_BUILD_TARGET="navio raspilot bebop" \ No newline at end of file diff --git a/Tools/scripts/configure-ci.sh b/Tools/scripts/configure-ci.sh index 2bf2d36685..c29dbb3b2a 100755 --- a/Tools/scripts/configure-ci.sh +++ b/Tools/scripts/configure-ci.sh @@ -25,6 +25,7 @@ fi wget -q -O - http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add - sudo add-apt-repository "deb http://llvm.org/apt/${UBUNTU_CODENAME}/ llvm-toolchain-${UBUNTU_CODENAME}-3.7 main" -y sudo apt-get -qq -y update +sudo apt-get -qq -y remove clang llvm sudo apt-get -y install $PKGS sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-3.7 37 \ --slave /usr/bin/clang++ clang++ /usr/bin/clang++-3.7