Skip to content

Sanitizer

Sanitizer #64

Workflow file for this run

name: Sanitizer
on:
schedule:
- cron: "0 6 * * SAT"
workflow_dispatch:
concurrency:
group: sanitizer-${{ github.ref }}
cancel-in-progress: true
env:
SHARG_NO_VERSION_CHECK: 1
TZ: Europe/Berlin
ASAN_OPTIONS: strict_string_checks=1:detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1
TSAN_OPTIONS: ignore_noninstrumented_modules=1
UBSAN_OPTIONS: print_stacktrace=1
defaults:
run:
shell: bash -Eeuxo pipefail {0}
jobs:
build:
name: ${{ matrix.name }} ${{ matrix.build_type }}
runs-on: ubuntu-22.04
timeout-minutes: 240
if: github.repository_owner == 'seqan' || github.event_name == 'workflow_dispatch'
strategy:
fail-fast: false
matrix:
name: [AddressSanitizer, ThreadSanitizer, UndefinedBehaviorSanitizer]
build_type: [Release, Debug]
include:
- name: "AddressSanitizer"
compiler: gcc-13
cxx_flags: "-std=c++23 -fno-omit-frame-pointer -fsanitize=address -Wno-maybe-uninitialized -Wno-interference-size"
- name: "ThreadSanitizer"
compiler: clang-17
cxx_flags: "-std=c++20 -fno-omit-frame-pointer -fsanitize=thread"
- name: "UndefinedBehaviorSanitizer"
compiler: gcc-13
cxx_flags: "-std=c++23 -fno-omit-frame-pointer -fsanitize=undefined -Wno-interference-size"
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: raptor
fetch-depth: 1
submodules: true
- name: Setup compiler
uses: seqan/actions/setup-compiler@main
with:
compiler: ${{ matrix.compiler }}
- name: Install OpenMP
if: contains(matrix.compiler, 'clang')
run: |
install libomp-17-dev
echo "OMP_TOOL_LIBRARIES=/usr/lib/llvm-17/lib/libarcher.so" >> "$GITHUB_ENV"
- name: Configure OS
run: |
sudo bash -c "echo 0 > /proc/sys/vm/overcommit_memory"
sudo bash -c "echo 2 >/proc/sys/kernel/randomize_va_space"
- name: Install CMake
uses: seqan/actions/setup-cmake@main
with:
cmake: 3.21.7
- name: Configure tests
run: |
mkdir build
cd build
cmake ../raptor/test/unit -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DCMAKE_CXX_FLAGS="${{ matrix.cxx_flags }}"
make -j2 gtest_main
- name: Build tests
run: |
cd build
make -k -j2
- name: Run tests
run: |
cd build
ctest . -j2 --output-on-failure