name: Ubuntu 22.04 Sanitized CI (GCC 12)

on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - master

jobs:
  ubuntu-build:
    runs-on: ubuntu-22.04
    strategy:
      matrix:
        include:
          - {shared: ON}
          - {shared: OFF}
    steps:
      - uses: actions/checkout@v6
      - name: Use cmake
        run: |
          mkdir build &&
          cd build &&
          CXX=g++-12 cmake -DCMAKE_CXX_FLAGS=-Werror -DSIMDUTF_ALWAYS_INCLUDE_FALLBACK=ON -DSIMDUTF_BENCHMARKS=OFF -DBUILD_SHARED_LIBS=${{matrix.shared}} .. -DSIMDUTF_FAST_TESTS=On &&
          cmake --build .   &&
          ctest -j --output-on-failure
