2015-10-05 02:09:03 -06:00
language : cpp
2016-04-09 00:58:14 -06:00
sudo : required
dist : trusty
2015-10-05 02:09:03 -06:00
2015-10-06 03:59:06 -06:00
matrix :
include :
- os : linux
compiler : gcc
addons :
apt :
sources : [ 'ubuntu-toolchain-r-test' ]
2016-10-31 14:47:15 -06:00
packages : [ 'g++-6' , 'g++-6-multilib' , 'g++-multilib' , 'valgrind' , 'expect' ]
2015-10-06 03:59:06 -06:00
env :
2016-10-26 13:24:26 -06:00
- COMPILER=g++-6
2015-10-06 03:59:06 -06:00
- COMP=gcc
2015-10-05 02:09:03 -06:00
2015-10-06 03:59:06 -06:00
- os : linux
compiler : clang
addons :
apt :
2016-04-09 00:58:14 -06:00
sources : [ 'ubuntu-toolchain-r-test' ]
2016-10-31 14:47:15 -06:00
packages : [ 'clang' , 'g++-multilib' , 'valgrind' , 'expect' ]
2015-10-06 03:59:06 -06:00
env :
2016-04-09 00:58:14 -06:00
- COMPILER=clang++
2015-10-06 03:59:06 -06:00
- COMP=clang
2015-10-07 12:33:37 -06:00
- os : osx
compiler : gcc
env :
2016-04-09 00:58:14 -06:00
- COMPILER=g++
2015-10-07 12:33:37 -06:00
- COMP=gcc
2015-10-06 03:59:06 -06:00
- os : osx
compiler : clang
env :
- COMPILER=clang++ V='Apple LLVM 6.0' # Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn)
- COMP=clang
2015-10-05 02:09:03 -06:00
branches :
only :
- master
before_script :
- cd src
script :
2017-08-16 03:28:54 -06:00
# Obtain bench reference from git log
2017-01-11 00:44:06 -07:00
- git log HEAD | grep "\b[Bb]ench[ :]\+[0-9]\{7\}" | head -n 1 | sed "s/[^0-9]*\([0-9][0-9]*\)/\1/g" > git_sig
2017-01-09 04:40:07 -07:00
- export benchref=$(cat git_sig)
2017-01-09 02:30:57 -07:00
- echo "Reference bench:" $benchref
#
2017-08-16 03:28:54 -06:00
# Verify bench number against various builds
2017-09-03 01:25:02 -06:00
- export CXXFLAGS=-Werror
- make clean && make -j2 ARCH=x86-64 optimize=no debug=yes build && ../tests/signature.sh $benchref
- make clean && make -j2 ARCH=x86-32 optimize=no debug=yes build && ../tests/signature.sh $benchref
- make clean && make -j2 ARCH=x86-32 build && ../tests/signature.sh $benchref
- make clean && make -j2 ARCH=x86-64 build && ../tests/signature.sh $benchref
2017-01-09 02:30:57 -07:00
#
2017-08-16 03:28:54 -06:00
# Check perft and reproducible search
- ../tests/perft.sh
- ../tests/reprosearch.sh
2017-01-09 02:30:57 -07:00
#
2017-08-16 03:28:54 -06:00
# Valgrind
2017-01-09 02:30:57 -07:00
#
2017-08-16 03:28:54 -06:00
- export CXXFLAGS=-O1
- if [ -x "$(command -v valgrind )" ]; then make clean && make -j2 ARCH=x86-64 debug=yes optimize=no build > /dev/null && ../tests/instrumented.sh --valgrind; fi
2017-08-31 14:11:09 -06:00
- if [ -x "$(command -v valgrind )" ]; then ../tests/instrumented.sh --valgrind-thread; fi
2017-01-09 02:30:57 -07:00
#
2017-08-16 03:28:54 -06:00
# Sanitizer
2017-01-09 02:30:57 -07:00
#
2017-08-16 03:28:54 -06:00
# Use g++-6 as a proxy for having sanitizers, might need revision as they become available for more recent versions of clang/gcc
- if [[ "$COMPILER" == "g++-6" ]]; then make clean && make -j2 ARCH=x86-64 sanitize=undefined optimize=no debug=yes build > /dev/null && ../tests/instrumented.sh --sanitizer-undefined; fi
- if [[ "$COMPILER" == "g++-6" ]]; then make clean && make -j2 ARCH=x86-64 sanitize=thread optimize=no debug=yes build > /dev/null && ../tests/instrumented.sh --sanitizer-thread; fi