ci: run with ASan
This commit is contained in:
parent
ec3f24893d
commit
d5c7ee6ca6
|
|
@ -14,7 +14,10 @@ jobs:
|
|||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-20.04, macos-10.15]
|
||||
|
||||
use-asan: [YES, NO]
|
||||
env:
|
||||
# Expose to the build-*.sh in an environment variable
|
||||
USE_ASAN: ${{ matrix.use-asan }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
|
|
|
|||
|
|
@ -66,6 +66,13 @@ if (WIN32)
|
|||
endif (MSVC)
|
||||
endif (WIN32)
|
||||
|
||||
# Pass -DERICWTOOLS_ASAN=YES to enable for all targets
|
||||
if (ERICWTOOLS_ASAN)
|
||||
message(STATUS "Enabling ASan on all targets")
|
||||
add_compile_options(-fsanitize=address)
|
||||
add_link_options(-fsanitize=address)
|
||||
endif()
|
||||
|
||||
# 10.9: minimum version that supports unordered_map
|
||||
# 10.14: required by tbb 2021.3.0 (due to use of alignas)
|
||||
# 10.15: required by std::filesytstem
|
||||
|
|
|
|||
|
|
@ -20,7 +20,12 @@ tar xf tbb.tgz
|
|||
EMBREE_CMAKE_DIR="$(pwd)/embree-3.13.1.x86_64.linux/lib/cmake/embree-3.13.1"
|
||||
TBB_CMAKE_DIR="$(pwd)/oneapi-tbb-2021.3.0/lib/cmake"
|
||||
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$EMBREE_CMAKE_DIR;$TBB_CMAKE_DIR"
|
||||
# check USE_ASAN environment variable (see cmake.yml)
|
||||
if [ "$USE_ASAN" == "YES" ]; then
|
||||
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_PREFIX_PATH="$EMBREE_CMAKE_DIR;$TBB_CMAKE_DIR" -DERICWTOOLS_ASAN=YES
|
||||
else
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$EMBREE_CMAKE_DIR;$TBB_CMAKE_DIR"
|
||||
fi
|
||||
make -j8 VERBOSE=1 || exit 1
|
||||
make -j8 VERBOSE=1 testlight || exit 1
|
||||
make -j8 VERBOSE=1 testqbsp || exit 1
|
||||
|
|
|
|||
|
|
@ -32,7 +32,12 @@ tar xf "$TBB_TGZ_NAME"
|
|||
|
||||
EMBREE_CMAKE_DIR="$(pwd)/$EMBREE_DIR_NAME/lib/cmake/embree-3.13.0"
|
||||
TBB_CMAKE_DIR="$(pwd)/${TBB_DIR_NAME}/lib/cmake"
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$EMBREE_CMAKE_DIR;$TBB_CMAKE_DIR"
|
||||
# check USE_ASAN environment variable (see cmake.yml)
|
||||
if [ "$USE_ASAN" == "YES" ]; then
|
||||
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_PREFIX_PATH="$EMBREE_CMAKE_DIR;$TBB_CMAKE_DIR" -DERICWTOOLS_ASAN=YES
|
||||
else
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$EMBREE_CMAKE_DIR;$TBB_CMAKE_DIR"
|
||||
fi
|
||||
make -j8 || exit 1
|
||||
make -j8 testlight || exit 1
|
||||
make -j8 testqbsp || exit 1
|
||||
|
|
|
|||
Loading…
Reference in New Issue