mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-05 18:20:34 +00:00
323d267a8c
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>
51 lines
1.3 KiB
Python
51 lines
1.3 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):
|
|
# Note: The recipe does work on linux as well, if the required dependencies have been installed
|
|
# on the host via ./tools/install-deps.
|
|
# This allows the build to be tested via `./recipe.py run build_windows`
|
|
with api.crosvm.host_build_context():
|
|
api.step(
|
|
"Build crosvm tests",
|
|
[
|
|
"vpython3",
|
|
"./tools/run_tests",
|
|
"--verbose",
|
|
"--target=host",
|
|
"--build-only",
|
|
],
|
|
)
|
|
api.step(
|
|
"Run crosvm tests",
|
|
[
|
|
"vpython3",
|
|
"./tools/run_tests",
|
|
"--target=host",
|
|
],
|
|
)
|
|
|
|
|
|
def GenTests(api):
|
|
filter_steps = Filter("Build crosvm tests", "Run crosvm tests")
|
|
yield (
|
|
api.test(
|
|
"build",
|
|
api.buildbucket.ci_build(project="crosvm/crosvm"),
|
|
)
|
|
+ api.post_process(filter_steps)
|
|
)
|