Skip to content

Use the cache to avoid writing the disabling file each time #214

Use the cache to avoid writing the disabling file each time

Use the cache to avoid writing the disabling file each time #214

Workflow file for this run

name: run address sanitizer
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
Matrix-build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.12] # Could add more here, but it just makes the build matrix bigger
steps:
- name: checkout
uses: actions/checkout@v4
- name: checkout submodules
run: git submodule update --init --recursive
- name: mkdir
run: mkdir build && cd build
- name: cmake config
run: cd build && CXX=clang++ cmake .. -DCMAKE_BUILD_TYPE=Asan -DTEQP_ASAN=ON -DTEQP_SNIPPETS=ON -DTEQP_TEQPC=OFF
- name: build all Catch tests
run: cmake --build build --target catch_tests --config Asan
- name: run all the compiled Catch tests with address sanitizer
run: cd build && ASAN_OPTIONS=detect_stack_use_after_return=1:verbosity=1 ASAN_SYMBOLIZER_PATH=`brew --prefix`/opt/llvm/bin/llvm-symbolizer ./catch_tests --benchmark-samples 1
# ASAN CLI docs here: https://github.com/google/sanitizers/wiki/AddressSanitizerFlags