# Defines buckets on cr-buildbucket.appspot.com, used to schedule builds
# on buildbot. In particular, CQ uses some of these buckets to schedule tryjobs.
#
# See http://luci-config.appspot.com/schemas/projects:cr-buildbucket.cfg for
# schema of this file and documentation.
#
# Please keep this list sorted by bucket name.

acl_sets {
  name: "ci"
  acls {
    role: READER
    group: "all"
  }
  acls {
    role: SCHEDULER
    identity: "luci-scheduler@appspot.gserviceaccount.com"
  }
  acls {
    role: SCHEDULER
    identity: "angle-ci-builder@chops-service-accounts.iam.gserviceaccount.com"
  }
}

acl_sets {
  name: "try"
  acls {
    role: READER
    group: "all"
  }
  acls {
    role: SCHEDULER
    group: "project-angle-tryjob-access"
  }
  acls {
    role: SCHEDULER
    group: "service-account-cq"
  }
}

builder_mixins {
  name: "linux"
  dimensions: "os:Ubuntu-14.04"
}

builder_mixins {
  name: "win"
  dimensions: "os:Windows"
}

builder_mixins {
  name: "mac"
  dimensions: "os:Mac"
}

builder_mixins {
  name: "clang"
  recipe {
    properties_j: "clang:true"
  }
}

builder_mixins {
  name: "no_clang"
  recipe {
    properties_j: "clang:false"
  }
}

builder_mixins {
  name: "rel"
  recipe {
    properties_j: "debug:false"
  }
}

builder_mixins {
  name: "dbg"
  recipe {
    properties_j: "debug:true"
  }
}

builder_mixins {
  name: "x86"
  recipe {
    properties: "target_cpu:x86"
  }
}

builder_mixins {
  name: "x64"
  recipe {
    properties: "target_cpu:x64"
  }
}

buckets {
  name: "luci.angle.ci"
  acl_sets: "ci"

  swarming {
    hostname: "chromium-swarm.appspot.com"

    builder_defaults {
      recipe: {
        cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build"
        cipd_version: "refs/heads/master"
        name: "angle"
      }
      build_numbers: YES
      service_account: "angle-ci-builder@chops-service-accounts.iam.gserviceaccount.com"

      caches {
        path: "win_toolchain"
        name: "win_toolchain"
      }
    }

    builders {
      name: "linux-clang-dbg"
      mixins: "linux"
      mixins: "clang"
      mixins: "dbg"
    }

    builders {
      name: "linux-clang-rel"
      mixins: "linux"
      mixins: "clang"
      mixins: "rel"
    }

    builders {
      name: "linux-gcc-dbg"
      mixins: "linux"
      mixins: "no_clang"
      mixins: "dbg"
    }

    builders {
      name: "linux-gcc-rel"
      mixins: "linux"
      mixins: "no_clang"
      mixins: "rel"
    }

    builders {
      name: "mac-dbg"
      mixins: "mac"
      mixins: "dbg"
    }

    builders {
      name: "mac-rel"
      mixins: "mac"
      mixins: "rel"
    }

    builders {
      name: "win-msvc-x86-dbg"
      mixins: "win"
      mixins: "no_clang"
      mixins: "x86"
      mixins: "dbg"
    }

    builders {
      name: "win-msvc-x86-rel"
      mixins: "win"
      mixins: "no_clang"
      mixins: "x86"
      mixins: "rel"
    }

    builders {
      name: "win-msvc-x64-dbg"
      mixins: "win"
      mixins: "no_clang"
      mixins: "x64"
      mixins: "dbg"
    }

    builders {
      name: "win-msvc-x64-rel"
      mixins: "win"
      mixins: "no_clang"
      mixins: "x64"
      mixins: "rel"
    }

    builders {
      name: "win-clang-x86-dbg"
      mixins: "win"
      mixins: "clang"
      mixins: "x86"
      mixins: "dbg"
    }

    builders {
      name: "win-clang-x86-rel"
      mixins: "win"
      mixins: "clang"
      mixins: "x86"
      mixins: "rel"
    }

    builders {
      name: "win-clang-x64-dbg"
      mixins: "win"
      mixins: "clang"
      mixins: "x64"
      mixins: "dbg"
    }

    builders {
      name: "win-clang-x64-rel"
      mixins: "win"
      mixins: "clang"
      mixins: "x64"
      mixins: "rel"
    }
  }
}

# Note that many angle trybots are defined in the luci.chromium.try bucket
# over in chromium.
buckets {
  name: "luci.angle.try"
  acl_sets: "try"

  swarming {
    hostname: "chromium-swarm.appspot.com"

    builder_defaults {
      recipe: {
        cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build"
        cipd_version: "refs/heads/master"
        name: "angle"
        properties_j: "$depot_tools/bot_update:{\"apply_patch_on_gclient\":true}"
      }
      build_numbers: YES
      service_account: "angle-try-builder@chops-service-accounts.iam.gserviceaccount.com"

      caches {
        path: "win_toolchain"
        name: "win_toolchain"
      }
    }

    builders {
      name: "linux-clang-dbg"
      mixins: "linux"
      mixins: "clang"
      mixins: "dbg"
    }

    builders {
      name: "linux-clang-rel"
      mixins: "linux"
      mixins: "clang"
      mixins: "rel"
    }

    builders {
      name: "linux-gcc-dbg"
      mixins: "linux"
      mixins: "no_clang"
      mixins: "dbg"
    }

    builders {
      name: "linux-gcc-rel"
      mixins: "linux"
      mixins: "no_clang"
      mixins: "rel"
    }

    builders {
      name: "mac-dbg"
      mixins: "mac"
      mixins: "dbg"
    }

    builders {
      name: "mac-rel"
      mixins: "mac"
      mixins: "rel"
    }

    builders {
      name: "win-msvc-x86-dbg"
      mixins: "win"
      mixins: "no_clang"
      mixins: "x86"
      mixins: "dbg"
    }

    builders {
      name: "win-msvc-x86-rel"
      mixins: "win"
      mixins: "no_clang"
      mixins: "x86"
      mixins: "rel"
    }

    builders {
      name: "win-msvc-x64-dbg"
      mixins: "win"
      mixins: "no_clang"
      mixins: "x64"
      mixins: "dbg"
    }

    builders {
      name: "win-msvc-x64-rel"
      mixins: "win"
      mixins: "no_clang"
      mixins: "x64"
      mixins: "rel"
    }

    builders {
      name: "win-clang-x86-dbg"
      mixins: "win"
      mixins: "clang"
      mixins: "x86"
      mixins: "dbg"
    }

    builders {
      name: "win-clang-x86-rel"
      mixins: "win"
      mixins: "clang"
      mixins: "x86"
      mixins: "rel"
    }

    builders {
      name: "win-clang-x64-dbg"
      mixins: "win"
      mixins: "clang"
      mixins: "x64"
      mixins: "dbg"
    }

    builders {
      name: "win-clang-x64-rel"
      mixins: "win"
      mixins: "clang"
      mixins: "x64"
      mixins: "rel"
    }
  }
}

buckets {
  name: "master.tryserver.chromium.angle"
  acls {
    role: READER
    group: "all"
  }
  acls {
    role: SCHEDULER
    group: "project-angle-tryjob-access"
  }
  acls {
    role: WRITER
    group: "service-account-chromium-tryserver"
  }
}
