name: macos-latest Sanitized CI

on:
  push:

jobs:
  macos-build:
    runs-on: macos-latest
    strategy:
      matrix:
        include:
          - {shared: ON}
          - {shared: OFF}
    steps:
      - uses: actions/checkout@v6
      - name: Use cmake
        run: |
          mkdir build
          cd build
          cmake -DCMAKE_CXX_FLAGS=-Werror -DSIMDUTF_FAST_TESTS=On -DCMAKE_CXX_STANDARD=17 -DCMAKE_INSTALL_PREFIX:PATH=destination -DBUILD_SHARED_LIBS=${{matrix.shared}} ..   -DSIMDUTF_BENCHMARKS=OFF -DSIMDUTF_TOOL_TESTS=ON
          cmake --build . --parallel
          ctest --output-on-failure --parallel
          cmake --install .
          cd ../tests/installation_tests/find
          mkdir build
          cd build
          cmake -DCMAKE_CXX_STANDARD=17 -DCMAKE_INSTALL_PREFIX:PATH=../../../build/destination ..
          cmake --build . --parallel
          ./repro
