container:
  image: debian:trixie-slim

task:
  name: Sanitizers
  skip: $BRANCH == "master" || ($BRANCH != 'ci/cirrus' && $BRANCH =~ '^ci/.+')
  env:
    CC: clang-17
    CXX: clang++-17
    CFLAGS: -Wextra -Werror -march=native
    CXXFLAGS: -Wextra -Werror -march=native
  system_info_script:
  - cat /proc/cpuinfo
  - cat /proc/meminfo
  install_dependencies_script:
    - apt-get update
    - apt-get install -y ninja-build ninja-build pipx python3-setuptools python3-wheel gcovr clang-17
    - pipx install meson==0.64.0
  configure_script:
    - /root/.local/bin/meson setup build -Db_coverage=true -Db_sanitize=address,undefined -Db_lundef=false
  build_script:
    - ninja -C build -v -j 3
  test_script:
    - ninja -C build -v test
