matrix:
  platform: ["ubuntu2204", "ubuntu2404"]
  bazel: [7.x, 8.x, 9.x]

tasks:
  verify_targets:
    name: "Verify build targets"
    platform: ${{ platform }}
    bazel: ${{ bazel }}
    build_flags:
      # Required for Bazel 7, which defaults to C++14. Can be dropped once
      # Bazel 7 support is removed.
      - "--cxxopt=-std=c++17"
      - "--host_cxxopt=-std=c++17"
      # In Bazel 9, native C++ rules are no longer autoloaded by default.
      # Some gRPC bundled sources still use `native.cc_library` and
      # `native.cc_binary`. Restore the autoload until a fixed gRPC BCR
      # release is available. No-op on Bazel 7.
      - "--incompatible_autoload_externally=+cc_library,+cc_binary"
    build_targets:
      - "@p4runtime//..."
