diff --git a/infra/README.recipes.md b/infra/README.recipes.md index 57d645cabe..9724e5e81e 100644 --- a/infra/README.recipes.md +++ b/infra/README.recipes.md @@ -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] diff --git a/infra/config/generated/cr-buildbucket.cfg b/infra/config/generated/cr-buildbucket.cfg index f8f80ad5f2..4fb4da040a 100644 --- a/infra/config/generated/cr-buildbucket.cfg +++ b/infra/config/generated/cr-buildbucket.cfg @@ -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" diff --git a/infra/config/generated/luci-milo.cfg b/infra/config/generated/luci-milo.cfg index 8dd2d0263a..dad236175d 100644 --- a/infra/config/generated/luci-milo.cfg +++ b/infra/config/generated/luci-milo.cfg @@ -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" diff --git a/infra/config/generated/luci-notify.cfg b/infra/config/generated/luci-notify.cfg index c6d6cd567a..d683135789 100644 --- a/infra/config/generated/luci-notify.cfg +++ b/infra/config/generated/luci-notify.cfg @@ -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 diff --git a/infra/config/generated/luci-scheduler.cfg b/infra/config/generated/luci-scheduler.cfg index 7c6c76f4c7..e97c78b191 100644 --- a/infra/config/generated/luci-scheduler.cfg +++ b/infra/config/generated/luci-scheduler.cfg @@ -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" diff --git a/infra/config/generated/project.cfg b/infra/config/generated/project.cfg index 4171882aee..d9e31939b3 100644 --- a/infra/config/generated/project.cfg +++ b/infra/config/generated/project.cfg @@ -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" diff --git a/infra/config/main.star b/infra/config/main.star index eb600abd31..e39fbd5d46 100755 --- a/infra/config/main.star +++ b/infra/config/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 = { diff --git a/infra/recipes/build_chromeos.expected/build_default.json b/infra/recipes/build_chromeos.expected/build_default.json deleted file mode 100644 index 506889b26c..0000000000 --- a/infra/recipes/build_chromeos.expected/build_default.json +++ /dev/null @@ -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" - } -] \ No newline at end of file diff --git a/infra/recipes/build_chromeos.proto b/infra/recipes/build_chromeos.proto deleted file mode 100644 index b917d89f14..0000000000 --- a/infra/recipes/build_chromeos.proto +++ /dev/null @@ -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; -} diff --git a/infra/recipes/build_chromeos.py b/infra/recipes/build_chromeos.py deleted file mode 100644 index e313219256..0000000000 --- a/infra/recipes/build_chromeos.py +++ /dev/null @@ -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")