matrix:
  platform:
    - ubuntu2404
    - macos
    - macos_arm64
  bazel: [7.x, 8.x, rolling]
tasks:
  verify_targets:
    platform: ${{ platform }}
    bazel: ${{ bazel }}
    build_flags:
      - "--cxxopt=-std=c++17"
      - "--host_cxxopt=-std=c++17"
    build_targets:
      - "@s2geometry//:s2"
    test_flags:
      - "--cxxopt=-std=c++17"
      - "--host_cxxopt=-std=c++17"
    test_targets:
      - "@s2geometry//:all"

  verify_targets_openssl:
    platform: ${{ platform }}
    bazel: ${{ bazel }}
    build_flags:
      - "--cxxopt=-std=c++17"
      - "--host_cxxopt=-std=c++17"
      - "--@s2geometry//:use_openssl=true"
    build_targets:
      - "@s2geometry//:s2"
    test_flags:
      - "--cxxopt=-std=c++17"
      - "--host_cxxopt=-std=c++17"
      - "--@s2geometry//:use_openssl=true"
    test_targets:
      - "@s2geometry//:all"
