name: VS18-CI

on: [push, pull_request]

jobs:
  ci:
    name: windows-vs18
    runs-on: windows-latest
    strategy:
      fail-fast: false
      matrix:
        include:
          - {gen: Visual Studio 18 2026, arch: x64, shared: ON}
          - {gen: Visual Studio 18 2026, arch: x64, shared: OFF}
          - {gen: Visual Studio 18 2026, arch: Win32, shared: ON}
          - {gen: Visual Studio 18 2026, arch: Win32, shared: OFF}
    steps:
    - name: checkout
      uses: actions/checkout@v6
    - name: Configure
      run: |
        cmake -G "${{matrix.gen}}" -A ${{matrix.arch}} -DSIMDUTF_ALWAYS_INCLUDE_FALLBACK=ON -DSIMDUTF_BENCHMARKS=ON -DBUILD_SHARED_LIBS=${{matrix.shared}} -DSIMDUTF_FAST_TESTS=On -B build
    - name: Build Debug
      run: cmake --build build --config Debug --verbose --parallel
    - name: Build Release
      run: cmake --build build --config Release --verbose --parallel
    - name: Run Release tests
      run: |
        cd build
        ctest -C Release   --output-on-failure --parallel
    - name: Run Debug tests
      run: |
        cd build
        ctest -C Debug  --output-on-failure  -E basic_fuzzer --parallel
    - name: Install
      run: |
        cmake --install build --config Release
    - name: Test Installation
      run: |
        cmake -G "${{matrix.gen}}" -A ${{matrix.arch}}  -B build_install_test tests/installation_tests/find
        cmake --build build_install_test --config Release --parallel
