crosvm/infra/recipes/health_check.py
Dennis Kempin 323d267a8c infra: Add build_windows recipe
Refactors the crosvm recipe API a little to provide 3 different
environments for builds: Just the source, building with containers
and building on the host.

For building on the host, we will install rustup-init via CIPD and
then use rustup to install the required rust version.

BUG=b:233914170
TEST=./recipes.py run build_windows

Change-Id: I12ef22f286af584edeb02beed4d231565b698099
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3718900
Reviewed-by: Vikram Auradkar <auradkar@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-07-01 20:11:59 +00:00

40 lines
1.1 KiB
Python

# Copyright 2022 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from recipe_engine.post_process import Filter
PYTHON_VERSION_COMPATIBILITY = "PY3"
DEPS = [
"crosvm",
"recipe_engine/buildbucket",
"recipe_engine/context",
"recipe_engine/properties",
"recipe_engine/step",
]
def RunSteps(api):
with api.crosvm.container_build_context():
api.step(
"Self-test dev-container",
[
"vpython3",
api.crosvm.source_dir.join("tools/dev_container"),
"--verbose",
"--self-test",
],
)
for check in ("python", "misc", "fmt", "clippy"):
api.crosvm.step_in_container("Checking %s" % check, ["./tools/health-check", check])
def GenTests(api):
yield (
api.test(
"basic",
api.buildbucket.ci_build(project="crosvm/crosvm"),
)
+ api.post_process(Filter().include_re(r"Checking.*"))
)