blob: 6c6114faa34fef544489afdf92c349bbf9ab1d57 [file] [log] [blame]
// Copyright 2019 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
syntax = "proto3";
package infra.fuchsia; // `from PB.infra.fuchsia import Fuchsia`
option go_package = "recipes";
// Fuchsia fully describes how to execute a Fuchsia CI/CQ task:
//
// * How to fetch the Fuchsia sources.
// * How to build Fuchsia.
// * How to test Fuchsia.
// * How to archive and log outputs to various places.
//
// See the fuchsia.py recipe for full documentation on task execution.
//
// TODO(IN-1102):
//
// * Improve the docs of the fields in this message, since this is the User
// facing API for the recipe.
// * Use Enums instead of strings where appropriate once we have starlark and
// support for human-readable constant values. Enums are just int literals in
// textprotos.
message Fuchsia {
// (required) How to obtain the Fuchsia build inputs. See Checkout docs.
Checkout checkout = 1;
// (required) How to build Fuchsia. See Build docs.
Build build = 2;
// How to test Fuchsia. See Test docs.
Test test = 3;
// The GCS bucket to upload results to.
// TODO(fxbug.dev/37264): consider eventually deprecating in favour of
// artifact_gcs_bucket.
string gcs_bucket = 4;
// The GCS bucket to upload build artifacts to.
string artifact_gcs_bucket = 5;
// The GCS bucket to upload and consume debug symbols.
// TODO(fxbug.dev/37264): eventually deprecate in favour of
// artifact_gcs_bucket.
string debug_symbol_gcs_bucket = 6;
// Describes how to fetch the Fuchsia build inputs.
message Checkout {
// Jiri <package> atttribute values indicating additional packages to fetch
// from the input manifest. By default, packages with attribute tags are
// skipped unless one or more of the attribute values are specified here.
repeated string attributes = 1;
// Whether to checkout from a Jiri snapshot.
bool use_snapshot = 2;
// The name of the manifest to import from the integration repository.
string manifest = 4;
// Jiri remote manifest project,
//
// TODO(IN-1102): This should always be "integration" and is redundant
// because we can select the proper integration repo using the build input.
// Delete this in favor of a hard-coded constant since this value will only
// ever change if we completely restructure our CI/CD model or rename the
// integration repo, and thus this recipe.
string project = 6;
// The remote integration manifest repository.
string remote = 7;
// Whether or not checkout is a release version.
bool is_release_version = 8;
// Whether or not to upload checkout results to cloud storage.
// If true, gcs_bucket must be set.
bool upload_results = 9;
}
// Describes how to build Fuchsia.
message Build {
// The build type
string build_type = 1;
// Board to build
string board = 2;
// GCS bucket for uploading debug symbols.
// TODO: Delete in favor of debug_symbol_gcs_bucket.
string debug_symbol_bucket = 3;
// Tags of environments on which the testsharder will key
repeated string environment_tags = 4;
// Whether to exclude images during the build.
bool exclude_images = 5;
// Extra args to pass to GN.
repeated string gn_args = 6;
// Whether to generate and upload breakpad symbols as part of this build.
bool include_breakpad_symbols = 7;
// Whether to build and upload an archive of debug binaries.
bool include_symbol_archive = 8;
// Extra targets to pass to Ninja.
repeated string ninja_targets = 9;
// A list of Fuchsia packages to build.
repeated string packages = 10;
// The product to build.
string product = 11;
// Whether to run any tests.
bool run_tests = 12;
// The target architecture. One of x64 or arm64.
string target = 13;
// Packages to build and add to the universe set
repeated string universe_packages = 14;
// --variant arguments to GN in `select_variant`
repeated string variants = 15;
// Now unused.
reserved 16;
// Whether to enforce build size limits. By convention,
// we only care about enforcing size limits for production
// images without tests included.
bool enforce_size_limits = 17;
// Whether build is an SDK subbuild.
bool sdk_subbuild = 18;
// The GCS bucket to upload build artifacts to.
// TODO: Delete in favor of artifact_gcs_bucket.
string artifact_gcs_bucket = 19;
// Whether or not to upload build results to cloud storage.
// If true, gcs_bucket must be set.
bool upload_results = 20;
}
// Describes how to test Fuchsia.
message Test {
// The type of device to execute tests on, if the value is
// ot QEMU it will be passed to Swarming as the device_type
// dimension.
string device_type = 1;
// Whether to pave images the device for testing. (Ignored if
// device_type == QEMU)
bool pave = 2;
// Swarming pool from which a test task will be drawn
string pool = 3;
// Shell-quoted string to add to the runtests commandline
string runtests_args = 4;
// Whether any plaintext needs to be supplied to the tests
bool requires_secrets = 5;
// How long to wait for Swarming to find a bot on which to test
int32 swarming_expiration_timeout_secs = 6;
// How long to wait (in seconds) before killing the test
// swarming task if there's no output being produced
int32 swarming_io_timeout_secs = 7;
// Whether to run tests as shards.
bool test_in_shards = 8;
// How long to wait until timing out on tests.
int32 timeout_secs = 9;
// Whether to upload perf results to Catapult
bool upload_to_catapult = 10;
// Maximum number of tests in a given testing swarming task
int32 max_shard_size = 11;
// Maximum number of attempts to make for each individual test or shard.
int32 max_attempts = 12;
// Timeout for collect() calls when using swarming_retry.
int32 collect_timeout_secs = 13;
// Whether to use runtests by default when running fuchsia tests; if false,
// run_test_component will be used.
bool use_runtests = 14;
// A default service account to attach to test tasks; used for shards that do
// not specify one themselves.
string default_service_account = 15;
// Any test that executes for longer than this will be considered failed.
// 0 means no timeout.
uint32 per_test_timeout_secs = 16;
// Whether or not to upload build results to cloud storage.
// If true, gcs_bucket must be set.
bool upload_results = 17;
// Whether or not to pave using images from GCS.
bool pave_from_gcs = 18;
}
}