bcr_test_module:
  module_path: test
  matrix:
    unix_platform:
      - debian11
      - macos
      - macos_arm64
      - ubuntu2004
      - ubuntu2204
      - ubuntu2404
    bazel: [7.x, 8.x, rolling]
  tasks:
    verify_targets_no_transport_unix:
      name: Build and test with no HTTP transport on Unix platforms
      platform: ${{ unix_platform }}
      bazel: ${{ bazel }}
      build_targets:
        - "@azure-core-cpp//:azure_core_cpp"
      build_flags:
        - "--@azure-core-cpp//:build_transport_curl=false"
        - "--@azure-core-cpp//:build_transport_winhttp=false"
      test_targets:
        - "@azure-core-cpp//:azure_core_cpp_test"
      test_flags:
        - "--@azure-core-cpp//:build_transport_curl=false"
        - "--@azure-core-cpp//:build_transport_winhttp=false"
    verify_targets_curl_transport_unix:
      name: Build and test with Curl as HTTP transport on Unix platforms
      platform: ${{ unix_platform }}
      bazel: ${{ bazel }}
      build_targets:
        - "@azure-core-cpp//:azure_core_cpp"
      build_flags:
        - "--@curl//:ssl_lib=openssl"
        - "--@azure-core-cpp//:build_transport_curl=true"
        - "--@azure-core-cpp//:build_transport_winhttp=false"
      test_targets:
        - "@azure-core-cpp//:azure_core_cpp_test"
      test_flags:
        - "--@curl//:ssl_lib=openssl"
        - "--@azure-core-cpp//:build_transport_curl=true"
        - "--@azure-core-cpp//:build_transport_winhttp=false"
    verify_targets_no_transport_windows:
      name: Build and test with no HTTP transport on Windows
      platform: windows
      bazel: ${{ bazel }}
      build_targets:
        - "@azure-core-cpp//:azure_core_cpp"
      build_flags:
        - "--@azure-core-cpp//:build_transport_curl=false"
        - "--@azure-core-cpp//:build_transport_winhttp=false"
      test_targets:
        - "@azure-core-cpp//:azure_core_cpp_test"
      test_flags:
        - "--@azure-core-cpp//:build_transport_curl=false"
        - "--@azure-core-cpp//:build_transport_winhttp=false"
    # Add this once wil is in the BCR:
    #   https://github.com/bazelbuild/bazel-central-registry/issues/3807
    # verify_targets_winhttp_transport_windows:
    #   ...
