matrix:
  platform:
  - ubuntu2004
  - macos
  # Disabled due to https://github.com/bazel-contrib/rules_foreign_cc/issues/1305.
  # rules_foreign_cc is transitively pulled in through libzmq.
  # - macos_arm64
  bazel:
  - 8.x
  - 7.x
tasks:
  verify_targets:
    name: Verify build targets
    platform: ${{ platform }}
    bazel: ${{ bazel }}
    build_flags:
    - '--cxxopt=-std=c++17'
    - '--host_cxxopt=-std=c++17'
    build_targets:
    - '@gz-transport'
    - '@gz-transport//:topic'
    - '@gz-transport//:service'
    - '@gz-transport//log'
    - '@gz-transport//parameters'
# Override https://github.com/bazelbuild/bazel-central-registry/blob/main/incompatible_flags.yml
incompatible_flags:
  # https://github.com/bazelbuild/bazel/issues/12933
  "--incompatible_config_setting_private_default_visibility":
    - 6.x
    - 7.x
    - 8.x
  # https://github.com/bazelbuild/bazel/issues/17032
  "--incompatible_disable_starlark_host_transitions":
    - 6.x
    - 7.x
    - 8.x
  # https://github.com/bazelbuild/bazel/issues/22080
  "--incompatible_disable_native_repo_rules":
    - 7.x
    - 8.x
  # This check is disabled on bazel 8.x because a non-compliant version of
  # rules_foreign_cc is pulled in transitively through libzmq.
  "--incompatible_autoload_externally=":
    - 7.x
    # - 8.x
  # https://github.com/bazelbuild/bazel/issues/25755
  "--incompatible_disable_autoloads_in_main_repo":
    - last_green
    - rolling
