From cd5492c910683e5690f7da73efe4b5ab8d988e31 Mon Sep 17 00:00:00 2001 From: Ryan Harrison Date: Thu, 3 Jun 2021 19:58:51 +0000 Subject: [PATCH] Add Starlark based configs to Tint This does no remove the existing configs, since there is a chrome infrastructure change that needs to occur to point LUCI at the new configs. BUG=tint:693 Change-Id: Ie32427c51dde3386d6ca15e5dfc0222afe5c1f92 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/51401 Reviewed-by: Ryan Harrison Auto-Submit: Ryan Harrison Kokoro: Kokoro Commit-Queue: Ryan Harrison --- .../config/global/generated/commit-queue.cfg | 78 +++ .../global/generated/cr-buildbucket.cfg | 518 ++++++++++++++++++ infra/config/global/generated/luci-logdog.cfg | 9 + infra/config/global/generated/luci-milo.cfg | 117 ++++ .../global/generated/luci-scheduler.cfg | 144 +++++ infra/config/global/generated/project.cfg | 8 + infra/config/global/main.star | 405 ++++++++++++++ 7 files changed, 1279 insertions(+) create mode 100644 infra/config/global/generated/commit-queue.cfg create mode 100644 infra/config/global/generated/cr-buildbucket.cfg create mode 100644 infra/config/global/generated/luci-logdog.cfg create mode 100644 infra/config/global/generated/luci-milo.cfg create mode 100644 infra/config/global/generated/luci-scheduler.cfg create mode 100644 infra/config/global/generated/project.cfg create mode 100644 infra/config/global/main.star diff --git a/infra/config/global/generated/commit-queue.cfg b/infra/config/global/generated/commit-queue.cfg new file mode 100644 index 0000000000..6158aa5e7f --- /dev/null +++ b/infra/config/global/generated/commit-queue.cfg @@ -0,0 +1,78 @@ +# Auto-generated by lucicfg. +# Do not modify manually. +# +# For the schema of this file, see Config message: +# https://luci-config.appspot.com/schemas/projects:commit-queue.cfg + +cq_status_host: "chromium-cq-status.appspot.com" +submit_options { + max_burst: 4 + burst_delay { + seconds: 480 + } +} +config_groups { + name: "Tint-CQ" + gerrit { + url: "https://dawn-review.googlesource.com" + projects { + name: "tint" + ref_regexp: "refs/heads/.+" + } + } + verifiers { + gerrit_cq_ability { + committer_list: "project-tint-committers" + dry_run_access_list: "project-tint-tryjobs-access" + } + tryjob { + builders { + name: "tint/try/linux-clang-dbg-x64" + } + builders { + name: "tint/try/linux-clang-dbg-x86" + } + builders { + name: "tint/try/linux-clang-rel-x64" + } + builders { + name: "tint/try/linux-clang-rel-x86" + } + builders { + name: "tint/try/mac-dbg" + } + builders { + name: "tint/try/mac-rel" + } + builders { + name: "tint/try/presubmit" + disable_reuse: true + } + builders { + name: "tint/try/win-clang-dbg-x64" + } + builders { + name: "tint/try/win-clang-dbg-x86" + } + builders { + name: "tint/try/win-clang-rel-x64" + } + builders { + name: "tint/try/win-clang-rel-x86" + } + builders { + name: "tint/try/win-msvc-dbg-x64" + } + builders { + name: "tint/try/win-msvc-rel-x64" + } + retry_config { + single_quota: 1 + global_quota: 2 + failure_weight: 1 + transient_failure_weight: 1 + timeout_weight: 2 + } + } + } +} diff --git a/infra/config/global/generated/cr-buildbucket.cfg b/infra/config/global/generated/cr-buildbucket.cfg new file mode 100644 index 0000000000..443ac98b50 --- /dev/null +++ b/infra/config/global/generated/cr-buildbucket.cfg @@ -0,0 +1,518 @@ +# Auto-generated by lucicfg. +# Do not modify manually. +# +# For the schema of this file, see BuildbucketCfg message: +# https://luci-config.appspot.com/schemas/projects:buildbucket.cfg + +buckets { + name: "ci" + acls { + group: "all" + } + acls { + role: SCHEDULER + identity: "user:luci-scheduler@appspot.gserviceaccount.com" + } + swarming { + builders { + name: "linux-clang-dbg-x64" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "cpu:x86-64" + dimensions: "os:Ubuntu-18.04" + dimensions: "pool:luci.flex.ci" + recipe { + name: "tint" + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" + cipd_version: "refs/heads/master" + properties_j: "$build/goma:{\"enable_ats\":true,\"rpc_extra_params\":\"?prod\",\"server_host\":\"goma.chromium.org\"}" + properties_j: "clang:true" + properties_j: "debug:true" + properties_j: "target_cpu:\"x64\"" + } + service_account: "tint-ci-builder@chops-service-accounts.iam.gserviceaccount.com" + } + builders { + name: "linux-clang-dbg-x86" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "cpu:x86-64" + dimensions: "os:Ubuntu-18.04" + dimensions: "pool:luci.flex.ci" + recipe { + name: "tint" + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" + cipd_version: "refs/heads/master" + properties_j: "$build/goma:{\"enable_ats\":true,\"rpc_extra_params\":\"?prod\",\"server_host\":\"goma.chromium.org\"}" + properties_j: "clang:true" + properties_j: "debug:true" + properties_j: "target_cpu:\"x86\"" + } + service_account: "tint-ci-builder@chops-service-accounts.iam.gserviceaccount.com" + } + builders { + name: "linux-clang-rel-x64" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "cpu:x86-64" + dimensions: "os:Ubuntu-18.04" + dimensions: "pool:luci.flex.ci" + recipe { + name: "tint" + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" + cipd_version: "refs/heads/master" + properties_j: "$build/goma:{\"enable_ats\":true,\"rpc_extra_params\":\"?prod\",\"server_host\":\"goma.chromium.org\"}" + properties_j: "clang:true" + properties_j: "debug:false" + properties_j: "target_cpu:\"x64\"" + } + service_account: "tint-ci-builder@chops-service-accounts.iam.gserviceaccount.com" + } + builders { + name: "linux-clang-rel-x86" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "cpu:x86-64" + dimensions: "os:Ubuntu-18.04" + dimensions: "pool:luci.flex.ci" + recipe { + name: "tint" + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" + cipd_version: "refs/heads/master" + properties_j: "$build/goma:{\"enable_ats\":true,\"rpc_extra_params\":\"?prod\",\"server_host\":\"goma.chromium.org\"}" + properties_j: "clang:true" + properties_j: "debug:false" + properties_j: "target_cpu:\"x86\"" + } + service_account: "tint-ci-builder@chops-service-accounts.iam.gserviceaccount.com" + } + builders { + name: "mac-dbg" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "cpu:x86-64" + dimensions: "os:Mac-10.15" + dimensions: "pool:luci.flex.ci" + recipe { + name: "tint" + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" + cipd_version: "refs/heads/master" + properties_j: "$build/goma:{\"rpc_extra_params\":\"?prod\",\"server_host\":\"goma.chromium.org\"}" + properties_j: "$depot_tools/osx_sdk:{\"sdk_version\":\"11b52\"}" + properties_j: "clang:true" + properties_j: "debug:true" + properties_j: "target_cpu:\"x64\"" + } + caches { + name: "osx_sdk" + path: "osx_sdk" + } + service_account: "tint-ci-builder@chops-service-accounts.iam.gserviceaccount.com" + } + builders { + name: "mac-rel" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "cpu:x86-64" + dimensions: "os:Mac-10.15" + dimensions: "pool:luci.flex.ci" + recipe { + name: "tint" + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" + cipd_version: "refs/heads/master" + properties_j: "$build/goma:{\"rpc_extra_params\":\"?prod\",\"server_host\":\"goma.chromium.org\"}" + properties_j: "$depot_tools/osx_sdk:{\"sdk_version\":\"11b52\"}" + properties_j: "clang:true" + properties_j: "debug:false" + properties_j: "target_cpu:\"x64\"" + } + caches { + name: "osx_sdk" + path: "osx_sdk" + } + service_account: "tint-ci-builder@chops-service-accounts.iam.gserviceaccount.com" + } + builders { + name: "win-clang-dbg-x64" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "cpu:x86-64" + dimensions: "os:Windows-10" + dimensions: "pool:luci.flex.ci" + recipe { + name: "tint" + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" + cipd_version: "refs/heads/master" + properties_j: "$build/goma:{\"enable_ats\":true,\"rpc_extra_params\":\"?prod\",\"server_host\":\"goma.chromium.org\"}" + properties_j: "clang:true" + properties_j: "debug:true" + properties_j: "target_cpu:\"x64\"" + } + caches { + name: "win_toolchain" + path: "win_toolchain" + } + service_account: "tint-ci-builder@chops-service-accounts.iam.gserviceaccount.com" + } + builders { + name: "win-clang-dbg-x86" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "cpu:x86-64" + dimensions: "os:Windows-10" + dimensions: "pool:luci.flex.ci" + recipe { + name: "tint" + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" + cipd_version: "refs/heads/master" + properties_j: "$build/goma:{\"enable_ats\":true,\"rpc_extra_params\":\"?prod\",\"server_host\":\"goma.chromium.org\"}" + properties_j: "clang:true" + properties_j: "debug:true" + properties_j: "target_cpu:\"x86\"" + } + caches { + name: "win_toolchain" + path: "win_toolchain" + } + service_account: "tint-ci-builder@chops-service-accounts.iam.gserviceaccount.com" + } + builders { + name: "win-clang-rel-x64" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "cpu:x86-64" + dimensions: "os:Windows-10" + dimensions: "pool:luci.flex.ci" + recipe { + name: "tint" + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" + cipd_version: "refs/heads/master" + properties_j: "$build/goma:{\"enable_ats\":true,\"rpc_extra_params\":\"?prod\",\"server_host\":\"goma.chromium.org\"}" + properties_j: "clang:true" + properties_j: "debug:false" + properties_j: "target_cpu:\"x64\"" + } + caches { + name: "win_toolchain" + path: "win_toolchain" + } + service_account: "tint-ci-builder@chops-service-accounts.iam.gserviceaccount.com" + } + builders { + name: "win-clang-rel-x86" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "cpu:x86-64" + dimensions: "os:Windows-10" + dimensions: "pool:luci.flex.ci" + recipe { + name: "tint" + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" + cipd_version: "refs/heads/master" + properties_j: "$build/goma:{\"enable_ats\":true,\"rpc_extra_params\":\"?prod\",\"server_host\":\"goma.chromium.org\"}" + properties_j: "clang:true" + properties_j: "debug:false" + properties_j: "target_cpu:\"x86\"" + } + caches { + name: "win_toolchain" + path: "win_toolchain" + } + service_account: "tint-ci-builder@chops-service-accounts.iam.gserviceaccount.com" + } + builders { + name: "win-msvc-dbg-x64" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "cpu:x86-64" + dimensions: "os:Windows-10" + dimensions: "pool:luci.flex.ci" + recipe { + name: "tint" + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" + cipd_version: "refs/heads/master" + properties_j: "clang:false" + properties_j: "debug:true" + properties_j: "target_cpu:\"x64\"" + } + service_account: "tint-ci-builder@chops-service-accounts.iam.gserviceaccount.com" + } + builders { + name: "win-msvc-rel-x64" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "cpu:x86-64" + dimensions: "os:Windows-10" + dimensions: "pool:luci.flex.ci" + recipe { + name: "tint" + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" + cipd_version: "refs/heads/master" + properties_j: "clang:false" + properties_j: "debug:false" + properties_j: "target_cpu:\"x64\"" + } + service_account: "tint-ci-builder@chops-service-accounts.iam.gserviceaccount.com" + } + } +} +buckets { + name: "try" + acls { + group: "all" + } + acls { + role: SCHEDULER + group: "project-tint-tryjob-access" + } + acls { + role: SCHEDULER + group: "service-account-cq" + } + swarming { + builders { + name: "linux-clang-dbg-x64" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "cpu:x86-64" + dimensions: "os:Ubuntu-18.04" + dimensions: "pool:luci.flex.try" + recipe { + name: "tint" + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" + cipd_version: "refs/heads/master" + properties_j: "$build/goma:{\"enable_ats\":true,\"rpc_extra_params\":\"?prod\",\"server_host\":\"goma.chromium.org\"}" + properties_j: "$depot_tools/bot_update:{\"apply_patch_on_gclient\":true}" + properties_j: "clang:true" + properties_j: "debug:true" + properties_j: "target_cpu:\"x64\"" + } + service_account: "tint-try-builder@chops-service-accounts.iam.gserviceaccount.com" + } + builders { + name: "linux-clang-dbg-x86" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "cpu:x86-64" + dimensions: "os:Ubuntu-18.04" + dimensions: "pool:luci.flex.try" + recipe { + name: "tint" + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" + cipd_version: "refs/heads/master" + properties_j: "$build/goma:{\"enable_ats\":true,\"rpc_extra_params\":\"?prod\",\"server_host\":\"goma.chromium.org\"}" + properties_j: "$depot_tools/bot_update:{\"apply_patch_on_gclient\":true}" + properties_j: "clang:true" + properties_j: "debug:true" + properties_j: "target_cpu:\"x86\"" + } + service_account: "tint-try-builder@chops-service-accounts.iam.gserviceaccount.com" + } + builders { + name: "linux-clang-rel-x64" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "cpu:x86-64" + dimensions: "os:Ubuntu-18.04" + dimensions: "pool:luci.flex.try" + recipe { + name: "tint" + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" + cipd_version: "refs/heads/master" + properties_j: "$build/goma:{\"enable_ats\":true,\"rpc_extra_params\":\"?prod\",\"server_host\":\"goma.chromium.org\"}" + properties_j: "$depot_tools/bot_update:{\"apply_patch_on_gclient\":true}" + properties_j: "clang:true" + properties_j: "debug:false" + properties_j: "target_cpu:\"x64\"" + } + service_account: "tint-try-builder@chops-service-accounts.iam.gserviceaccount.com" + } + builders { + name: "linux-clang-rel-x86" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "cpu:x86-64" + dimensions: "os:Ubuntu-18.04" + dimensions: "pool:luci.flex.try" + recipe { + name: "tint" + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" + cipd_version: "refs/heads/master" + properties_j: "$build/goma:{\"enable_ats\":true,\"rpc_extra_params\":\"?prod\",\"server_host\":\"goma.chromium.org\"}" + properties_j: "$depot_tools/bot_update:{\"apply_patch_on_gclient\":true}" + properties_j: "clang:true" + properties_j: "debug:false" + properties_j: "target_cpu:\"x86\"" + } + service_account: "tint-try-builder@chops-service-accounts.iam.gserviceaccount.com" + } + builders { + name: "mac-dbg" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "cpu:x86-64" + dimensions: "os:Mac-10.15" + dimensions: "pool:luci.flex.try" + recipe { + name: "tint" + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" + cipd_version: "refs/heads/master" + properties_j: "$build/goma:{\"rpc_extra_params\":\"?prod\",\"server_host\":\"goma.chromium.org\"}" + properties_j: "$depot_tools/bot_update:{\"apply_patch_on_gclient\":true}" + properties_j: "$depot_tools/osx_sdk:{\"sdk_version\":\"11b52\"}" + properties_j: "clang:true" + properties_j: "debug:true" + properties_j: "target_cpu:\"x64\"" + } + caches { + name: "osx_sdk" + path: "osx_sdk" + } + service_account: "tint-try-builder@chops-service-accounts.iam.gserviceaccount.com" + } + builders { + name: "mac-rel" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "cpu:x86-64" + dimensions: "os:Mac-10.15" + dimensions: "pool:luci.flex.try" + recipe { + name: "tint" + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" + cipd_version: "refs/heads/master" + properties_j: "$build/goma:{\"rpc_extra_params\":\"?prod\",\"server_host\":\"goma.chromium.org\"}" + properties_j: "$depot_tools/bot_update:{\"apply_patch_on_gclient\":true}" + properties_j: "$depot_tools/osx_sdk:{\"sdk_version\":\"11b52\"}" + properties_j: "clang:true" + properties_j: "debug:false" + properties_j: "target_cpu:\"x64\"" + } + caches { + name: "osx_sdk" + path: "osx_sdk" + } + service_account: "tint-try-builder@chops-service-accounts.iam.gserviceaccount.com" + } + builders { + name: "presubmit" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "cpu:x86-64" + dimensions: "os:Ubuntu-18.04" + dimensions: "pool:luci.flex.try" + recipe { + name: "run_presubmit" + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" + cipd_version: "refs/heads/master" + properties_j: "$depot_tools/bot_update:{\"apply_patch_on_gclient\":true}" + properties_j: "repo_name:\"tint\"" + properties_j: "runhooks:true" + } + service_account: "tint-try-builder@chops-service-accounts.iam.gserviceaccount.com" + } + builders { + name: "win-clang-dbg-x64" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "cpu:x86-64" + dimensions: "os:Windows-10" + dimensions: "pool:luci.flex.try" + recipe { + name: "tint" + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" + cipd_version: "refs/heads/master" + properties_j: "$build/goma:{\"enable_ats\":true,\"rpc_extra_params\":\"?prod\",\"server_host\":\"goma.chromium.org\"}" + properties_j: "$depot_tools/bot_update:{\"apply_patch_on_gclient\":true}" + properties_j: "clang:true" + properties_j: "debug:true" + properties_j: "target_cpu:\"x64\"" + } + caches { + name: "win_toolchain" + path: "win_toolchain" + } + service_account: "tint-try-builder@chops-service-accounts.iam.gserviceaccount.com" + } + builders { + name: "win-clang-dbg-x86" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "cpu:x86-64" + dimensions: "os:Windows-10" + dimensions: "pool:luci.flex.try" + recipe { + name: "tint" + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" + cipd_version: "refs/heads/master" + properties_j: "$build/goma:{\"enable_ats\":true,\"rpc_extra_params\":\"?prod\",\"server_host\":\"goma.chromium.org\"}" + properties_j: "$depot_tools/bot_update:{\"apply_patch_on_gclient\":true}" + properties_j: "clang:true" + properties_j: "debug:true" + properties_j: "target_cpu:\"x86\"" + } + caches { + name: "win_toolchain" + path: "win_toolchain" + } + service_account: "tint-try-builder@chops-service-accounts.iam.gserviceaccount.com" + } + builders { + name: "win-clang-rel-x64" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "cpu:x86-64" + dimensions: "os:Windows-10" + dimensions: "pool:luci.flex.try" + recipe { + name: "tint" + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" + cipd_version: "refs/heads/master" + properties_j: "$build/goma:{\"enable_ats\":true,\"rpc_extra_params\":\"?prod\",\"server_host\":\"goma.chromium.org\"}" + properties_j: "$depot_tools/bot_update:{\"apply_patch_on_gclient\":true}" + properties_j: "clang:true" + properties_j: "debug:false" + properties_j: "target_cpu:\"x64\"" + } + caches { + name: "win_toolchain" + path: "win_toolchain" + } + service_account: "tint-try-builder@chops-service-accounts.iam.gserviceaccount.com" + } + builders { + name: "win-clang-rel-x86" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "cpu:x86-64" + dimensions: "os:Windows-10" + dimensions: "pool:luci.flex.try" + recipe { + name: "tint" + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" + cipd_version: "refs/heads/master" + properties_j: "$build/goma:{\"enable_ats\":true,\"rpc_extra_params\":\"?prod\",\"server_host\":\"goma.chromium.org\"}" + properties_j: "$depot_tools/bot_update:{\"apply_patch_on_gclient\":true}" + properties_j: "clang:true" + properties_j: "debug:false" + properties_j: "target_cpu:\"x86\"" + } + caches { + name: "win_toolchain" + path: "win_toolchain" + } + service_account: "tint-try-builder@chops-service-accounts.iam.gserviceaccount.com" + } + builders { + name: "win-msvc-dbg-x64" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "cpu:x86-64" + dimensions: "os:Windows-10" + dimensions: "pool:luci.flex.try" + recipe { + name: "tint" + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" + cipd_version: "refs/heads/master" + properties_j: "$depot_tools/bot_update:{\"apply_patch_on_gclient\":true}" + properties_j: "clang:false" + properties_j: "debug:true" + properties_j: "target_cpu:\"x64\"" + } + service_account: "tint-try-builder@chops-service-accounts.iam.gserviceaccount.com" + } + builders { + name: "win-msvc-rel-x64" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "cpu:x86-64" + dimensions: "os:Windows-10" + dimensions: "pool:luci.flex.try" + recipe { + name: "tint" + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" + cipd_version: "refs/heads/master" + properties_j: "$depot_tools/bot_update:{\"apply_patch_on_gclient\":true}" + properties_j: "clang:false" + properties_j: "debug:false" + properties_j: "target_cpu:\"x64\"" + } + service_account: "tint-try-builder@chops-service-accounts.iam.gserviceaccount.com" + } + } +} diff --git a/infra/config/global/generated/luci-logdog.cfg b/infra/config/global/generated/luci-logdog.cfg new file mode 100644 index 0000000000..adc75bef49 --- /dev/null +++ b/infra/config/global/generated/luci-logdog.cfg @@ -0,0 +1,9 @@ +# Auto-generated by lucicfg. +# Do not modify manually. +# +# For the schema of this file, see ProjectConfig message: +# https://luci-config.appspot.com/schemas/projects:luci-logdog.cfg + +reader_auth_groups: "all" +writer_auth_groups: "luci-logdog-chromium-writers" +archive_gs_bucket: "chromium-luci-logdog" diff --git a/infra/config/global/generated/luci-milo.cfg b/infra/config/global/generated/luci-milo.cfg new file mode 100644 index 0000000000..075a07660d --- /dev/null +++ b/infra/config/global/generated/luci-milo.cfg @@ -0,0 +1,117 @@ +# Auto-generated by lucicfg. +# Do not modify manually. +# +# For the schema of this file, see Project message: +# https://luci-config.appspot.com/schemas/projects:luci-milo.cfg + +consoles { + id: "ci" + name: "Tint CI Builders" + repo_url: "https://dawn.googlesource.com/tint" + refs: "regexp:refs/heads/main" + manifest_name: "REVISION" + builders { + name: "buildbucket/luci.tint.ci/linux-clang-dbg-x64" + category: "linux|clang|dbg" + short_name: "x64" + } + builders { + name: "buildbucket/luci.tint.ci/linux-clang-rel-x64" + category: "linux|clang|rel" + short_name: "x64" + } + builders { + name: "buildbucket/luci.tint.ci/linux-clang-dbg-x86" + category: "linux|clang|dbg" + short_name: "x86" + } + builders { + name: "buildbucket/luci.tint.ci/linux-clang-rel-x86" + category: "linux|clang|rel" + short_name: "x86" + } + builders { + name: "buildbucket/luci.tint.ci/mac-dbg" + category: "mac" + short_name: "dbg" + } + builders { + name: "buildbucket/luci.tint.ci/mac-rel" + category: "mac" + short_name: "rel" + } + builders { + name: "buildbucket/luci.tint.ci/win-clang-dbg-x64" + category: "win|clang|dbg" + short_name: "x64" + } + builders { + name: "buildbucket/luci.tint.ci/win-clang-rel-x64" + category: "win|clang|rel" + short_name: "x64" + } + builders { + name: "buildbucket/luci.tint.ci/win-clang-dbg-x86" + category: "win|clang|dbg" + short_name: "x86" + } + builders { + name: "buildbucket/luci.tint.ci/win-clang-rel-x86" + category: "win|clang|rel" + short_name: "x86" + } + builders { + name: "buildbucket/luci.tint.ci/win-msvc-dbg-x64" + category: "win|msvc" + short_name: "dbg" + } + builders { + name: "buildbucket/luci.tint.ci/win-msvc-rel-x64" + category: "win|msvc" + short_name: "rel" + } +} +consoles { + id: "try" + name: "Tint try Builders" + builders { + name: "buildbucket/luci.tint.try/presubmit" + } + builders { + name: "buildbucket/luci.tint.try/linux-clang-dbg-x64" + } + builders { + name: "buildbucket/luci.tint.try/linux-clang-rel-x64" + } + builders { + name: "buildbucket/luci.tint.try/linux-clang-dbg-x86" + } + builders { + name: "buildbucket/luci.tint.try/linux-clang-rel-x86" + } + builders { + name: "buildbucket/luci.tint.try/mac-dbg" + } + builders { + name: "buildbucket/luci.tint.try/mac-rel" + } + builders { + name: "buildbucket/luci.tint.try/win-clang-dbg-x64" + } + builders { + name: "buildbucket/luci.tint.try/win-clang-rel-x64" + } + builders { + name: "buildbucket/luci.tint.try/win-clang-dbg-x86" + } + builders { + name: "buildbucket/luci.tint.try/win-clang-rel-x86" + } + builders { + name: "buildbucket/luci.tint.try/win-msvc-dbg-x64" + } + builders { + name: "buildbucket/luci.tint.try/win-msvc-rel-x64" + } + builder_view_only: true +} diff --git a/infra/config/global/generated/luci-scheduler.cfg b/infra/config/global/generated/luci-scheduler.cfg new file mode 100644 index 0000000000..6735c7a000 --- /dev/null +++ b/infra/config/global/generated/luci-scheduler.cfg @@ -0,0 +1,144 @@ +# Auto-generated by lucicfg. +# Do not modify manually. +# +# For the schema of this file, see ProjectConfig message: +# https://luci-config.appspot.com/schemas/projects:luci-scheduler.cfg + +job { + id: "linux-clang-dbg-x64" + acl_sets: "ci" + buildbucket { + server: "cr-buildbucket.appspot.com" + bucket: "luci.tint.ci" + builder: "linux-clang-dbg-x64" + } +} +job { + id: "linux-clang-dbg-x86" + acl_sets: "ci" + buildbucket { + server: "cr-buildbucket.appspot.com" + bucket: "luci.tint.ci" + builder: "linux-clang-dbg-x86" + } +} +job { + id: "linux-clang-rel-x64" + acl_sets: "ci" + buildbucket { + server: "cr-buildbucket.appspot.com" + bucket: "luci.tint.ci" + builder: "linux-clang-rel-x64" + } +} +job { + id: "linux-clang-rel-x86" + acl_sets: "ci" + buildbucket { + server: "cr-buildbucket.appspot.com" + bucket: "luci.tint.ci" + builder: "linux-clang-rel-x86" + } +} +job { + id: "mac-dbg" + acl_sets: "ci" + buildbucket { + server: "cr-buildbucket.appspot.com" + bucket: "luci.tint.ci" + builder: "mac-dbg" + } +} +job { + id: "mac-rel" + acl_sets: "ci" + buildbucket { + server: "cr-buildbucket.appspot.com" + bucket: "luci.tint.ci" + builder: "mac-rel" + } +} +job { + id: "win-clang-dbg-x64" + acl_sets: "ci" + buildbucket { + server: "cr-buildbucket.appspot.com" + bucket: "luci.tint.ci" + builder: "win-clang-dbg-x64" + } +} +job { + id: "win-clang-dbg-x86" + acl_sets: "ci" + buildbucket { + server: "cr-buildbucket.appspot.com" + bucket: "luci.tint.ci" + builder: "win-clang-dbg-x86" + } +} +job { + id: "win-clang-rel-x64" + acl_sets: "ci" + buildbucket { + server: "cr-buildbucket.appspot.com" + bucket: "luci.tint.ci" + builder: "win-clang-rel-x64" + } +} +job { + id: "win-clang-rel-x86" + acl_sets: "ci" + buildbucket { + server: "cr-buildbucket.appspot.com" + bucket: "luci.tint.ci" + builder: "win-clang-rel-x86" + } +} +job { + id: "win-msvc-dbg-x64" + acl_sets: "ci" + buildbucket { + server: "cr-buildbucket.appspot.com" + bucket: "luci.tint.ci" + builder: "win-msvc-dbg-x64" + } +} +job { + id: "win-msvc-rel-x64" + acl_sets: "ci" + buildbucket { + server: "cr-buildbucket.appspot.com" + bucket: "luci.tint.ci" + builder: "win-msvc-rel-x64" + } +} +trigger { + id: "primary-poller" + acl_sets: "ci" + triggers: "linux-clang-dbg-x64" + triggers: "linux-clang-dbg-x86" + triggers: "linux-clang-rel-x64" + triggers: "linux-clang-rel-x86" + triggers: "mac-dbg" + triggers: "mac-rel" + triggers: "win-clang-dbg-x64" + triggers: "win-clang-dbg-x86" + triggers: "win-clang-rel-x64" + triggers: "win-clang-rel-x86" + triggers: "win-msvc-dbg-x64" + triggers: "win-msvc-rel-x64" + gitiles { + repo: "https://dawn.googlesource.com/tint" + refs: "regexp:refs/heads/main" + } +} +acl_sets { + name: "ci" + acls { + role: OWNER + granted_to: "group:project-tint-admins" + } + acls { + granted_to: "group:all" + } +} diff --git a/infra/config/global/generated/project.cfg b/infra/config/global/generated/project.cfg new file mode 100644 index 0000000000..047d6197a8 --- /dev/null +++ b/infra/config/global/generated/project.cfg @@ -0,0 +1,8 @@ +# Auto-generated by lucicfg. +# Do not modify manually. +# +# For the schema of this file, see ProjectCfg message: +# https://luci-config.appspot.com/schemas/projects:project.cfg + +name: "tint" +access: "group:all" diff --git a/infra/config/global/main.star b/infra/config/global/main.star new file mode 100644 index 0000000000..2fb6170f25 --- /dev/null +++ b/infra/config/global/main.star @@ -0,0 +1,405 @@ +#!/usr/bin/env lucicfg +# +# Copyright 2021 The Tint Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# +""" +main.star: lucicfg configuration for Tint's standalone builers. +""" + +lucicfg.config(fail_on_warnings = True) + +luci.project( + name = "tint", + buildbucket = "cr-buildbucket.appspot.com", + logdog = "luci-logdog.appspot.com", + milo = "luci-milo.appspot.com", + notify = "luci-notify.appspot.com", + scheduler = "luci-scheduler.appspot.com", + swarming = "chromium-swarm.appspot.com", + acls = [ + acl.entry( + roles = [ + acl.PROJECT_CONFIGS_READER, + acl.LOGDOG_READER, + acl.BUILDBUCKET_READER, + acl.SCHEDULER_READER, + ], + groups = "all", + ), + acl.entry( + roles = [ + acl.SCHEDULER_OWNER, + ], + groups = "project-tint-admins", + ), + acl.entry( + roles = [ + acl.LOGDOG_WRITER, + ], + groups = "luci-logdog-chromium-writers", + ), + ], +) + +luci.logdog(gs_bucket = "chromium-luci-logdog") + +luci.bucket( + name = "ci", + acls = [ + acl.entry( + roles = [ + acl.BUILDBUCKET_READER, + ], + groups = "all", + ), + acl.entry( + acl.BUILDBUCKET_TRIGGERER, + users = [ + "luci-scheduler@appspot.gserviceaccount.com", + ], + ), + ], +) + +luci.bucket( + name = "try", + acls = [ + acl.entry( + acl.BUILDBUCKET_TRIGGERER, + groups = [ + "project-tint-tryjob-access", + "service-account-cq", + ], + ), + ], +) + +os_category = struct( + LINUX = "Linux", + MAC = "Mac", + WINDOWS = "Windows", + UNKNOWN = "Unknown", +) + +def os_enum(dimension, category, console_name): + return struct(dimension = dimension, category = category, console_name = console_name) + +os = struct( + LINUX = os_enum("Ubuntu-18.04", os_category.LINUX, "linux"), + MAC = os_enum("Mac-10.15", os_category.MAC, "mac"), + WINDOWS = os_enum("Windows-10", os_category.WINDOWS, "win"), + UNKNOWN = os_enum("Unknown", os_category.UNKNOWN, "unknown"), +) + +# Recipes + +def get_builder_executable(): + """Get standard executable for builders + + Returns: + A luci.recipe + """ + return luci.recipe( + name = "tint", + cipd_package = "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build", + cipd_version = "refs/heads/master", + ) + +def get_os_from_arg(arg): + """Get OS enum for a builder name string + + Args: + arg: builder name string to get enum for + + Returns: + An OS enum struct + + """ + + if arg.startswith("linux"): + return os.LINUX + if arg.startswith("win"): + return os.WINDOWS + if arg.startswith("mac"): + return os.MAC + return os.UNKNOWN + +def get_default_caches(os, clang): + """Get standard caches for builders + + Args: + os: OS enum for the builder + clang: is this builder running clang + + Returns: + A list of caches + """ + caches = [] + if os.category == os_category.WINDOWS and clang: + caches.append(swarming.cache(name = "win_toolchain", path = "win_toolchain")) + elif os.category == os_category.MAC: + # Cache for mac_toolchain tool and XCode.app + caches.append(swarming.cache(name = "osx_sdk", path = "osx_sdk")) + return caches + +def get_default_dimensions(os): + """Get dimensions for a builder that don't depend on being CI vs Try + + Args: + os: OS enum for the builder + + Returns: + A dimension dict + + """ + dimensions = {} + + # We have 32bit test configurations but some of our toolchain is 64bit (like CIPD) + dimensions["cpu"] = "x86-64" + dimensions["os"] = os.dimension + + return dimensions + +def get_default_properties(os, clang, debug, cpu): + """Get the properties for a builder that don't depend on being CI vs Try + + Args: + os: OS enum for the builder + clang: is this builder running clang + debug: is this builder generating debug builds + cpu: string representing the target CPU architecture + + Returns: + A properties dict + """ + properties = {} + + properties["debug"] = debug + properties["target_cpu"] = cpu + + properties["clang"] = clang + msvc = os.category == os_category.WINDOWS and not clang + + if msvc != True: + goma_props = {} + goma_props.update({ + "server_host": "goma.chromium.org", + "rpc_extra_params": "?prod", + }) + if os.category != os_category.MAC: + goma_props["enable_ats"] = True + properties["$build/goma"] = goma_props + + if os.category == os_category.MAC: + properties["$depot_tools/osx_sdk"] = { + "sdk_version": "11b52", + } + + return properties + +def add_ci_builder(name, os, clang, debug, cpu): + """Add a CI builder + + Args: + name: builder's name in string form + os: OS enum for the builder + clang: is this builder running clang + debug: is this builder generating debug builds + cpu: string representing the target CPU architecture + """ + dimensions_ci = get_default_dimensions(os) + dimensions_ci["pool"] = "luci.flex.ci" + properties_ci = get_default_properties(os, clang, debug, cpu) + triggered_by_ci = ["primary-poller"] + luci.builder( + name = name, + bucket = "ci", + triggered_by = triggered_by_ci, + executable = get_builder_executable(), + properties = properties_ci, + dimensions = dimensions_ci, + caches = get_default_caches(os, clang), + service_account = "tint-ci-builder@chops-service-accounts.iam.gserviceaccount.com", + ) + +def add_try_builder(name, os, clang, debug, cpu): + """Add a Try builder + + Args: + name: builder's name in string form + os: OS enum for the builder + clang: is this builder running clang + debug: is this builder generating debug builds + cpu: string representing the target CPU architecture + """ + dimensions_try = get_default_dimensions(os) + dimensions_try["pool"] = "luci.flex.try" + properties_try = get_default_properties(os, clang, debug, cpu) + properties_try["$depot_tools/bot_update"] = { + "apply_patch_on_gclient": True, + } + luci.builder( + name = name, + bucket = "try", + executable = get_builder_executable(), + properties = properties_try, + dimensions = dimensions_try, + caches = get_default_caches(os, clang), + service_account = "tint-try-builder@chops-service-accounts.iam.gserviceaccount.com", + ) + +def tint_standalone_builder(name, clang, debug, cpu): + """Adds both the CI and Try standalone builders + + Args: + name: builder's name in string form + clang: is this builder running clang + debug: is this builder generating debug builds + cpu: string representing the target CPU architecture + + """ + os = get_os_from_arg(name) + + add_ci_builder(name, os, clang, debug, cpu) + add_try_builder(name, os, clang, debug, cpu) + + config = "" + if clang: + config = "clang" + elif os.category == os_category.WINDOWS: + config = "msvc" + + category = os.console_name + + if os.category != os_category.MAC: + category += "|" + config + if config != "msvc": + category += "|dbg" if debug else "|rel" + + short_name = "dbg" if debug else "rel" + if os.category != os_category.MAC: + if config != "msvc": + short_name = cpu + + luci.console_view_entry( + console_view = "ci", + builder = "ci/" + name, + category = category, + short_name = short_name, + ) + + luci.list_view_entry( + list_view = "try", + builder = "try/" + name, + ) + + luci.cq_tryjob_verifier( + cq_group = "Tint-CQ", + builder = "tint:try/" + name, + ) + +luci.gitiles_poller( + name = "primary-poller", + bucket = "ci", + repo = "https://dawn.googlesource.com/tint", + refs = [ + "refs/heads/main", + ], +) + +luci.list_view_entry( + list_view = "try", + builder = "try/presubmit", +) + +luci.builder( + name = "presubmit", + bucket = "try", + executable = luci.recipe( + name = "run_presubmit", + cipd_package = "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build", + cipd_version = "refs/heads/master", + ), + dimensions = { + "cpu": "x86-64", + "os": os.LINUX.dimension, + "pool": "luci.flex.try", + }, + properties = { + "repo_name": "tint", + "runhooks": True, + "$depot_tools/bot_update": { + "apply_patch_on_gclient": True, + }, + }, + service_account = "tint-try-builder@chops-service-accounts.iam.gserviceaccount.com", +) + +# name, clang, debug, cpu +tint_standalone_builder("linux-clang-dbg-x64", True, True, "x64") +tint_standalone_builder("linux-clang-rel-x64", True, False, "x64") +tint_standalone_builder("linux-clang-dbg-x86", True, True, "x86") +tint_standalone_builder("linux-clang-rel-x86", True, False, "x86") +tint_standalone_builder("mac-dbg", True, True, "x64") +tint_standalone_builder("mac-rel", True, False, "x64") +tint_standalone_builder("win-clang-dbg-x64", True, True, "x64") +tint_standalone_builder("win-clang-rel-x64", True, False, "x64") +tint_standalone_builder("win-clang-dbg-x86", True, True, "x86") +tint_standalone_builder("win-clang-rel-x86", True, False, "x86") +tint_standalone_builder("win-msvc-dbg-x64", False, True, "x64") +tint_standalone_builder("win-msvc-rel-x64", False, False, "x64") + +# Views + +luci.console_view( + name = "ci", + title = "Tint CI Builders", + repo = "https://dawn.googlesource.com/tint", + refs = ["refs/heads/main"], +) + +luci.list_view( + name = "try", + title = "Tint try Builders", +) + +# CQ + +luci.cq( + status_host = "chromium-cq-status.appspot.com", + submit_max_burst = 4, + submit_burst_delay = 480 * time.second, +) + +luci.cq_group( + name = "Tint-CQ", + watch = cq.refset( + "https://dawn.googlesource.com/tint", + refs = ["refs/heads/.+"], + ), + acls = [ + acl.entry( + acl.CQ_COMMITTER, + groups = "project-tint-committers", + ), + acl.entry( + acl.CQ_DRY_RUNNER, + groups = "project-tint-tryjobs-access", + ), + ], + verifiers = [ + luci.cq_tryjob_verifier( + builder = "tint:try/presubmit", + disable_reuse = True, + ), + ], + retry_config = cq.retry_config( + single_quota = 1, + global_quota = 2, + failure_weight = 1, + transient_failure_weight = 1, + timeout_weight = 2, + ), +)