| // 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 recipes.fuchsia.fuchsia.spec; // `from PB.recipes.fuchsia.fuchsia.spec import Fuchsia` |
| |
| option go_package = "recipes"; |
| |
| // Fuchsia fully describes how to execute a Fuchsia CI/CQ task. It defines the |
| // schema used by the properties that are consumed by the fuchsia recipes. |
| // |
| // WARNING: This message's schema is used for deserializing jsonpb properties. |
| // Many of the backwards-compatibility guarantees provided by protobufs only |
| // apply when using binary encoding, not when using JSON. For example, renaming |
| // a field or marking a field as "reserved" in this message will break |
| // deserialization of any JSON protos that have that field set. Be very careful |
| // when making changes to fields in this message. |
| 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/65086): Delete in favor of artifact_gcs_bucket. |
| string gcs_bucket = 4; |
| |
| // The GCS bucket to upload build artifacts to. |
| string artifact_gcs_bucket = 5; |
| |
| // The CIPD package base prefix to release all boards specified in the |
| // `boards.json` build API module. No upload will happen if this is empty. |
| string board_cipd_prefix = 6; |
| |
| // The CIPD package base prefix to release all partition configs specified in |
| // the `partitions.json` build API module. |
| // No upload will happen if this is empty. |
| string partitions_cipd_prefix = 7; |
| |
| // Describes how to fetch the Fuchsia build inputs. |
| message Checkout { |
| // Jiri <package> attribute 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; |
| |
| // The name of the integration project. |
| string project = 2; |
| |
| // The name of the manifest to import from the integration repository. |
| string manifest = 3; |
| |
| // The remote integration manifest repository. |
| string remote = 4; |
| |
| // Whether or not checkout is a release version. |
| bool is_release_version = 5; |
| |
| // Whether to ignore patch failures resulting from the affected project not |
| // existing in the checkout. This is generally not desirable since such a |
| // failure often indicates a configuration bug that should be fixed, but if |
| // such a failure it happens in a subbuild that's using a different checkout |
| // from the parent, it may be safe to ignore. |
| bool allow_skipping_patch = 6; |
| |
| // Whether to enable submodules in jiri checkout. |
| bool enable_submodules = 7; |
| |
| // Whether to not rebase the patch on top of HEAD. This is useful for |
| // coverage builders which would want to collect data based on the line |
| // numbers of the uploaded patchset as is instead of having it rebased on |
| // top of HEAD which could change the line numbers and make the coverage |
| // data not align. |
| bool do_not_rebase_patch = 8; |
| } |
| |
| // Describes how to build Fuchsia. |
| message Build { |
| // The path within the checkout to a textproto file containing build |
| // parameters to pass to fint. |
| string fint_params_path = 1; |
| |
| // Tags of environments on which the testsharder will key |
| repeated string environment_tags = 2; |
| |
| // Whether to run any tests. |
| bool run_tests = 3; |
| |
| // Whether build is an SDK subbuild. |
| bool sdk_subbuild = 4; |
| |
| // Whether or not to upload build results to cloud storage. |
| // If true, gcs_bucket must be set. |
| bool upload_results = 5; |
| |
| // Whether to sign the artifacts. |
| bool sign_artifacts = 6; |
| |
| // How long to wait until timing out `fint build`. |
| int32 timeout_secs = 7; |
| |
| // Whether to perform an incremental build. |
| // TODO(olivernewman): This field no longer affects the behavior of the |
| // `build` recipe module, only the `checkout` recipe module. Replace it with |
| // an appropriately named `Checkout` field. |
| bool incremental = 8; |
| |
| // CI bucket of the builder to use for size diffing. This field controls |
| // whether a size diff will be computed. |
| string size_diff_ci_bucket = 9; |
| |
| // CI builder name of the builder to use for size diffing. This can be set |
| // to override the default of using the current builder's name. |
| string size_diff_ci_builder = 10; |
| |
| // The review label to use for size creep exemption. This field controls |
| // whether size creep budgets are enforced. |
| string size_creep_label = 11; |
| |
| // The CIPD package to which assembly inputs should be uploaded. No upload |
| // will happen if this is empty. |
| string assembly_artifacts_cipd_package = 12; |
| |
| // Whether to send binary size report to Gerrit and BigQuery. |
| bool report_binary_sizes = 13; |
| |
| // Whether to enforce size budgets. |
| bool check_size_budgets = 14; |
| |
| // Whether to run builds in a sandbox. |
| bool enable_sandboxing = 15; |
| } |
| |
| // Describes how to test Fuchsia. |
| message Test { |
| // Whether to pave images the device for testing. (Ignored if |
| // device_type == QEMU) |
| bool pave = 1; |
| |
| // Swarming pool from which a test task will be drawn |
| string pool = 2; |
| |
| // How long to wait for Swarming to find a bot on which to test |
| int32 swarming_expiration_timeout_secs = 3; |
| |
| // How long to wait (in seconds) before killing the test |
| // swarming task if there's no output being produced |
| int32 swarming_io_timeout_secs = 4; |
| |
| // How long to wait until sending SIGKILL to a killed Swarming task, |
| // allowing the task to perform clean-up operations. |
| int32 swarming_grace_period_secs = 5; |
| |
| // How long to wait after timeout_secs to allow botanist to handle the |
| // timeout itself. |
| int32 botanist_grace_period_secs = 6; |
| |
| // How long to wait until timing out on tests. |
| int32 timeout_secs = 7; |
| |
| // Target max number of tests in a given testing swarming task. |
| // Should be used with target_shard_duration_secs to further |
| // limit the shard size and increase the number of shards if |
| // it fits within the max shards per env. |
| int32 max_shard_size = 8; |
| |
| // Maximum number of attempts to make for each individual shard. |
| // 1 means that shards will not be retried if they fail. |
| // |
| // If this protobuf field is 0 (the default for this field), the recipe |
| // will use a non-zero default for the maximum number of attempts. |
| int32 max_attempts = 9; |
| |
| // A default service account to attach to test tasks; used for shards that |
| // do not specify one themselves. |
| string default_service_account = 10; |
| |
| // Any test that executes for longer than this will be considered failed. |
| // 0 means no timeout. |
| uint32 per_test_timeout_secs = 11; |
| |
| // Whether or not to upload build results to cloud storage. |
| // If true, gcs_bucket must be set. |
| bool upload_results = 12; |
| |
| // Whether the test task needs to require a device with serial, QEMU |
| // conventionally always having 'serial' enabled. |
| bool targets_serial = 13; |
| |
| // If >0, will distribute tests into shards that are each expected to take |
| // approximately this duration. |
| uint32 target_shard_duration_secs = 14; |
| |
| // Maximum number of shards allowed per test environment. If 0, will not |
| // pass a max to testsharder (so testsharder will use the hardcoded default |
| // max). If <0, testsharder will not set a max at all. |
| int32 max_shards_per_env = 15; |
| |
| // These two fields specify the names the builder should use when |
| // uploading performance test results to the Catapult performance |
| // dashboard. If these are absent, the builder should not upload |
| // results to Catapult. |
| // |
| // These correspond to the "masters" and "bots" fields described here: |
| // https://fuchsia.googlesource.com/fuchsia/+/main/src/testing/catapult_converter/README.md |
| // https://chromium.googlesource.com/catapult/+/main/docs/how-to-write-metrics.md |
| string catapult_dashboard_master = 16; |
| string catapult_dashboard_bot = 17; |
| |
| // Kernel command-line arguments to pass on boot. |
| repeated string zircon_args = 18; |
| |
| // Maximum number of attempts for running each individual test within a |
| // Swarming task (shard). A value of 0 is treated as 1. |
| // |
| // Setting this to 0 or 1 disables retries within tasks, but retries of |
| // whole tasks may still be enabled via retry_task_on_test_failure. |
| int32 max_attempts_per_test = 19; |
| |
| // Whether to enable task-level retries for test failures. |
| bool retry_task_on_test_failure = 20; |
| |
| // If >0, and the number of affected tests is <= this threshold, then |
| // the recipe will tell testsharder to multiply the affected tests. |
| uint32 affected_tests_multiply_threshold = 21; |
| |
| // Describes how to interact with the GCE Mediator to test Fuchsia on GCE. |
| message GCEMediator { |
| // URL of the GCE Mediator endpoint. |
| string endpoint = 1; |
| // Cloud project to create Fuchsia VMs in. |
| string cloud_project = 2; |
| // TODO(https://fxbug.dev/82640): Move this to test specs. |
| string machine_shape = 3; |
| } |
| GCEMediator gce_mediator = 22; |
| |
| // The level of experimental ffx features to enable in infra. |
| int32 ffx_experiment_level = 23; |
| |
| // Whether to use CAS to transfer test artifacts. |
| bool use_cas = 24; |
| |
| // Whether to use CAS to transfer images. |
| bool use_cas_for_images = 25; |
| |
| // A list of device types to NOT run tests on. |
| // This should only be used to avoid running on physical devices where |
| // there are capacity concerns. |
| repeated string disabled_device_types = 26; |
| |
| // Whether to upload GCE images and run tests on GCE (by default, any shards |
| // with device_type=GCE will be skipped). |
| // TODO(https://fxbug.dev/9127): Remove when it's the default. |
| bool test_on_gce = 27; |
| |
| // Whether to skip running unaffected tests. |
| bool skip_unaffected_tests = 28; |
| |
| // Whether to generate per-shard package repositories to serve artifacts. |
| bool per_shard_package_repos = 29; |
| |
| // Whether to cache test packages locally in each shard. |
| bool cache_test_packages = 30; |
| |
| // Whether to enable sandboxing for host tests. |
| bool enable_sandboxing = 31; |
| |
| // Whether to run emulators using TCG. |
| bool use_tcg = 32; |
| |
| // Target number of tests in a given testing swarming task. |
| // Either this or target_shard_duration_secs should be set, not both. |
| int32 target_test_count = 33; |
| |
| // Whether to upload test results from swarming. |
| bool upload_results_from_swarming = 34; |
| } |
| } |