12 env: COMPILER=g++ C_COMPILER=gcc BUILD_TYPE=Coverage
39 - INSTALL_GCC6_FROM_PPA=1
40 - COMPILER=g++-6 C_COMPILER=gcc-6 BUILD_TYPE=Debug
42 - EXTRA_FLAGS="-fno-omit-frame-pointer -g -O2 -fsanitize=undefined,address -fuse-ld=gold"
51 - INSTALL_GCC6_FROM_PPA=1
52 - COMPILER=clang++-3.8 C_COMPILER=clang-3.8 BUILD_TYPE=Debug
54 - EXTRA_CXX_FLAGS="-stdlib=libc++"
62 - INSTALL_GCC6_FROM_PPA=1
63 - COMPILER=clang++-3.8 C_COMPILER=clang-3.8 BUILD_TYPE=Release
65 - EXTRA_CXX_FLAGS="-stdlib=libc++"
66 # Clang w/ 32bit libc++
76 - INSTALL_GCC6_FROM_PPA=1
77 - COMPILER=clang++-3.8 C_COMPILER=clang-3.8 BUILD_TYPE=Debug
81 - EXTRA_CXX_FLAGS="-stdlib=libc++"
82 # Clang w/ 32bit libc++
92 - INSTALL_GCC6_FROM_PPA=1
93 - COMPILER=clang++-3.8 C_COMPILER=clang-3.8 BUILD_TYPE=Release
97 - EXTRA_CXX_FLAGS="-stdlib=libc++"
98 # Clang w/ libc++, ASAN, UBSAN
106 - INSTALL_GCC6_FROM_PPA=1
107 - COMPILER=clang++-3.8 C_COMPILER=clang-3.8 BUILD_TYPE=Debug
108 - LIBCXX_BUILD=1 LIBCXX_SANITIZER="Undefined;Address"
110 - EXTRA_FLAGS="-g -O2 -fno-omit-frame-pointer -fsanitize=undefined,address -fno-sanitize-recover=all"
111 - EXTRA_CXX_FLAGS="-stdlib=libc++"
112 - UBSAN_OPTIONS=print_stacktrace=1
113 # Clang w/ libc++ and MSAN
121 - INSTALL_GCC6_FROM_PPA=1
122 - COMPILER=clang++-3.8 C_COMPILER=clang-3.8 BUILD_TYPE=Debug
123 - LIBCXX_BUILD=1 LIBCXX_SANITIZER=MemoryWithOrigins
125 - EXTRA_FLAGS="-g -O2 -fno-omit-frame-pointer -fsanitize=memory -fsanitize-memory-track-origins"
126 - EXTRA_CXX_FLAGS="-stdlib=libc++"
127 # Clang w/ libc++ and MSAN
135 - INSTALL_GCC6_FROM_PPA=1
136 - COMPILER=clang++-3.8 C_COMPILER=clang-3.8 BUILD_TYPE=RelWithDebInfo
137 - LIBCXX_BUILD=1 LIBCXX_SANITIZER=Thread
139 - EXTRA_FLAGS="-g -O2 -fno-omit-frame-pointer -fsanitize=thread -fno-sanitize-recover=all"
140 - EXTRA_CXX_FLAGS="-stdlib=libc++"
151 - if [ -n "${LIBCXX_BUILD}" ]; then
152 source .libcxx-setup.sh;
154 - if [ -n "${ENABLE_SANITIZER}" ]; then
155 export EXTRA_OPTIONS="-DBENCHMARK_ENABLE_ASSEMBLY_TESTS=OFF";
157 export EXTRA_OPTIONS="";
159 - mkdir -p build && cd build
162 - if [ -z "$BUILD_32_BITS" ]; then
163 export BUILD_32_BITS=OFF && echo disabling 32 bit build;
165 - if [ -n "${INSTALL_GCC6_FROM_PPA}" ]; then
166 sudo add-apt-repository -y "ppa:ubuntu-toolchain-r/test";
167 sudo apt-get update --option Acquire::Retries=100 --option Acquire::http::Timeout="60";
171 - if [ -n "${INSTALL_GCC6_FROM_PPA}" ]; then
172 travis_wait sudo -E apt-get -yq --no-install-suggests --no-install-recommends install g++-6;
174 - if [ "${TRAVIS_OS_NAME}" == "linux" -a "${BUILD_32_BITS}" == "OFF" ]; then
175 travis_wait sudo -E apt-get -y --no-install-suggests --no-install-recommends install llvm-3.9-tools;
176 sudo cp /usr/lib/llvm-3.9/bin/FileCheck /usr/local/bin/;
178 - if [ "${BUILD_TYPE}" == "Coverage" -a "${TRAVIS_OS_NAME}" == "linux" ]; then
179 PATH=~/.local/bin:${PATH};
180 pip install --user --upgrade pip;
181 travis_wait pip install --user cpp-coveralls;
183 - if [ "${C_COMPILER}" == "gcc-7" -a "${TRAVIS_OS_NAME}" == "osx" ]; then
184 rm -f /usr/local/include/c++;
186 travis_wait brew install gcc@7;
188 - if [ "${TRAVIS_OS_NAME}" == "linux" ]; then
189 sudo apt-get update -qq;
190 sudo apt-get install -qq unzip cmake3;
191 wget https://github.com/bazelbuild/bazel/releases/download/3.2.0/bazel-3.2.0-installer-linux-x86_64.sh --output-document bazel-installer.sh;
192 travis_wait sudo bash bazel-installer.sh;
194 - if [ "${TRAVIS_OS_NAME}" == "osx" ]; then
195 curl -L -o bazel-installer.sh https://github.com/bazelbuild/bazel/releases/download/3.2.0/bazel-3.2.0-installer-darwin-x86_64.sh;
196 travis_wait sudo bash bazel-installer.sh;
200 - cmake -DCMAKE_C_COMPILER=${C_COMPILER} -DCMAKE_CXX_COMPILER=${COMPILER} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_C_FLAGS="${EXTRA_FLAGS}" -DCMAKE_CXX_FLAGS="${EXTRA_FLAGS} ${EXTRA_CXX_FLAGS}" -DBENCHMARK_DOWNLOAD_DEPENDENCIES=ON -DBENCHMARK_BUILD_32_BITS=${BUILD_32_BITS} ${EXTRA_OPTIONS} ..
202 - ctest -C ${BUILD_TYPE} --output-on-failure
203 - bazel test -c dbg --define google_benchmark.have_regex=posix --announce_rc --verbose_failures --test_output=errors --keep_going //test/...
206 - if [ "${BUILD_TYPE}" == "Coverage" -a "${TRAVIS_OS_NAME}" == "linux" ]; then
207 coveralls --include src --include include --gcov-options '\-lp' --root .. --build-root .;