mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-08 19:33:07 +00:00
infra/recipes: remove original crOS builder
New containerized builder is ready, and the old builder has been red for a long time. BUG=b:240692674 Change-Id: I1b4066c6f12bbfa9f3756ad50c0ceb8a133564c7 Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4004354 Commit-Queue: Dennis Kempin <denniskempin@google.com> Auto-Submit: Zihan Chen <zihanchen@google.com> Reviewed-by: Dennis Kempin <denniskempin@google.com>
This commit is contained in:
parent
6005604ca0
commit
8af881fa56
10 changed files with 1 additions and 393 deletions
|
@ -6,7 +6,6 @@
|
|||
* [crosvm](#recipe_modules-crosvm) (Python3 ✅)
|
||||
|
||||
**[Recipes](#Recipes)**
|
||||
* [build_chromeos](#recipes-build_chromeos) (Python3 ✅)
|
||||
* [build_chromeos_hatch](#recipes-build_chromeos_hatch) (Python3 ✅)
|
||||
* [build_docs](#recipes-build_docs) (Python3 ✅)
|
||||
* [build_linux](#recipes-build_linux) (Python3 ✅)
|
||||
|
@ -102,23 +101,6 @@ Runs a luci step inside the crosvm dev container.
|
|||
— **def [upload\_coverage](/infra/recipe_modules/crosvm/api.py#182)(self, filename):**
|
||||
## Recipes
|
||||
|
||||
### *recipes* / [build\_chromeos](/infra/recipes/build_chromeos.py)
|
||||
|
||||
[DEPS](/infra/recipes/build_chromeos.py#9): [crosvm](#recipe_modules-crosvm), [depot\_tools/depot\_tools][depot_tools/recipe_modules/depot_tools], [recipe\_engine/buildbucket][recipe_engine/recipe_modules/buildbucket], [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/file][recipe_engine/recipe_modules/file], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/properties][recipe_engine/recipe_modules/properties], [recipe\_engine/step][recipe_engine/recipe_modules/step]
|
||||
|
||||
PYTHON_VERSION_COMPATIBILITY: PY3
|
||||
|
||||
— **def [BuildAndTest](/infra/recipes/build_chromeos.py#76)(api, board):**
|
||||
|
||||
— **def [CleanUp](/infra/recipes/build_chromeos.py#101)(api):**
|
||||
|
||||
— **def [PrepareBuild](/infra/recipes/build_chromeos.py#61)(api):**
|
||||
|
||||
— **def [RunSteps](/infra/recipes/build_chromeos.py#106)(api, properties):**
|
||||
|
||||
— **def [SetupSource](/infra/recipes/build_chromeos.py#27)(api, workspace):**
|
||||
|
||||
— **def [TestCrosWorkonFlow](/infra/recipes/build_chromeos.py#89)(api, board):**
|
||||
### *recipes* / [build\_chromeos\_hatch](/infra/recipes/build_chromeos_hatch.py)
|
||||
|
||||
[DEPS](/infra/recipes/build_chromeos_hatch.py#9): [crosvm](#recipe_modules-crosvm), [depot\_tools/depot\_tools][depot_tools/recipe_modules/depot_tools], [recipe\_engine/buildbucket][recipe_engine/recipe_modules/buildbucket], [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/properties][recipe_engine/recipe_modules/properties], [recipe\_engine/step][recipe_engine/recipe_modules/step]
|
||||
|
|
|
@ -35,28 +35,6 @@ buckets {
|
|||
value: 100
|
||||
}
|
||||
}
|
||||
builders {
|
||||
name: "chromeos_amd64-generic"
|
||||
swarming_host: "chromium-swarm.appspot.com"
|
||||
dimensions: "cpu:x86-64"
|
||||
dimensions: "os:Ubuntu"
|
||||
dimensions: "pool:luci.crosvm.ci"
|
||||
exe {
|
||||
cipd_package: "infra/recipe_bundles/chromium.googlesource.com/crosvm/crosvm"
|
||||
cipd_version: "refs/heads/main"
|
||||
cmd: "luciexe"
|
||||
}
|
||||
properties:
|
||||
'{'
|
||||
' "board": "amd64-generic",'
|
||||
' "recipe": "build_chromeos"'
|
||||
'}'
|
||||
service_account: "crosvm-luci-ci-builder@crosvm-infra.iam.gserviceaccount.com"
|
||||
experiments {
|
||||
key: "luci.recipes.use_python3"
|
||||
value: 100
|
||||
}
|
||||
}
|
||||
builders {
|
||||
name: "chromeos_hatch"
|
||||
swarming_host: "chromium-swarm.appspot.com"
|
||||
|
|
|
@ -30,10 +30,6 @@ consoles {
|
|||
name: "buildbucket/luci.crosvm.ci/linux_mingw64"
|
||||
category: "linux"
|
||||
}
|
||||
builders {
|
||||
name: "buildbucket/luci.crosvm.ci/chromeos_amd64-generic"
|
||||
category: "linux"
|
||||
}
|
||||
builders {
|
||||
name: "buildbucket/luci.crosvm.ci/chromeos_hatch"
|
||||
category: "linux"
|
||||
|
|
|
@ -18,21 +18,6 @@ notifiers {
|
|||
repository: "https://chromium.googlesource.com/crosvm/crosvm"
|
||||
}
|
||||
}
|
||||
notifiers {
|
||||
notifications {
|
||||
on_change: true
|
||||
email {
|
||||
recipients: "crosvm-uprev@grotations.appspotmail.com"
|
||||
recipients: "crosvm-uprev-apac@grotations.appspotmail.com"
|
||||
recipients: "denniskempin@google.com"
|
||||
}
|
||||
}
|
||||
builders {
|
||||
bucket: "ci"
|
||||
name: "chromeos_amd64-generic"
|
||||
repository: "https://chromium.googlesource.com/crosvm/crosvm"
|
||||
}
|
||||
}
|
||||
notifiers {
|
||||
notifications {
|
||||
on_change: true
|
||||
|
|
|
@ -14,16 +14,6 @@ job {
|
|||
builder: "build_docs"
|
||||
}
|
||||
}
|
||||
job {
|
||||
id: "chromeos_amd64-generic"
|
||||
realm: "ci"
|
||||
acl_sets: "ci"
|
||||
buildbucket {
|
||||
server: "cr-buildbucket.appspot.com"
|
||||
bucket: "ci"
|
||||
builder: "chromeos_amd64-generic"
|
||||
}
|
||||
}
|
||||
job {
|
||||
id: "chromeos_hatch"
|
||||
realm: "ci"
|
||||
|
@ -130,7 +120,6 @@ trigger {
|
|||
realm: "ci"
|
||||
acl_sets: "ci"
|
||||
triggers: "build_docs"
|
||||
triggers: "chromeos_amd64-generic"
|
||||
triggers: "chromeos_hatch"
|
||||
triggers: "health_check"
|
||||
triggers: "linux_aarch64"
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
name: "crosvm"
|
||||
access: "group:all"
|
||||
lucicfg {
|
||||
version: "1.32.1"
|
||||
version: "1.33.4"
|
||||
package_dir: ".."
|
||||
config_dir: "generated"
|
||||
entry_point: "main.star"
|
||||
|
|
|
@ -277,29 +277,6 @@ def verify_linux_builder(arch, crosvm_direct = False, coverage = True, **kwargs)
|
|||
**kwargs
|
||||
)
|
||||
|
||||
def verify_chromeos_builder(board, **kwargs):
|
||||
"""Creates a verify builder that builds crosvm for ChromeOS
|
||||
|
||||
Args:
|
||||
board: ChromeOS board to build and test
|
||||
**kwargs: Passed to verify_builder
|
||||
"""
|
||||
verify_builder(
|
||||
name = "chromeos_%s" % board,
|
||||
dimensions = {
|
||||
"os": "Ubuntu",
|
||||
"cpu": "x86-64",
|
||||
},
|
||||
executable = luci.recipe(
|
||||
name = "build_chromeos",
|
||||
),
|
||||
properties = {
|
||||
"board": board,
|
||||
},
|
||||
category = "linux",
|
||||
**kwargs
|
||||
)
|
||||
|
||||
def infra_builder(name, postsubmit, **args):
|
||||
"""Creates a ci job to run infra recipes that are not involved in verifying changes.
|
||||
|
||||
|
@ -340,8 +317,6 @@ verify_linux_builder("aarch64")
|
|||
verify_linux_builder("armhf", coverage = False)
|
||||
verify_linux_builder("mingw64", coverage = False)
|
||||
|
||||
verify_chromeos_builder("amd64-generic", presubmit = False)
|
||||
|
||||
verify_builder(
|
||||
name = "chromeos_hatch",
|
||||
dimensions = {
|
||||
|
|
|
@ -1,162 +0,0 @@
|
|||
[
|
||||
{
|
||||
"cmd": [
|
||||
"vpython3",
|
||||
"-u",
|
||||
"RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
|
||||
"--json-output",
|
||||
"/path/to/tmp/json",
|
||||
"ensure-directory",
|
||||
"--mode",
|
||||
"0777",
|
||||
"[CLEANUP]/workspace"
|
||||
],
|
||||
"infra_step": true,
|
||||
"name": "Ensure workspace exists"
|
||||
},
|
||||
{
|
||||
"cmd": [
|
||||
"RECIPE_REPO[depot_tools]/repo",
|
||||
"init",
|
||||
"--manifest-url=https://chromium.googlesource.com/chromiumos/manifest",
|
||||
"--manifest-branch=stable",
|
||||
"--depth=1",
|
||||
"--current-branch",
|
||||
"--groups=minilayout,crosvm"
|
||||
],
|
||||
"cwd": "[CLEANUP]/workspace",
|
||||
"env": {
|
||||
"DEPOT_TOOLS_UPDATE": "0"
|
||||
},
|
||||
"name": "Init repo"
|
||||
},
|
||||
{
|
||||
"cmd": [
|
||||
"RECIPE_REPO[depot_tools]/repo",
|
||||
"sync",
|
||||
"--current-branch"
|
||||
],
|
||||
"cwd": "[CLEANUP]/workspace",
|
||||
"env": {
|
||||
"DEPOT_TOOLS_UPDATE": "0"
|
||||
},
|
||||
"name": "Sync repo"
|
||||
},
|
||||
{
|
||||
"cmd": [
|
||||
"git",
|
||||
"fetch",
|
||||
"https://chromium.googlesource.com/crosvm/crosvm"
|
||||
],
|
||||
"cwd": "[CLEANUP]/workspace/src/platform/crosvm",
|
||||
"env": {
|
||||
"DEPOT_TOOLS_UPDATE": "0"
|
||||
},
|
||||
"name": "Fetch upstream crosvm"
|
||||
},
|
||||
{
|
||||
"cmd": [
|
||||
"git",
|
||||
"checkout",
|
||||
"HEAD"
|
||||
],
|
||||
"cwd": "[CLEANUP]/workspace/src/platform/crosvm",
|
||||
"env": {
|
||||
"DEPOT_TOOLS_UPDATE": "0"
|
||||
},
|
||||
"name": "Checkout upstream revision"
|
||||
},
|
||||
{
|
||||
"cmd": [
|
||||
"./chromite/scripts/cros_uprev",
|
||||
"--package=chromeos-base/crosvm",
|
||||
"--overlay-type=public"
|
||||
],
|
||||
"cwd": "[CLEANUP]/workspace",
|
||||
"env": {
|
||||
"DEPOT_TOOLS_UPDATE": "0"
|
||||
},
|
||||
"name": "Uprev packages"
|
||||
},
|
||||
{
|
||||
"cmd": [
|
||||
"RECIPE_REPO[depot_tools]/cros_sdk",
|
||||
"--create"
|
||||
],
|
||||
"cwd": "[CLEANUP]/workspace",
|
||||
"env": {
|
||||
"DEPOT_TOOLS_UPDATE": "0"
|
||||
},
|
||||
"name": "Create SDK chroot"
|
||||
},
|
||||
{
|
||||
"cmd": [
|
||||
"RECIPE_REPO[depot_tools]/cros_sdk",
|
||||
"build_packages",
|
||||
"--board=amd64-generic",
|
||||
"implicit-system",
|
||||
"chromeos-base/crosvm"
|
||||
],
|
||||
"cwd": "[CLEANUP]/workspace",
|
||||
"env": {
|
||||
"DEPOT_TOOLS_UPDATE": "0"
|
||||
},
|
||||
"name": "Build packages"
|
||||
},
|
||||
{
|
||||
"cmd": [
|
||||
"RECIPE_REPO[depot_tools]/cros_sdk",
|
||||
"cros_run_unit_tests",
|
||||
"--board=amd64-generic",
|
||||
"--packages",
|
||||
"chromeos-base/crosvm"
|
||||
],
|
||||
"cwd": "[CLEANUP]/workspace",
|
||||
"env": {
|
||||
"DEPOT_TOOLS_UPDATE": "0"
|
||||
},
|
||||
"name": "Run unit tests"
|
||||
},
|
||||
{
|
||||
"cmd": [
|
||||
"RECIPE_REPO[depot_tools]/cros_sdk",
|
||||
"cros_workon",
|
||||
"--board=amd64-generic",
|
||||
"start",
|
||||
"crosvm"
|
||||
],
|
||||
"cwd": "[CLEANUP]/workspace",
|
||||
"env": {
|
||||
"DEPOT_TOOLS_UPDATE": "0"
|
||||
},
|
||||
"name": "cros_workon crosvm"
|
||||
},
|
||||
{
|
||||
"cmd": [
|
||||
"RECIPE_REPO[depot_tools]/cros_sdk",
|
||||
"cros_workon_make",
|
||||
"--board=amd64-generic",
|
||||
"--test",
|
||||
"crosvm"
|
||||
],
|
||||
"cwd": "[CLEANUP]/workspace",
|
||||
"env": {
|
||||
"DEPOT_TOOLS_UPDATE": "0"
|
||||
},
|
||||
"name": "cros_workon_make crosvm"
|
||||
},
|
||||
{
|
||||
"cmd": [
|
||||
"RECIPE_REPO[depot_tools]/cros_sdk",
|
||||
"--delete"
|
||||
],
|
||||
"cwd": "[CLEANUP]/workspace",
|
||||
"env": {
|
||||
"DEPOT_TOOLS_UPDATE": "0"
|
||||
},
|
||||
"name": "Deleting SDK chroot"
|
||||
},
|
||||
{
|
||||
"name": "$result"
|
||||
}
|
||||
]
|
|
@ -1,12 +0,0 @@
|
|||
// Copyright 2022 The ChromiumOS Authors
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package recipes.crosvm.build_chromeos;
|
||||
|
||||
message BuildChromeOsProperties {
|
||||
// ChromeOS board to build and test
|
||||
optional string board = 1;
|
||||
}
|
|
@ -1,123 +0,0 @@
|
|||
# Copyright 2022 The ChromiumOS Authors
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
from PB.recipes.crosvm.build_chromeos import BuildChromeOsProperties
|
||||
|
||||
PYTHON_VERSION_COMPATIBILITY = "PY3"
|
||||
|
||||
DEPS = [
|
||||
"crosvm",
|
||||
"depot_tools/depot_tools",
|
||||
"recipe_engine/buildbucket",
|
||||
"recipe_engine/context",
|
||||
"recipe_engine/file",
|
||||
"recipe_engine/path",
|
||||
"recipe_engine/properties",
|
||||
"recipe_engine/step",
|
||||
]
|
||||
|
||||
PROPERTIES = BuildChromeOsProperties
|
||||
|
||||
PACKAGE_LIST = [
|
||||
"chromeos-base/crosvm",
|
||||
]
|
||||
|
||||
|
||||
def SetupSource(api, workspace):
|
||||
repo = api.depot_tools.repo_resource("repo")
|
||||
gitilies = api.buildbucket.build.input.gitiles_commit
|
||||
upstream_url = "https://chromium.googlesource.com/crosvm/crosvm"
|
||||
revision = gitilies.id or "HEAD"
|
||||
|
||||
# Init and sync the ChromeOS checkout
|
||||
api.step(
|
||||
"Init repo",
|
||||
[
|
||||
repo,
|
||||
"init",
|
||||
"--manifest-url=https://chromium.googlesource.com/chromiumos/manifest",
|
||||
"--manifest-branch=stable",
|
||||
"--depth=1",
|
||||
"--current-branch",
|
||||
"--groups=minilayout,crosvm",
|
||||
],
|
||||
)
|
||||
api.step(
|
||||
"Sync repo",
|
||||
[
|
||||
repo,
|
||||
"sync",
|
||||
"--current-branch",
|
||||
],
|
||||
)
|
||||
|
||||
# Overwrite crosvm with the upstream revision we need to test
|
||||
with api.context(cwd=workspace.join("src/platform/crosvm")):
|
||||
api.step("Fetch upstream crosvm", ["git", "fetch", upstream_url])
|
||||
api.step("Checkout upstream revision", ["git", "checkout", revision])
|
||||
|
||||
|
||||
def PrepareBuild(api):
|
||||
# Uprev crosvm related ebuild files
|
||||
api.step(
|
||||
"Uprev packages",
|
||||
[
|
||||
"./chromite/scripts/cros_uprev",
|
||||
"--package=%s" % ",".join(PACKAGE_LIST),
|
||||
"--overlay-type=public",
|
||||
],
|
||||
)
|
||||
# Create chroot as a separate step to document the runtime
|
||||
cros_sdk = api.depot_tools.repo_resource("cros_sdk")
|
||||
api.step("Create SDK chroot", [cros_sdk, "--create"])
|
||||
|
||||
|
||||
def BuildAndTest(api, board):
|
||||
cros_sdk = api.depot_tools.repo_resource("cros_sdk")
|
||||
# TODO: We currently build crosvm twice. Once with build_packages, once to run tests.
|
||||
api.step(
|
||||
"Build packages",
|
||||
[cros_sdk, "build_packages", "--board=%s" % board, "implicit-system"] + PACKAGE_LIST,
|
||||
)
|
||||
api.step(
|
||||
"Run unit tests",
|
||||
[cros_sdk, "cros_run_unit_tests", "--board=%s" % board, "--packages"] + PACKAGE_LIST,
|
||||
)
|
||||
|
||||
|
||||
def TestCrosWorkonFlow(api, board):
|
||||
cros_sdk = api.depot_tools.repo_resource("cros_sdk")
|
||||
api.step(
|
||||
"cros_workon crosvm",
|
||||
[cros_sdk, "cros_workon", "--board=%s" % board, "start", "crosvm"],
|
||||
)
|
||||
api.step(
|
||||
"cros_workon_make crosvm",
|
||||
[cros_sdk, "cros_workon_make", "--board=%s" % board, "--test", "crosvm"],
|
||||
)
|
||||
|
||||
|
||||
def CleanUp(api):
|
||||
cros_sdk = api.depot_tools.repo_resource("cros_sdk")
|
||||
api.step("Deleting SDK chroot", [cros_sdk, "--delete"])
|
||||
|
||||
|
||||
def RunSteps(api, properties):
|
||||
# Use a 'cleanup' path to ensure we are starting with a clean slate on each build.
|
||||
workspace = api.path["cleanup"].join("workspace")
|
||||
api.file.ensure_directory("Ensure workspace exists", workspace)
|
||||
|
||||
with api.context(cwd=workspace, env={"DEPOT_TOOLS_UPDATE": "0"}):
|
||||
try:
|
||||
board = properties.board or "amd64-generic"
|
||||
SetupSource(api, workspace)
|
||||
PrepareBuild(api)
|
||||
BuildAndTest(api, board)
|
||||
TestCrosWorkonFlow(api, board)
|
||||
finally:
|
||||
CleanUp(api)
|
||||
|
||||
|
||||
def GenTests(api):
|
||||
yield api.test("build_default")
|
Loading…
Reference in a new issue