Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Don't merge] Add cron jobs for sanitizers and libc++ debug mode #1624

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,27 @@ jobs:
- COMPILER="ccache g++"
script: echo "This is coverity build. No need for tests."

- stage: Extended checks
env:
- NAME="sanitized build"
if: type = cron
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- libc++-dev
os: linux
compiler: clang
cache: ccache
install:
- ccache -z
- ccache --max-size=1G
- cmake -H. -Bbuild -DCMAKE_BUILD_TYPE=Sanitized -DCMAKE_CXX_COMPILER="clang++" -DCMAKE_CXX_FLAGS="-Wno-error=unused-command-line-argument -stdlib=libc++"
- cmake --build build -- -j4
script: (cd build; ctest -j2 -V -L CORE)


allow_failures:
- <<: *formatting-stage
- <<: *linter-stage
Expand Down
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
cmake_minimum_required(VERSION 3.2)

include(cmake/set_up_configs.cmake)

find_program(CCACHE_PROGRAM ccache)
if(CCACHE_PROGRAM)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
Expand Down
10 changes: 10 additions & 0 deletions cmake/set_up_configs.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
if(NOT CONFIGURATIONS_HAVE_BEEN_SET_UP)
set(CONFIGURATIONS_HAVE_BEEN_SET_UP true)
set(build_types_string "Debug;Release;RelWithDebInfo;Sanitized;LibCPPDebug")
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY HELPSTRING "Choose the type of build")
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "${build_types_string}")
set(CMAKE_CONFIGURATION_TYPES "${build_types_string}" CACHE STRING "" FORCE)

set(CMAKE_CXX_FLAGS_SANITIZED "-fsanitize=address,undefined")
set(CMAKE_CXX_FLAGS_LIBCPPDEBUG "-D_LIBCPP_DEBUG=1 -D_GLIBCXX_DEBUG")
endif()