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
This commit is contained in:
Francisco Ferreira 2016-03-09 01:03:29 +00:00 committed by Lucas De Marchi
parent dd93f62bdd
commit 4643c7bf9e
2 changed files with 11 additions and 0 deletions

View File

@ -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"

View File

@ -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