# Take default incompatible flags from incompatible_flags.yml except with broken flags disabled
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
  # https://github.com/bazelbuild/bazel/issues/23043
  "--incompatible_autoload_externally=":
    - 7.x
    # - 8.x # DISABLED: Not supported by dependencies of sv-lang - TODO: revisit this
  # https://github.com/bazelbuild/bazel/issues/23144
  # This flag will be flipped to false
  # TODO: enable this after fixing https://github.com/bazelbuild/bazel/issues/23144#issuecomment-2793072689
  # "--noincompatible_enable_deprecated_label_apis":
  #   - 7.x
  #   - 8.x
  # https://github.com/bazelbuild/bazel/issues/25755
  "--incompatible_disable_autoloads_in_main_repo":
    - last_green
    - rolling
  # https://github.com/bazelbuild/bazel/issues/7026
  "--incompatible_strict_action_env":
    - 6.x
    - 7.x
    - 8.x


bcr_test_module:
  module_path: ""
  matrix:
    platform:
      # Requires C++20 supported compiler (GCC > 11, clang > 17)
      - ubuntu2204
      - ubuntu2404
      - macos_arm64
    bazel: ["7.x", "8.x"]

  tasks:
    verify_targets:
      name: "Run test module"
      platform: ${{ platform }}
      bazel: ${{ bazel }}
      build_flags:
        - '--cxxopt=-std=c++20'
      test_flags:
        - '--cxxopt=-std=c++20'
      build_targets:
      - "//..."
      test_targets:
      - "//..."
