matrix:
  platform: ["debian11", "macos", "ubuntu2004"]
  bazel: [6.x, 7.x]

tasks:
  verify_targets:
    name: "Verify build targets"
    platform: ${{ platform }}
    bazel: ${{ bazel }}
    build_flags:
    - '--host_cxxopt=-std=c++14'
    - '--cxxopt=-std=c++14'
    - '--host_copt=-Wno-deprecated-declarations'
    - '--copt=-Wno-deprecated-declarations'
    build_targets:
    - '@protobuf//:protobuf'
    - '@protobuf//:protobuf_lite'
    - '@protobuf//:protoc'
    - '@protobuf//:test_messages_proto2_cc_proto'
    - '@protobuf//:test_messages_proto3_cc_proto'

  verify_targets_windows:
    name: "Verify build targets"
    platform: windows
    bazel: ${{ bazel }}
    build_flags:
    - '--host_cxxopt=-std=c++14'
    - '--cxxopt=-std=c++14'
    build_targets:
    - '@protobuf//:protobuf'
    - '@protobuf//:protobuf_lite'
    - '@protobuf//:protoc'
    - '@protobuf//:test_messages_proto2_cc_proto'
    - '@protobuf//:test_messages_proto3_cc_proto'

bcr_test_module:
  module_path: "examples"
  matrix:
    platform: ["debian11", "macos", "ubuntu2004"]
    bazel: [6.x, 7.x]
  tasks:
    run_test_module:
      name: "Run test module"
      platform: ${{ platform }}
      bazel: ${{ bazel }}
      build_flags:
      - '--host_cxxopt=-std=c++14'
      - '--cxxopt=-std=c++14'
      - '--host_copt=-Wno-deprecated-declarations'
      - '--copt=-Wno-deprecated-declarations'
      build_targets:
      - "//..."

bcr_test_module_windows:
  module_path: "examples"
  matrix:
    bazel: [6.x, 7.x]
  tasks:
    run_test_module:
      name: "Run test module"
      platform: windows
      bazel: ${{ bazel }}
      build_flags:
      - '--host_cxxopt=-std=c++14'
      - '--cxxopt=-std=c++14'
      build_targets:
      - "//..."
