---
build_targets: &build_targets
  - "//..."
  # TODO: Look into broken targets in //toolchains
  - "-//toolchains/..."

build_targets_bzlmod: &build_targets_bzlmod
  - "//..."
  - "-//toolchains/..."
  # TODO(pcloudy): pkg_tar doesn't work with Bzlmod due to https://github.com/bazelbuild/bazel/issues/14259
  # Enable once the issue is fixed.
  - "-//distro/..."

buildifier:
  version: latest
  warnings: "all"
tasks:
  ubuntu2004:
    build_targets: *build_targets
  macos:
    build_targets: *build_targets
  windows:
    build_targets: *build_targets
  ubuntu2004_bzlmod:
    bazel: last_green
    platform: ubuntu2004
    build_flags:
      - "--config=bzlmod"
    build_targets: *build_targets_bzlmod
  macos_bzlmod:
    bazel: last_green
    platform: macos
    build_flags:
      - "--config=bzlmod"
    build_targets: *build_targets_bzlmod
  windows_bzlmod:
    bazel: last_green
    platform: windows
    build_flags:
      - "--config=bzlmod"
    build_targets: *build_targets_bzlmod

---
build_targets: &build_targets
  - "//..."
  # TODO: Look into broken targets in //toolchains
  - "-//toolchains/..."

build_targets_bzlmod: &build_targets_bzlmod
  - "//..."
  - "-//toolchains/..."
  # TODO(pcloudy): pkg_tar doesn't work with Bzlmod due to https://github.com/bazelbuild/bazel/issues/14259
  # Enable once the issue is fixed.
  - "-//distro/..."

buildifier:
  version: latest
  warnings: "all"
tasks:
  ubuntu2004:
    build_targets: *build_targets
  macos:
    build_targets: *build_targets
  windows:
    build_targets: *build_targets
  ubuntu2004_head:
    bazel: last_green
    platform: ubuntu2004
    build_targets: *build_targets
  macos_head:
    bazel: last_green
    platform: macos
    build_targets: *build_targets
  windows_head:
    bazel: last_green
    platform: windows
    build_targets: *build_targets
  ubuntu2004_bzlmod:
    bazel: last_green
    platform: ubuntu2004
    build_flags:
      - "--config=bzlmod"
    build_targets: *build_targets_bzlmod
  macos_bzlmod:
    bazel: last_green
    platform: macos
    build_flags:
      - "--config=bzlmod"
    build_targets: *build_targets_bzlmod
  windows_bzlmod:
    bazel: last_green
    platform: windows
    build_flags:
      - "--config=bzlmod"
    build_targets: *build_targets_bzlmod

Add Bazel@HEAD with no bzlmod tests.
Add Bazel@HEAD with no bzlmod tests.
