Travis CI updates:

* Use clang 3.8
* Add msan/usan variants
* Build only gcc.coverage and clang.{asan,usan,msan}
* Make sure (correct) llvm-symbolizer is on PATH
This commit is contained in:
Nicholas Dudfield
2016-05-09 23:06:38 +07:00
committed by Vinnie Falco
parent e47811bef2
commit 72552363f6
4 changed files with 69 additions and 43 deletions

View File

@@ -34,8 +34,8 @@ packages: &gcc5_pkgs
- autotools-dev - autotools-dev
- libc6-dbg - libc6-dbg
packages: &clang36_pkgs packages: &clang38_pkgs
- clang-3.6 - clang-3.8
- g++-5 - g++-5
- python-software-properties - python-software-properties
- libssl-dev - libssl-dev
@@ -53,56 +53,57 @@ packages: &clang36_pkgs
matrix: matrix:
include: include:
# GCC/Debug # GCC/Debug
# - compiler: gcc
# env: GCC_VER=5 VARIANT=debug ADDRESS_MODEL=64
# addons: &ao_gcc5
# apt:
# sources: ['ubuntu-toolchain-r-test']
# packages: *gcc5_pkgs
# # GCC/Release
# - compiler: gcc
# env: GCC_VER=5 VARIANT=release ADDRESS_MODEL=64
# addons: *ao_gcc5
# Coverage
- compiler: gcc - compiler: gcc
env: GCC_VER=5 VARIANT=debug ADDRESS_MODEL=64 env: GCC_VER=5 VARIANT=coverage ADDRESS_MODEL=64
addons: &ao_gcc5 addons: &ao_gcc5
apt: apt:
sources: ['ubuntu-toolchain-r-test'] sources: ['ubuntu-toolchain-r-test']
packages: *gcc5_pkgs packages: *gcc5_pkgs
# - compiler: gcc # # Clang/Debug
# env: GCC_VER=5 VARIANT=debug ADDRESS_MODEL=32 # - compiler: clang
# addons: *ao_gcc5 # env: GCC_VER=5 VARIANT=debug CLANG_VER=3.8 ADDRESS_MODEL=64
# addons: &ao_clang38
# apt:
# sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.8']
# packages: *clang38_pkgs
# GCC/Release # # Clang/Release
- compiler: gcc # - compiler: clang
env: GCC_VER=5 VARIANT=release ADDRESS_MODEL=64 # env: GCC_VER=5 VARIANT=release CLANG_VER=3.8 ADDRESS_MODEL=64
addons: *ao_gcc5 # addons: *ao_clang38
# # - compiler: gcc # Clang/AddressSanitizer
# # env: GCC_VER=5 VARIANT=release ADDRESS_MODEL=32
# # addons: *ao_gcc5
# Clang/Debug
- compiler: clang - compiler: clang
env: GCC_VER=5 VARIANT=debug CLANG_VER=3.6 ADDRESS_MODEL=64 env: GCC_VER=5 VARIANT=asan CLANG_VER=3.8 ADDRESS_MODEL=64
addons: &ao_clang36 addons: &ao_clang38
apt: apt:
sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.6'] sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.8']
packages: *clang36_pkgs packages: *clang38_pkgs
# # - compiler: clang # Clang/MemorySanitizer
# # env: GCC_VER=5 VARIANT=debug CLANG_VER=3.6 ADDRESS_MODEL=32 # VFALCO Generates false positives unless libc++ is compiled with msan turned on
# # addons: *ao_clang36 #- compiler: clang
# env: GCC_VER=5 VARIANT=msan CLANG_VER=3.8 ADDRESS_MODEL=64 MSAN_OPTIONS=poison_in_dtor=1,sanitize-memory-track-origins=2
# addons: *ao_clang38
# Clang/Release # Clang/UndefinedBehaviourSanitizer
- compiler: clang - compiler: clang
env: GCC_VER=5 VARIANT=release CLANG_VER=3.6 ADDRESS_MODEL=64 env: GCC_VER=5 VARIANT=usan CLANG_VER=3.8 ADDRESS_MODEL=64
addons: *ao_clang36 addons: *ao_clang38
# # - compiler: clang
# # env: GCC_VER=5 VARIANT=release CLANG_VER=3.6 ADDRESS_MODEL=32
# # addons: *ao_clang36
# Coverage
- compiler: gcc
env: GCC_VER=5 VARIANT=coverage ADDRESS_MODEL=64
addons: *ao_gcc5
# ASAN
- compiler: gcc
env: GCC_VER=5 VARIANT=asan ADDRESS_MODEL=64
addons: *ao_gcc5
cache: cache:
directories: directories:

16
Jamroot
View File

@@ -61,6 +61,22 @@ variant asan
<linkflags>"-fsanitize=address" <linkflags>"-fsanitize=address"
; ;
variant msan
:
debug
:
<cxxflags>"-fsanitize=memory -fno-omit-frame-pointer -fsanitize-memory-track-origins=2 -fsanitize-memory-use-after-dtor"
<linkflags>"-fsanitize=memory"
;
variant usan
:
debug
:
<cxxflags>"-fsanitize=undefined -fno-omit-frame-pointer"
<linkflags>"-fsanitize=undefined"
;
project beast project beast
: requirements : requirements
<include>. <include>.

View File

@@ -6,7 +6,16 @@ set -ex
################################## ENVIRONMENT ################################# ################################## ENVIRONMENT #################################
export PATH=$VALGRIND_ROOT/bin:$LCOV_ROOT/usr/bin:$PATH # If not CI, then set some defaults
if [[ "${CI:-}" == "" ]]; then
TRAVIS_BRANCH=${TRAVIS_BRANCH:-feature}
CC=${CC:-gcc}
ADDRESS_MODEL=${ADDRESS_MODEL:-64}
VARIANT=${VARIANT:-debug}
# If running locally we assume we have lcov/valgrind on PATH
else
export PATH=$VALGRIND_ROOT/bin:$LCOV_ROOT/usr/bin:$PATH
fi
echo "using toolset: $CC" echo "using toolset: $CC"
echo "using variant: $VARIANT" echo "using variant: $VARIANT"
@@ -46,8 +55,8 @@ if [[ $VARIANT == "coverage" ]]; then
# We need to wait a while so wstest can connect! # We need to wait a while so wstest can connect!
sleep 5 sleep 5
# cd scripts && wstest -m fuzzingclient cd scripts && wstest -m fuzzingclient
# cd .. cd ..
# Show the output # Show the output
cat nohup.out cat nohup.out
rm nohup.out rm nohup.out

View File

@@ -9,7 +9,7 @@ do
test -x $( type -p ${g}-$GCC_VER ) test -x $( type -p ${g}-$GCC_VER )
ln -sv $(type -p ${g}-$GCC_VER) $HOME/bin/${g} ln -sv $(type -p ${g}-$GCC_VER) $HOME/bin/${g}
done done
for c in clang clang++ for c in clang clang++ llvm-symbolizer
do do
test -x $( type -p ${c}-$CLANG_VER ) test -x $( type -p ${c}-$CLANG_VER )
ln -sv $(type -p ${c}-$CLANG_VER) $HOME/bin/${c} ln -sv $(type -p ${c}-$CLANG_VER) $HOME/bin/${c}