From 3b71fc85b1d333d37adaf06b363f3f9f89aef6a5 Mon Sep 17 00:00:00 2001 From: Joshua Peraza Date: Fri, 1 Oct 2021 10:46:54 -0700 Subject: [PATCH] Config LUCI with lucicfg Change-Id: I0cff5fe7eaf1b8a26857651b617f668eefd3b553 Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3192690 Commit-Queue: Joshua Peraza Reviewed-by: Mark Mentovai --- infra/config/PRESUBMIT.py | 10 +- infra/config/generated/cr-buildbucket.cfg | 636 ++++++++++++++++++++++ infra/config/generated/project.cfg | 8 + infra/config/main.star | 166 ++++++ 4 files changed, 816 insertions(+), 4 deletions(-) create mode 100644 infra/config/generated/cr-buildbucket.cfg create mode 100644 infra/config/generated/project.cfg create mode 100644 infra/config/main.star diff --git a/infra/config/PRESUBMIT.py b/infra/config/PRESUBMIT.py index a1bf82f7..3961942c 100644 --- a/infra/config/PRESUBMIT.py +++ b/infra/config/PRESUBMIT.py @@ -14,13 +14,15 @@ USE_PYTHON3 = True +PRESUBMIT_VERSION = '2.0.0' -def CheckChangeOnUpload(input_api, output_api): +def CheckChangedLUCIConfigs(input_api, output_api): return input_api.canned_checks.CheckChangedLUCIConfigs( input_api, output_api) -def CheckChangeOnCommit(input_api, output_api): - return input_api.canned_checks.CheckChangedLUCIConfigs( - input_api, output_api) +def CheckLucicfgGenOutputMain(input_api, output_api): + return input_api.RunTests( + input_api.canned_checks.CheckLucicfgGenOutput(input_api, output_api, + 'main.star')) diff --git a/infra/config/generated/cr-buildbucket.cfg b/infra/config/generated/cr-buildbucket.cfg new file mode 100644 index 00000000..9042dd93 --- /dev/null +++ b/infra/config/generated/cr-buildbucket.cfg @@ -0,0 +1,636 @@ +# 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 { + role: WRITER + group: "project-crashpad-admins" + } + acls { + group: "all" + } + acls { + role: SCHEDULER + identity: "user:luci-scheduler@appspot.gserviceaccount.com" + } + swarming { + builders { + name: "crashpad_fuchsia_arm64_dbg" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "cores:8" + dimensions: "cpu:x86-64" + dimensions: "os:Ubuntu-16.04" + dimensions: "pool:luci.flex.ci" + recipe { + name: "crashpad/build" + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" + cipd_version: "refs/heads/main" + properties_j: "$gatekeeper:{\"group\":\"client.crashpad\"}" + properties_j: "$kitchen:{\"devshell\":true,\"git_auth\":true}" + properties_j: "config:\"Debug\"" + properties_j: "target_cpu:\"arm64\"" + properties_j: "target_os:\"fuchsia\"" + } + execution_timeout_secs: 10800 + build_numbers: YES + service_account: "crashpad-ci-builder@chops-service-accounts.iam.gserviceaccount.com" + } + builders { + name: "crashpad_fuchsia_arm64_rel" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "cores:8" + dimensions: "cpu:x86-64" + dimensions: "os:Ubuntu-16.04" + dimensions: "pool:luci.flex.ci" + recipe { + name: "crashpad/build" + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" + cipd_version: "refs/heads/main" + properties_j: "$gatekeeper:{\"group\":\"client.crashpad\"}" + properties_j: "$kitchen:{\"devshell\":true,\"git_auth\":true}" + properties_j: "config:\"Release\"" + properties_j: "target_cpu:\"arm64\"" + properties_j: "target_os:\"fuchsia\"" + } + execution_timeout_secs: 10800 + build_numbers: YES + service_account: "crashpad-ci-builder@chops-service-accounts.iam.gserviceaccount.com" + } + builders { + name: "crashpad_fuchsia_x64_dbg" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "cores:8" + dimensions: "cpu:x86-64" + dimensions: "os:Ubuntu-16.04" + dimensions: "pool:luci.flex.ci" + recipe { + name: "crashpad/build" + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" + cipd_version: "refs/heads/main" + properties_j: "$gatekeeper:{\"group\":\"client.crashpad\"}" + properties_j: "$kitchen:{\"devshell\":true,\"git_auth\":true}" + properties_j: "config:\"Debug\"" + properties_j: "target_os:\"fuchsia\"" + } + execution_timeout_secs: 10800 + build_numbers: YES + service_account: "crashpad-ci-builder@chops-service-accounts.iam.gserviceaccount.com" + } + builders { + name: "crashpad_fuchsia_x64_rel" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "cores:8" + dimensions: "cpu:x86-64" + dimensions: "os:Ubuntu-16.04" + dimensions: "pool:luci.flex.ci" + recipe { + name: "crashpad/build" + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" + cipd_version: "refs/heads/main" + properties_j: "$gatekeeper:{\"group\":\"client.crashpad\"}" + properties_j: "$kitchen:{\"devshell\":true,\"git_auth\":true}" + properties_j: "config:\"Release\"" + properties_j: "target_os:\"fuchsia\"" + } + execution_timeout_secs: 10800 + build_numbers: YES + service_account: "crashpad-ci-builder@chops-service-accounts.iam.gserviceaccount.com" + } + builders { + name: "crashpad_ios_arm64_dbg" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "cpu:x86-64" + dimensions: "os:Mac-10.15" + dimensions: "pool:luci.flex.ci" + recipe { + name: "crashpad/build" + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" + cipd_version: "refs/heads/main" + properties_j: "$gatekeeper:{\"group\":\"client.crashpad\"}" + properties_j: "$kitchen:{\"devshell\":true,\"git_auth\":true}" + properties_j: "config:\"Debug\"" + properties_j: "target_cpu:\"arm64\"" + properties_j: "target_os:\"ios\"" + } + execution_timeout_secs: 10800 + caches { + name: "osx_sdk_ios" + path: "osx_sdk" + } + build_numbers: YES + service_account: "crashpad-ci-builder@chops-service-accounts.iam.gserviceaccount.com" + } + builders { + name: "crashpad_ios_arm64_rel" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "cpu:x86-64" + dimensions: "os:Mac-10.15" + dimensions: "pool:luci.flex.ci" + recipe { + name: "crashpad/build" + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" + cipd_version: "refs/heads/main" + properties_j: "$gatekeeper:{\"group\":\"client.crashpad\"}" + properties_j: "$kitchen:{\"devshell\":true,\"git_auth\":true}" + properties_j: "config:\"Release\"" + properties_j: "target_cpu:\"arm64\"" + properties_j: "target_os:\"ios\"" + } + execution_timeout_secs: 10800 + caches { + name: "osx_sdk_ios" + path: "osx_sdk" + } + build_numbers: YES + service_account: "crashpad-ci-builder@chops-service-accounts.iam.gserviceaccount.com" + } + builders { + name: "crashpad_ios_x64_dbg" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "cpu:x86-64" + dimensions: "os:Mac-10.15" + dimensions: "pool:luci.flex.ci" + recipe { + name: "crashpad/build" + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" + cipd_version: "refs/heads/main" + properties_j: "$gatekeeper:{\"group\":\"client.crashpad\"}" + properties_j: "$kitchen:{\"devshell\":true,\"git_auth\":true}" + properties_j: "config:\"Debug\"" + properties_j: "target_os:\"ios\"" + } + execution_timeout_secs: 10800 + caches { + name: "osx_sdk_ios" + path: "osx_sdk" + } + build_numbers: YES + service_account: "crashpad-ci-builder@chops-service-accounts.iam.gserviceaccount.com" + } + builders { + name: "crashpad_ios_x64_rel" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "cpu:x86-64" + dimensions: "os:Mac-10.15" + dimensions: "pool:luci.flex.ci" + recipe { + name: "crashpad/build" + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" + cipd_version: "refs/heads/main" + properties_j: "$gatekeeper:{\"group\":\"client.crashpad\"}" + properties_j: "$kitchen:{\"devshell\":true,\"git_auth\":true}" + properties_j: "config:\"Release\"" + properties_j: "target_os:\"ios\"" + } + execution_timeout_secs: 10800 + caches { + name: "osx_sdk_ios" + path: "osx_sdk" + } + build_numbers: YES + service_account: "crashpad-ci-builder@chops-service-accounts.iam.gserviceaccount.com" + } + builders { + name: "crashpad_linux_x64_dbg" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "cores:8" + dimensions: "cpu:x86-64" + dimensions: "os:Ubuntu-16.04" + dimensions: "pool:luci.flex.ci" + recipe { + name: "crashpad/build" + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" + cipd_version: "refs/heads/main" + properties_j: "$gatekeeper:{\"group\":\"client.crashpad\"}" + properties_j: "$kitchen:{\"devshell\":true,\"git_auth\":true}" + properties_j: "config:\"Debug\"" + properties_j: "target_os:\"linux\"" + } + execution_timeout_secs: 10800 + build_numbers: YES + service_account: "crashpad-ci-builder@chops-service-accounts.iam.gserviceaccount.com" + } + builders { + name: "crashpad_linux_x64_rel" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "cores:8" + dimensions: "cpu:x86-64" + dimensions: "os:Ubuntu-16.04" + dimensions: "pool:luci.flex.ci" + recipe { + name: "crashpad/build" + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" + cipd_version: "refs/heads/main" + properties_j: "$gatekeeper:{\"group\":\"client.crashpad\"}" + properties_j: "$kitchen:{\"devshell\":true,\"git_auth\":true}" + properties_j: "config:\"Release\"" + properties_j: "target_os:\"linux\"" + } + execution_timeout_secs: 10800 + build_numbers: YES + service_account: "crashpad-ci-builder@chops-service-accounts.iam.gserviceaccount.com" + } + builders { + name: "crashpad_mac_x64_dbg" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "cpu:x86-64" + dimensions: "os:Mac-10.15" + dimensions: "pool:luci.flex.ci" + recipe { + name: "crashpad/build" + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" + cipd_version: "refs/heads/main" + properties_j: "$gatekeeper:{\"group\":\"client.crashpad\"}" + properties_j: "$kitchen:{\"devshell\":true,\"git_auth\":true}" + properties_j: "config:\"Debug\"" + properties_j: "target_os:\"mac\"" + } + execution_timeout_secs: 10800 + caches { + name: "osx_sdk_mac" + path: "osx_sdk" + } + build_numbers: YES + service_account: "crashpad-ci-builder@chops-service-accounts.iam.gserviceaccount.com" + } + builders { + name: "crashpad_mac_x64_rel" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "cpu:x86-64" + dimensions: "os:Mac-10.15" + dimensions: "pool:luci.flex.ci" + recipe { + name: "crashpad/build" + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" + cipd_version: "refs/heads/main" + properties_j: "$gatekeeper:{\"group\":\"client.crashpad\"}" + properties_j: "$kitchen:{\"devshell\":true,\"git_auth\":true}" + properties_j: "config:\"Release\"" + properties_j: "target_os:\"mac\"" + } + execution_timeout_secs: 10800 + caches { + name: "osx_sdk_mac" + path: "osx_sdk" + } + build_numbers: YES + service_account: "crashpad-ci-builder@chops-service-accounts.iam.gserviceaccount.com" + } + builders { + name: "crashpad_win_x64_dbg" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "cores:8" + dimensions: "cpu:x86-64" + dimensions: "os:Windows-10" + dimensions: "pool:luci.flex.ci" + recipe { + name: "crashpad/build" + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" + cipd_version: "refs/heads/main" + properties_j: "$gatekeeper:{\"group\":\"client.crashpad\"}" + properties_j: "$kitchen:{\"devshell\":true,\"git_auth\":true}" + properties_j: "config:\"Debug\"" + properties_j: "target_os:\"win\"" + } + execution_timeout_secs: 10800 + build_numbers: YES + service_account: "crashpad-ci-builder@chops-service-accounts.iam.gserviceaccount.com" + } + builders { + name: "crashpad_win_x64_rel" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "cores:8" + dimensions: "cpu:x86-64" + dimensions: "os:Windows-10" + dimensions: "pool:luci.flex.ci" + recipe { + name: "crashpad/build" + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" + cipd_version: "refs/heads/main" + properties_j: "$gatekeeper:{\"group\":\"client.crashpad\"}" + properties_j: "$kitchen:{\"devshell\":true,\"git_auth\":true}" + properties_j: "config:\"Release\"" + properties_j: "target_os:\"win\"" + } + execution_timeout_secs: 10800 + build_numbers: YES + service_account: "crashpad-ci-builder@chops-service-accounts.iam.gserviceaccount.com" + } + } +} +buckets { + name: "try" + acls { + role: WRITER + group: "project-crashpad-admins" + } + acls { + role: WRITER + group: "service-account-crashpad-cq" + } + acls { + group: "all" + } + acls { + role: SCHEDULER + group: "project-crashpad-tryjob-access" + } + acls { + role: SCHEDULER + group: "service-account-cq" + } + swarming { + builders { + name: "crashpad_fuchsia_arm64_dbg" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "cores:8" + dimensions: "cpu:x86-64" + dimensions: "os:Ubuntu-16.04" + dimensions: "pool:luci.flex.try" + recipe { + name: "crashpad/build" + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" + cipd_version: "refs/heads/main" + properties_j: "$kitchen:{\"devshell\":true,\"git_auth\":true}" + properties_j: "config:\"Debug\"" + properties_j: "target_cpu:\"arm64\"" + properties_j: "target_os:\"fuchsia\"" + } + execution_timeout_secs: 10800 + build_numbers: YES + service_account: "crashpad-try-builder@chops-service-accounts.iam.gserviceaccount.com" + } + builders { + name: "crashpad_fuchsia_arm64_rel" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "cores:8" + dimensions: "cpu:x86-64" + dimensions: "os:Ubuntu-16.04" + dimensions: "pool:luci.flex.try" + recipe { + name: "crashpad/build" + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" + cipd_version: "refs/heads/main" + properties_j: "$kitchen:{\"devshell\":true,\"git_auth\":true}" + properties_j: "config:\"Release\"" + properties_j: "target_cpu:\"arm64\"" + properties_j: "target_os:\"fuchsia\"" + } + execution_timeout_secs: 10800 + build_numbers: YES + service_account: "crashpad-try-builder@chops-service-accounts.iam.gserviceaccount.com" + } + builders { + name: "crashpad_fuchsia_x64_dbg" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "cores:8" + dimensions: "cpu:x86-64" + dimensions: "os:Ubuntu-16.04" + dimensions: "pool:luci.flex.try" + recipe { + name: "crashpad/build" + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" + cipd_version: "refs/heads/main" + properties_j: "$kitchen:{\"devshell\":true,\"git_auth\":true}" + properties_j: "config:\"Debug\"" + properties_j: "target_os:\"fuchsia\"" + } + execution_timeout_secs: 10800 + build_numbers: YES + service_account: "crashpad-try-builder@chops-service-accounts.iam.gserviceaccount.com" + } + builders { + name: "crashpad_fuchsia_x64_rel" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "cores:8" + dimensions: "cpu:x86-64" + dimensions: "os:Ubuntu-16.04" + dimensions: "pool:luci.flex.try" + recipe { + name: "crashpad/build" + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" + cipd_version: "refs/heads/main" + properties_j: "$kitchen:{\"devshell\":true,\"git_auth\":true}" + properties_j: "config:\"Release\"" + properties_j: "target_os:\"fuchsia\"" + } + execution_timeout_secs: 10800 + build_numbers: YES + service_account: "crashpad-try-builder@chops-service-accounts.iam.gserviceaccount.com" + } + builders { + name: "crashpad_ios_arm64_dbg" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "cpu:x86-64" + dimensions: "os:Mac-10.15" + dimensions: "pool:luci.flex.try" + recipe { + name: "crashpad/build" + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" + cipd_version: "refs/heads/main" + properties_j: "$kitchen:{\"devshell\":true,\"git_auth\":true}" + properties_j: "config:\"Debug\"" + properties_j: "target_cpu:\"arm64\"" + properties_j: "target_os:\"ios\"" + } + execution_timeout_secs: 10800 + caches { + name: "osx_sdk_ios" + path: "osx_sdk" + } + build_numbers: YES + service_account: "crashpad-try-builder@chops-service-accounts.iam.gserviceaccount.com" + } + builders { + name: "crashpad_ios_arm64_rel" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "cpu:x86-64" + dimensions: "os:Mac-10.15" + dimensions: "pool:luci.flex.try" + recipe { + name: "crashpad/build" + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" + cipd_version: "refs/heads/main" + properties_j: "$kitchen:{\"devshell\":true,\"git_auth\":true}" + properties_j: "config:\"Release\"" + properties_j: "target_cpu:\"arm64\"" + properties_j: "target_os:\"ios\"" + } + execution_timeout_secs: 10800 + caches { + name: "osx_sdk_ios" + path: "osx_sdk" + } + build_numbers: YES + service_account: "crashpad-try-builder@chops-service-accounts.iam.gserviceaccount.com" + } + builders { + name: "crashpad_ios_x64_dbg" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "cpu:x86-64" + dimensions: "os:Mac-10.15" + dimensions: "pool:luci.flex.try" + recipe { + name: "crashpad/build" + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" + cipd_version: "refs/heads/main" + properties_j: "$kitchen:{\"devshell\":true,\"git_auth\":true}" + properties_j: "config:\"Debug\"" + properties_j: "target_os:\"ios\"" + } + execution_timeout_secs: 10800 + caches { + name: "osx_sdk_ios" + path: "osx_sdk" + } + build_numbers: YES + service_account: "crashpad-try-builder@chops-service-accounts.iam.gserviceaccount.com" + } + builders { + name: "crashpad_ios_x64_rel" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "cpu:x86-64" + dimensions: "os:Mac-10.15" + dimensions: "pool:luci.flex.try" + recipe { + name: "crashpad/build" + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" + cipd_version: "refs/heads/main" + properties_j: "$kitchen:{\"devshell\":true,\"git_auth\":true}" + properties_j: "config:\"Release\"" + properties_j: "target_os:\"ios\"" + } + execution_timeout_secs: 10800 + caches { + name: "osx_sdk_ios" + path: "osx_sdk" + } + build_numbers: YES + service_account: "crashpad-try-builder@chops-service-accounts.iam.gserviceaccount.com" + } + builders { + name: "crashpad_linux_x64_dbg" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "cores:8" + dimensions: "cpu:x86-64" + dimensions: "os:Ubuntu-16.04" + dimensions: "pool:luci.flex.try" + recipe { + name: "crashpad/build" + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" + cipd_version: "refs/heads/main" + properties_j: "$kitchen:{\"devshell\":true,\"git_auth\":true}" + properties_j: "config:\"Debug\"" + properties_j: "target_os:\"linux\"" + } + execution_timeout_secs: 10800 + build_numbers: YES + service_account: "crashpad-try-builder@chops-service-accounts.iam.gserviceaccount.com" + } + builders { + name: "crashpad_linux_x64_rel" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "cores:8" + dimensions: "cpu:x86-64" + dimensions: "os:Ubuntu-16.04" + dimensions: "pool:luci.flex.try" + recipe { + name: "crashpad/build" + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" + cipd_version: "refs/heads/main" + properties_j: "$kitchen:{\"devshell\":true,\"git_auth\":true}" + properties_j: "config:\"Release\"" + properties_j: "target_os:\"linux\"" + } + execution_timeout_secs: 10800 + build_numbers: YES + service_account: "crashpad-try-builder@chops-service-accounts.iam.gserviceaccount.com" + } + builders { + name: "crashpad_mac_x64_dbg" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "cpu:x86-64" + dimensions: "os:Mac-10.15" + dimensions: "pool:luci.flex.try" + recipe { + name: "crashpad/build" + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" + cipd_version: "refs/heads/main" + properties_j: "$kitchen:{\"devshell\":true,\"git_auth\":true}" + properties_j: "config:\"Debug\"" + properties_j: "target_os:\"mac\"" + } + execution_timeout_secs: 10800 + caches { + name: "osx_sdk_mac" + path: "osx_sdk" + } + build_numbers: YES + service_account: "crashpad-try-builder@chops-service-accounts.iam.gserviceaccount.com" + } + builders { + name: "crashpad_mac_x64_rel" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "cpu:x86-64" + dimensions: "os:Mac-10.15" + dimensions: "pool:luci.flex.try" + recipe { + name: "crashpad/build" + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" + cipd_version: "refs/heads/main" + properties_j: "$kitchen:{\"devshell\":true,\"git_auth\":true}" + properties_j: "config:\"Release\"" + properties_j: "target_os:\"mac\"" + } + execution_timeout_secs: 10800 + caches { + name: "osx_sdk_mac" + path: "osx_sdk" + } + build_numbers: YES + service_account: "crashpad-try-builder@chops-service-accounts.iam.gserviceaccount.com" + } + builders { + name: "crashpad_win_x64_dbg" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "cores:8" + dimensions: "cpu:x86-64" + dimensions: "os:Windows-10" + dimensions: "pool:luci.flex.try" + recipe { + name: "crashpad/build" + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" + cipd_version: "refs/heads/main" + properties_j: "$kitchen:{\"devshell\":true,\"git_auth\":true}" + properties_j: "config:\"Debug\"" + properties_j: "target_os:\"win\"" + } + execution_timeout_secs: 10800 + build_numbers: YES + service_account: "crashpad-try-builder@chops-service-accounts.iam.gserviceaccount.com" + } + builders { + name: "crashpad_win_x64_rel" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "cores:8" + dimensions: "cpu:x86-64" + dimensions: "os:Windows-10" + dimensions: "pool:luci.flex.try" + recipe { + name: "crashpad/build" + cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" + cipd_version: "refs/heads/main" + properties_j: "$kitchen:{\"devshell\":true,\"git_auth\":true}" + properties_j: "config:\"Release\"" + properties_j: "target_os:\"win\"" + } + execution_timeout_secs: 10800 + build_numbers: YES + service_account: "crashpad-try-builder@chops-service-accounts.iam.gserviceaccount.com" + } + } +} diff --git a/infra/config/generated/project.cfg b/infra/config/generated/project.cfg new file mode 100644 index 00000000..b68f45b7 --- /dev/null +++ b/infra/config/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: "crashpad" +access: "group:all" diff --git a/infra/config/main.star b/infra/config/main.star new file mode 100644 index 00000000..280de797 --- /dev/null +++ b/infra/config/main.star @@ -0,0 +1,166 @@ +#!/usr/bin/env lucicfg +# Copyright 2021 The Crashpad Authors. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +luci.project( + name = "crashpad", + buildbucket = "cr-buildbucket.appspot.com", + swarming = "chromium-swarm.appspot.com", + acls = [ + acl.entry( + roles = [ + acl.LOGDOG_READER, + acl.PROJECT_CONFIGS_READER, + acl.SCHEDULER_READER, + acl.BUILDBUCKET_READER, + ], + groups = "all", + ), + ], +) + +luci.bucket( + name = "ci", + acls = [ + acl.entry( + acl.BUILDBUCKET_OWNER, + groups = "project-crashpad-admins", + ), + acl.entry( + acl.BUILDBUCKET_TRIGGERER, + users = "luci-scheduler@appspot.gserviceaccount.com", + ), + ], +) + +luci.bucket( + name = "try", + acls = [ + acl.entry( + acl.BUILDBUCKET_OWNER, + groups = [ + "service-account-crashpad-cq", + "project-crashpad-admins", + ], + ), + acl.entry( + acl.BUILDBUCKET_TRIGGERER, + groups = "service-account-cq", + ), + acl.entry( + acl.BUILDBUCKET_TRIGGERER, + groups = "project-crashpad-tryjob-access", + ), + ], +) + +def crashpad_recipe(): + return luci.recipe( + name = "crashpad/build", + cipd_package = "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build", + ) + +def crashpad_caches(platform): + if platform == "ios": + return [swarming.cache("osx_sdk", name = "osx_sdk_ios")] + elif platform == "mac": + return [swarming.cache("osx_sdk", name = "osx_sdk_mac")] + +def crashpad_dimensions(platform, bucket): + dimensions = {} + dimensions["cpu"] = "x86-64" + dimensions["pool"] = "luci.flex." + bucket + + if platform == "fuchsia": + dimensions["os"] = "Ubuntu-16.04" + elif platform == "ios": + dimensions["os"] = "Mac-10.15" + elif platform == "linux": + dimensions["os"] = "Ubuntu-16.04" + elif platform == "mac": + dimensions["os"] = "Mac-10.15" + elif platform == "win": + dimensions["os"] = "Windows-10" + + if platform == "fuchsia" or platform == "linux" or platform == "win": + dimensions["cores"] = "8" + + return dimensions + +def crashpad_properties(platform, cpu, config, bucket): + properties = {} + properties["target_os"] = platform + properties["$kitchen"] = { + "devshell": True, + "git_auth": True, + } + + if cpu != "x64": + properties["target_cpu"] = cpu + + if bucket == "ci": + properties["$gatekeeper"] = { + "group": "client.crashpad", + } + + if config == "dbg": + properties["config"] = "Debug" + elif config == "rel": + properties["config"] = "Release" + + return properties + +def crashpad_builder(platform, cpu, config, bucket): + return luci.builder( + name = "_".join(["crashpad", platform, cpu, config]), + bucket = bucket, + executable = crashpad_recipe(), + build_numbers = True, + caches = crashpad_caches(platform), + dimensions = crashpad_dimensions(platform, bucket), + execution_timeout = 3 * time.hour, + properties = crashpad_properties(platform, cpu, config, bucket), + service_account = "crashpad-" + bucket + + "-builder@chops-service-accounts.iam.gserviceaccount.com", + ) + +crashpad_builder("fuchsia", "arm64", "dbg", "ci") +crashpad_builder("fuchsia", "arm64", "rel", "ci") +crashpad_builder("fuchsia", "x64", "dbg", "ci") +crashpad_builder("fuchsia", "x64", "rel", "ci") +crashpad_builder("ios", "arm64", "dbg", "ci") +crashpad_builder("ios", "arm64", "rel", "ci") +crashpad_builder("ios", "x64", "dbg", "ci") +crashpad_builder("ios", "x64", "rel", "ci") +crashpad_builder("linux", "x64", "dbg", "ci") +crashpad_builder("linux", "x64", "rel", "ci") +crashpad_builder("mac", "x64", "dbg", "ci") +crashpad_builder("mac", "x64", "rel", "ci") +crashpad_builder("win", "x64", "dbg", "ci") +crashpad_builder("win", "x64", "rel", "ci") + +crashpad_builder("fuchsia", "arm64", "dbg", "try") +crashpad_builder("fuchsia", "arm64", "rel", "try") +crashpad_builder("fuchsia", "x64", "dbg", "try") +crashpad_builder("fuchsia", "x64", "rel", "try") +crashpad_builder("ios", "arm64", "dbg", "try") +crashpad_builder("ios", "arm64", "rel", "try") +crashpad_builder("ios", "x64", "dbg", "try") +crashpad_builder("ios", "x64", "rel", "try") +crashpad_builder("linux", "x64", "dbg", "try") +crashpad_builder("linux", "x64", "rel", "try") +crashpad_builder("mac", "x64", "dbg", "try") +crashpad_builder("mac", "x64", "rel", "try") +crashpad_builder("win", "x64", "dbg", "try") +crashpad_builder("win", "x64", "rel", "try")