| syntax = "proto3"; |
| package chromite.api; |
| |
| option go_package = "go.chromium.org/chromiumos/infra/proto/go/chromite/api"; |
| |
| import "chromite/api/artifacts.proto"; |
| import "chromite/api/build_api.proto"; |
| import "chromite/api/sysroot.proto"; |
| // TODO(crbug/1027720): Migrate BuilderConfig.Artifacts.ArtifactType to |
| // common.proto, and stop including builder_config.proto. |
| import "chromiumos/builder_config.proto"; |
| import "chromiumos/common.proto"; |
| |
| // Information about a collection of artifacts. |
| message ArtifactInfo { |
| // The ArtifactType. |
| chromiumos.BuilderConfig.Artifacts.ArtifactTypes artifact_type = 1; |
| |
| // Artifacts for this ArtifactType. |
| repeated Artifact artifacts = 2; |
| } |
| |
| // Prepare the build for artifact building. |
| message PrepareForToolchainBuildRequest { |
| // The artifact types that this build should make. |
| repeated chromiumos.BuilderConfig.Artifacts.ArtifactTypes artifact_types = 1; |
| |
| // Note: both chroot and sysroot may be unspecified, when the endpoint is |
| // called prior to their creation. |
| // The chroot where the sysroot lives. |
| chromiumos.Chroot chroot = 2; |
| // The sysroot where the files live. |
| chromite.api.Sysroot sysroot = 3; |
| |
| // Information about artifacts available when preparing. |
| repeated chromiumos.BuilderConfig.Artifacts.InputArtifactInfo input_artifacts = 4; |
| |
| // Additional arguments used in PrepareForBuild. |
| // TODO(crbug/1019868): Transition to artifact_profile_info. |
| chromiumos.PrepareForBuildAdditionalArgs additional_args = 5; |
| |
| // Profile information used for the artifact. |
| chromiumos.ArtifactProfileInfo profile_info = 6; |
| } |
| |
| message PrepareForToolchainBuildResponse { |
| // Does this artifact require a build? See artifacts.proto in this directory. |
| PrepareForBuildResponse.BuildRelevance build_relevance = 1; |
| } |
| |
| message BundleToolchainRequest { |
| // The chroot where the sysroot lives. |
| chromiumos.Chroot chroot = 1; |
| // The sysroot where the files live. |
| chromite.api.Sysroot sysroot = 2; |
| |
| // Absolute path to the directory in which artifacts should be dropped. |
| string output_dir = 3; |
| |
| // Which artifacts are wanted? |
| repeated chromiumos.BuilderConfig.Artifacts.ArtifactTypes artifact_types = 4; |
| |
| // Additional arguments that were used in PrepareForBuild. |
| // TODO(crbug/1019868): Transition to artifact_profile_info. |
| chromiumos.PrepareForBuildAdditionalArgs additional_args = 5; |
| |
| // Profile information used for the artifact. |
| chromiumos.ArtifactProfileInfo profile_info = 6; |
| } |
| |
| // Response describing which bundles were dumped to the given output directory. |
| message BundleToolchainResponse { |
| reserved 1; |
| |
| // The artifacts that added to the output directory. |
| repeated ArtifactInfo artifacts_info = 2; |
| } |
| |
| // TODO(crbug.com/1020615): Drop this once this is live in production and all of |
| // the users have migrated to using BuilderConfig.Artifacts.ArtifactType |
| // Meanwhile, keep this in sync with chromiumos/builder_config.proto. |
| enum AFDOArtifactType { |
| // No AFDO artifact type specified. |
| NONE_TYPE = 0; |
| |
| // The type is orderfile. |
| ORDERFILE = 1; |
| |
| // The type is Chrome AFDO files generated by benchmarks. |
| BENCHMARK_AFDO = 2; |
| |
| // The type is kernel AFDO files. |
| KERNEL_AFDO = 3; |
| |
| // The type is Chrome AFDO used in release builders. |
| CHROME_AFDO = 4; |
| } |
| |
| message VerifyAFDOArtifactsRequest { |
| chromiumos.BuildTarget build_target = 1; |
| // The type of AFDO artifact to test. |
| chromiumos.AFDOArtifactType artifact_type = 2; |
| } |
| |
| message VerifyAFDOArtifactsResponse { |
| // Status of the service |
| bool status = 1; |
| } |
| // End of TODO(crbug.com/1020615). |
| |
| // Service for Android/ARC related functionality. |
| service ToolchainService { |
| option (service_options) = { |
| module: "toolchain", |
| service_chroot_assert: OUTSIDE, |
| }; |
| |
| // DEPRECATED for recipes: used only by legacy toolchain builders. |
| // See also crbug/1019868. |
| // Update Chrome ebuild with most recent unvetted orderfile |
| rpc UpdateEbuildWithAFDOArtifacts(VerifyAFDOArtifactsRequest) |
| returns (VerifyAFDOArtifactsResponse) { |
| option (method_options) = { |
| method_chroot_assert: INSIDE; |
| }; |
| } |
| |
| // DEPRECATED for recipes: used only by legacy toolchain builders. |
| // See also crbug/1019868. |
| // Copy the orderfile from unvetted GS bucket to vetted bucket. |
| rpc UploadVettedAFDOArtifacts(VerifyAFDOArtifactsRequest) |
| returns (VerifyAFDOArtifactsResponse) { |
| option (method_options) = { |
| method_chroot_assert: INSIDE; |
| }; |
| } |
| |
| // Prepare to build toolchain artifacts. This will be called twice: |
| // Once with chroot and sysroot = None, before the chroot is created, and |
| // again at the start of the 'install packages' step, if the build gets that |
| // far. |
| rpc PrepareForBuild(PrepareForToolchainBuildRequest) |
| returns (PrepareForToolchainBuildResponse); |
| |
| // Bundle toolchain artifacts. |
| rpc BundleArtifacts(BundleToolchainRequest) |
| returns (BundleToolchainResponse); |
| } |