2016-08-02 21:47:29 +00:00
|
|
|
sudo: required
|
|
|
|
dist: trusty
|
2015-04-03 18:43:42 +00:00
|
|
|
language: cpp
|
2014-11-12 09:32:00 +00:00
|
|
|
|
2016-08-08 05:44:34 +00:00
|
|
|
env:
|
|
|
|
global:
|
|
|
|
- /usr/local/bin:$PATH
|
|
|
|
|
2015-04-03 18:43:42 +00:00
|
|
|
matrix:
|
2017-05-22 16:26:05 +00:00
|
|
|
include:
|
|
|
|
- compiler: gcc
|
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
packages:
|
|
|
|
- lcov
|
2017-05-22 16:27:28 +00:00
|
|
|
env: COMPILER=g++ C_COMPILER=gcc BUILD_TYPE=Coverage
|
2017-05-22 16:26:05 +00:00
|
|
|
- compiler: gcc
|
2017-05-22 16:27:28 +00:00
|
|
|
env: COMPILER=g++ C_COMPILER=gcc BUILD_TYPE=Debug
|
2017-05-22 16:26:05 +00:00
|
|
|
- compiler: gcc
|
2017-05-22 16:27:28 +00:00
|
|
|
env: COMPILER=g++ C_COMPILER=gcc BUILD_TYPE=Release
|
2017-05-22 16:26:05 +00:00
|
|
|
- compiler: gcc
|
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
packages:
|
|
|
|
- g++-multilib
|
2017-05-22 16:27:28 +00:00
|
|
|
env: COMPILER=g++ C_COMPILER=gcc BUILD_TYPE=Debug BUILD_32_BITS=ON
|
2017-05-22 16:26:05 +00:00
|
|
|
- compiler: gcc
|
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
packages:
|
|
|
|
- g++-multilib
|
2017-05-22 16:27:28 +00:00
|
|
|
env: COMPILER=g++ C_COMPILER=gcc BUILD_TYPE=Release BUILD_32_BITS=ON
|
2017-05-22 16:26:05 +00:00
|
|
|
- compiler: gcc
|
|
|
|
env:
|
2018-02-13 04:28:23 +00:00
|
|
|
- INSTALL_GCC6_FROM_PPA=1
|
2017-05-22 16:26:05 +00:00
|
|
|
- COMPILER=g++-6 C_COMPILER=gcc-6 BUILD_TYPE=Debug
|
|
|
|
- EXTRA_FLAGS="-fno-omit-frame-pointer -g -O2 -fsanitize=undefined,address -fuse-ld=gold"
|
|
|
|
- compiler: clang
|
|
|
|
env: COMPILER=clang++ C_COMPILER=clang BUILD_TYPE=Debug
|
|
|
|
- compiler: clang
|
|
|
|
env: COMPILER=clang++ C_COMPILER=clang BUILD_TYPE=Release
|
|
|
|
# Clang w/ libc++
|
|
|
|
- compiler: clang
|
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
packages:
|
|
|
|
clang-3.8
|
|
|
|
env:
|
|
|
|
- COMPILER=clang++-3.8 C_COMPILER=clang-3.8 BUILD_TYPE=Debug
|
|
|
|
- LIBCXX_BUILD=1
|
|
|
|
- EXTRA_FLAGS="-stdlib=libc++"
|
|
|
|
- compiler: clang
|
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
packages:
|
|
|
|
clang-3.8
|
|
|
|
env:
|
|
|
|
- COMPILER=clang++-3.8 C_COMPILER=clang-3.8 BUILD_TYPE=Release
|
|
|
|
- LIBCXX_BUILD=1
|
|
|
|
- EXTRA_FLAGS="-stdlib=libc++"
|
|
|
|
# Clang w/ 32bit libc++
|
|
|
|
- compiler: clang
|
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
packages:
|
|
|
|
- clang-3.8
|
|
|
|
- g++-multilib
|
|
|
|
env:
|
|
|
|
- COMPILER=clang++-3.8 C_COMPILER=clang-3.8 BUILD_TYPE=Debug
|
|
|
|
- LIBCXX_BUILD=1
|
|
|
|
- BUILD_32_BITS=ON
|
|
|
|
- EXTRA_FLAGS="-stdlib=libc++ -m32"
|
|
|
|
# Clang w/ 32bit libc++
|
|
|
|
- compiler: clang
|
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
packages:
|
|
|
|
- clang-3.8
|
|
|
|
- g++-multilib
|
|
|
|
env:
|
|
|
|
- COMPILER=clang++-3.8 C_COMPILER=clang-3.8 BUILD_TYPE=Release
|
|
|
|
- LIBCXX_BUILD=1
|
|
|
|
- BUILD_32_BITS=ON
|
|
|
|
- EXTRA_FLAGS="-stdlib=libc++ -m32"
|
|
|
|
# Clang w/ libc++, ASAN, UBSAN
|
|
|
|
- compiler: clang
|
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
packages:
|
|
|
|
clang-3.8
|
|
|
|
env:
|
|
|
|
- COMPILER=clang++-3.8 C_COMPILER=clang-3.8 BUILD_TYPE=Debug
|
|
|
|
- LIBCXX_BUILD=1 LIBCXX_SANITIZER="Undefined;Address"
|
|
|
|
- EXTRA_FLAGS="-stdlib=libc++ -g -O2 -fno-omit-frame-pointer -fsanitize=undefined,address -fno-sanitize-recover=all"
|
|
|
|
- UBSAN_OPTIONS=print_stacktrace=1
|
|
|
|
# Clang w/ libc++ and MSAN
|
|
|
|
- compiler: clang
|
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
packages:
|
|
|
|
clang-3.8
|
|
|
|
env:
|
|
|
|
- COMPILER=clang++-3.8 C_COMPILER=clang-3.8 BUILD_TYPE=Debug
|
|
|
|
- LIBCXX_BUILD=1 LIBCXX_SANITIZER=MemoryWithOrigins
|
|
|
|
- EXTRA_FLAGS="-stdlib=libc++ -g -O2 -fno-omit-frame-pointer -fsanitize=memory -fsanitize-memory-track-origins"
|
|
|
|
# Clang w/ libc++ and MSAN
|
|
|
|
- compiler: clang
|
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
packages:
|
|
|
|
clang-3.8
|
|
|
|
env:
|
|
|
|
- COMPILER=clang++-3.8 C_COMPILER=clang-3.8 BUILD_TYPE=RelWithDebInfo
|
|
|
|
- LIBCXX_BUILD=1 LIBCXX_SANITIZER=Thread
|
|
|
|
- EXTRA_FLAGS="-stdlib=libc++ -g -O2 -fno-omit-frame-pointer -fsanitize=thread -fno-sanitize-recover=all"
|
|
|
|
|
|
|
|
- os: osx
|
|
|
|
osx_image: xcode8.3
|
|
|
|
compiler: clang
|
|
|
|
env:
|
2017-05-22 16:27:28 +00:00
|
|
|
- COMPILER=clang++ BUILD_TYPE=Debug
|
2017-05-22 16:26:05 +00:00
|
|
|
- os: osx
|
|
|
|
osx_image: xcode8.3
|
|
|
|
compiler: clang
|
|
|
|
env:
|
2017-05-22 16:27:28 +00:00
|
|
|
- COMPILER=clang++ BUILD_TYPE=Release
|
2017-11-30 23:21:32 +00:00
|
|
|
- os: osx
|
|
|
|
osx_image: xcode8.3
|
|
|
|
compiler: gcc
|
|
|
|
env:
|
|
|
|
- COMPILER=g++-7 C_COMPILER=gcc-7 BUILD_TYPE=Debug
|
2015-03-06 17:35:00 +00:00
|
|
|
|
2014-11-12 09:32:00 +00:00
|
|
|
before_script:
|
2017-05-22 16:26:05 +00:00
|
|
|
- if [ -z "$BUILD_32_BITS" ]; then
|
|
|
|
export BUILD_32_BITS=OFF && echo disabling 32 bit build;
|
|
|
|
fi
|
|
|
|
- if [ -n "${LIBCXX_BUILD}" ]; then
|
|
|
|
source .travis-libcxx-setup.sh;
|
|
|
|
fi
|
2017-12-07 22:20:59 +00:00
|
|
|
- mkdir -p build && cd build
|
2014-11-12 09:32:00 +00:00
|
|
|
|
2018-02-13 04:28:23 +00:00
|
|
|
before_install:
|
|
|
|
- if [ -n "${INSTALL_GCC6_FROM_PPA}" ]; then
|
|
|
|
sudo add-apt-repository -y "ppa:ubuntu-toolchain-r/test";
|
|
|
|
sudo apt-get update --option Acquire::Retries=100 --option Acquire::http::Timeout="60";
|
|
|
|
fi
|
|
|
|
|
2015-05-12 15:17:38 +00:00
|
|
|
install:
|
2018-02-13 04:28:23 +00:00
|
|
|
- if [ -n "${INSTALL_GCC6_FROM_PPA}" ]; then
|
|
|
|
sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes install g++-6;
|
|
|
|
fi
|
2015-05-12 15:17:38 +00:00
|
|
|
- if [ "${BUILD_TYPE}" == "Coverage" -a "${TRAVIS_OS_NAME}" == "linux" ]; then
|
|
|
|
PATH=~/.local/bin:${PATH};
|
|
|
|
pip install --user --upgrade pip;
|
|
|
|
pip install --user cpp-coveralls;
|
|
|
|
fi
|
2017-11-30 23:21:32 +00:00
|
|
|
- if [ "${C_COMPILER}" == "gcc-7" -a "${TRAVIS_OS_NAME}" == "osx" ]; then
|
|
|
|
rm -f /usr/local/include/c++;
|
|
|
|
brew update;
|
|
|
|
brew install gcc@7;
|
|
|
|
fi
|
2018-03-08 12:48:46 +00:00
|
|
|
- if [ "${TRAVIS_OS_NAME}" == "linux" ]; then
|
|
|
|
sudo apt-get update -qq;
|
|
|
|
sudo apt-get install -qq unzip;
|
|
|
|
wget https://github.com/bazelbuild/bazel/releases/download/0.10.1/bazel-0.10.1-installer-linux-x86_64.sh --output-document bazel-installer.sh;
|
|
|
|
sudo bash bazel-installer.sh;
|
|
|
|
fi
|
|
|
|
- if [ "${TRAVIS_OS_NAME}" == "osx" ]; then
|
|
|
|
curl -L -o bazel-installer.sh https://github.com/bazelbuild/bazel/releases/download/0.10.1/bazel-0.10.1-installer-darwin-x86_64.sh;
|
|
|
|
sudo bash bazel-installer.sh;
|
|
|
|
fi
|
2015-05-12 15:17:38 +00:00
|
|
|
|
2014-11-12 09:32:00 +00:00
|
|
|
script:
|
2017-12-13 23:26:47 +00:00
|
|
|
- cmake -DCMAKE_C_COMPILER=${C_COMPILER} -DCMAKE_CXX_COMPILER=${COMPILER} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_CXX_FLAGS="${EXTRA_FLAGS}" -DBENCHMARK_DOWNLOAD_DEPENDENCIES=ON -DBENCHMARK_BUILD_32_BITS=${BUILD_32_BITS} ..
|
2017-05-22 16:26:05 +00:00
|
|
|
- make
|
|
|
|
- ctest -C ${BUILD_TYPE} --output-on-failure
|
2018-03-08 12:48:46 +00:00
|
|
|
- bazel test -c dbg --define google_benchmark.have_regex=posix --announce_rc --verbose_failures --test_output=errors --keep_going //test/...
|
2015-05-12 15:17:38 +00:00
|
|
|
|
|
|
|
after_success:
|
|
|
|
- if [ "${BUILD_TYPE}" == "Coverage" -a "${TRAVIS_OS_NAME}" == "linux" ]; then
|
|
|
|
coveralls --include src --include include --gcov-options '\-lp' --root .. --build-root .;
|
|
|
|
fi
|