matrix:
  unix_platform:
    - debian10
    - debian11
    - macos
    - macos_arm64
    - ubuntu2004
    - ubuntu2204
    - ubuntu2404
  unix_platform_cpp20:
    - macos
    - macos_arm64
    - ubuntu2404
  windows_platform:
    - windows
  bazel: [7.x, 8.x, latest]

tasks:
  unix_test_fmt_header:
    name: Verify unix build targets (fmt, header-only)
    platform: ${{ unix_platform }}
    bazel: ${{ bazel }}
    build_targets:
      - "@spdlog//:spdlog"
    build_flags:
      - "--@spdlog//:header_only=true"
      - "--@spdlog//:use_fmt=true"

  unix_test_fmt_compiled:
    name: Verify unix build targets (fmt, compiled)
    platform: ${{ unix_platform }}
    bazel: ${{ bazel }}
    build_targets:
      - "@spdlog//:spdlog"
    build_flags:
      - "--@spdlog//:header_only=false"
      - "--@spdlog//:use_fmt=true"

  unix_test_std_format_header:
    name: Verify unix build targets (std::format, header-only)
    platform: ${{ unix_platform_cpp20 }}
    bazel: ${{ bazel }}
    build_targets:
      - "@spdlog//:spdlog"
    build_flags:
      - "--@spdlog//:header_only=true"
      - "--@spdlog//:use_fmt=false"
      - "--cxxopt=-std=c++20"

  unix_test_std_format_compiled:
    name: Verify unix build targets (std::format, compiled)
    platform: ${{ unix_platform_cpp20 }}
    bazel: ${{ bazel }}
    build_targets:
      - "@spdlog//:spdlog"
    build_flags:
      - "--@spdlog//:header_only=false"
      - "--@spdlog//:use_fmt=false"
      - "--cxxopt=-std=c++20"

  windows_test_fmt_header:
    name: Verify windows build targets (fmt, header-only)
    platform: ${{ windows_platform }}
    bazel: ${{ bazel }}
    build_targets:
      - "@spdlog//:spdlog"
    build_flags:
      - "--@spdlog//:header_only=true"
      - "--@spdlog//:use_fmt=true"
      - "--cxxopt=/utf-8"

  windows_test_fmt_compiled:
    name: Verify windows build targets (fmt, compiled)
    platform: ${{ windows_platform }}
    bazel: ${{ bazel }}
    build_targets:
      - "@spdlog//:spdlog"
    build_flags:
      - "--@spdlog//:header_only=false"
      - "--@spdlog//:use_fmt=true"
      - "--cxxopt=/utf-8"

  windows_test_std_format_header:
    name: Verify windows build targets (std::format, header-only)
    platform: ${{ windows_platform }}
    bazel: ${{ bazel }}
    build_targets:
      - "@spdlog//:spdlog"
    build_flags:
      - "--@spdlog//:header_only=true"
      - "--@spdlog//:use_fmt=false"
      - "--cxxopt=/std:c++20"
      - "--cxxopt=/utf-8"

  windows_test_std_format_compiled:
    name: Verify windows build targets (std::format, compiled)
    platform: ${{ windows_platform }}
    bazel: ${{ bazel }}
    build_targets:
      - "@spdlog//:spdlog"
    build_flags:
      - "--@spdlog//:header_only=false"
      - "--@spdlog//:use_fmt=false"
      - "--cxxopt=/std:c++20"
      - "--cxxopt=/utf-8"

