[fxicfg] Add fuchsia.proto support
Bug: IN-1102 #comment
Change-Id: I6b82e06b85512904ef9756b0c26c4b4b51671687
diff --git a/fxicfg/loaders/protos.go b/fxicfg/loaders/protos.go
index fd0800e..84a4da8 100644
--- a/fxicfg/loaders/protos.go
+++ b/fxicfg/loaders/protos.go
@@ -5,22 +5,22 @@
package loaders
import (
+ // Import all protobuf libs to make sure proto file descriptors are registered and
+ // loadable. (registration happens in the proto pkg's init()).
_ "fuchsia.googlesource.com/infra/infra/fxicfg/starlark/protos/recipes"
luci "go.chromium.org/luci/starlark/interpreter"
)
-var protos = map[string]string{
- "recipes/example.proto": "recipes/example.proto",
-}
-
// ProtoLoader returns a luci.Loader that loads protocol buffer modules.
//
// lucicfg has its own internal-only ProtoLoader constructor. We don't want to have to
// send commits that project every time our recipe APIs change.
func ProtoLoader() luci.Loader {
- mapping := make(map[string]string, len(protos))
- for path, proto := range protos {
- mapping[path] = proto
- }
- return luci.ProtoLoader(mapping)
+ return luci.ProtoLoader(map[string]string{
+ // load("@proto//recipes/example.proto", example_pb="example"
+ "recipes/example.proto": "recipes/example.proto",
+
+ // load("@proto//recipes/fuchsia.proto", fuchsia_pb="recipe_modules.infra.fuchsia")
+ "recipes/fuchsia.proto": "recipes/fuchsia.proto",
+ })
}
diff --git a/fxicfg/starlark/protos/gen.go b/fxicfg/starlark/protos/gen.go
index 209fa80..bdabb8a 100644
--- a/fxicfg/starlark/protos/gen.go
+++ b/fxicfg/starlark/protos/gen.go
@@ -7,3 +7,4 @@
// TODO(kjharland): Force protos to come pre-generated and delete this.
//
//go:generate protoc --go_out=. recipes/example.proto
+//go:generate protoc --go_out=. recipes/fuchsia.proto
diff --git a/fxicfg/starlark/protos/recipes/example.pb.go b/fxicfg/starlark/protos/recipes/example.pb.go
index e165262..2cbb303 100644
--- a/fxicfg/starlark/protos/recipes/example.pb.go
+++ b/fxicfg/starlark/protos/recipes/example.pb.go
@@ -3,9 +3,11 @@
package recipes
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
+import (
+ fmt "fmt"
+ proto "github.com/golang/protobuf/proto"
+ math "math"
+)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
@@ -16,7 +18,7 @@
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
type Example struct {
FieldA *Example_FieldA `protobuf:"bytes,1,opt,name=field_a,json=fieldA,proto3" json:"field_a,omitempty"`
@@ -31,14 +33,15 @@
func (*Example) Descriptor() ([]byte, []int) {
return fileDescriptor_a131720fbcb681f7, []int{0}
}
+
func (m *Example) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Example.Unmarshal(m, b)
}
func (m *Example) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Example.Marshal(b, m, deterministic)
}
-func (dst *Example) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Example.Merge(dst, src)
+func (m *Example) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Example.Merge(m, src)
}
func (m *Example) XXX_Size() int {
return xxx_messageInfo_Example.Size(m)
@@ -69,14 +72,15 @@
func (*Example_FieldA) Descriptor() ([]byte, []int) {
return fileDescriptor_a131720fbcb681f7, []int{0, 0}
}
+
func (m *Example_FieldA) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Example_FieldA.Unmarshal(m, b)
}
func (m *Example_FieldA) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Example_FieldA.Marshal(b, m, deterministic)
}
-func (dst *Example_FieldA) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Example_FieldA.Merge(dst, src)
+func (m *Example_FieldA) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Example_FieldA.Merge(m, src)
}
func (m *Example_FieldA) XXX_Size() int {
return xxx_messageInfo_Example_FieldA.Size(m)
diff --git a/fxicfg/starlark/protos/recipes/fuchsia.pb.go b/fxicfg/starlark/protos/recipes/fuchsia.pb.go
new file mode 100644
index 0000000..d9150cd
--- /dev/null
+++ b/fxicfg/starlark/protos/recipes/fuchsia.pb.go
@@ -0,0 +1,544 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// source: recipes/fuchsia.proto
+
+// "from PB.recipe_modules.infra.fuchsia import Fuchsia"
+
+package recipes
+
+import (
+ fmt "fmt"
+ proto "github.com/golang/protobuf/proto"
+ math "math"
+)
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
+
+// 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.
+type Fuchsia struct {
+ // (required) How to obtain the Fuchsia build inputs. See Checkout docs.
+ Checkout *Fuchsia_Checkout `protobuf:"bytes,1,opt,name=checkout,proto3" json:"checkout,omitempty"`
+ // (required) How to build Fuchsia. See Build docs.
+ Build *Fuchsia_Build `protobuf:"bytes,2,opt,name=build,proto3" json:"build,omitempty"`
+ // How to test Fuchsia. See Test docs.
+ Test *Fuchsia_Test `protobuf:"bytes,3,opt,name=test,proto3" json:"test,omitempty"`
+ // The GCS bucket to upload results to.
+ GcsBucket string `protobuf:"bytes,4,opt,name=gcs_bucket,json=gcsBucket,proto3" json:"gcs_bucket,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *Fuchsia) Reset() { *m = Fuchsia{} }
+func (m *Fuchsia) String() string { return proto.CompactTextString(m) }
+func (*Fuchsia) ProtoMessage() {}
+func (*Fuchsia) Descriptor() ([]byte, []int) {
+ return fileDescriptor_eb93a9da76a97780, []int{0}
+}
+
+func (m *Fuchsia) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_Fuchsia.Unmarshal(m, b)
+}
+func (m *Fuchsia) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_Fuchsia.Marshal(b, m, deterministic)
+}
+func (m *Fuchsia) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Fuchsia.Merge(m, src)
+}
+func (m *Fuchsia) XXX_Size() int {
+ return xxx_messageInfo_Fuchsia.Size(m)
+}
+func (m *Fuchsia) XXX_DiscardUnknown() {
+ xxx_messageInfo_Fuchsia.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Fuchsia proto.InternalMessageInfo
+
+func (m *Fuchsia) GetCheckout() *Fuchsia_Checkout {
+ if m != nil {
+ return m.Checkout
+ }
+ return nil
+}
+
+func (m *Fuchsia) GetBuild() *Fuchsia_Build {
+ if m != nil {
+ return m.Build
+ }
+ return nil
+}
+
+func (m *Fuchsia) GetTest() *Fuchsia_Test {
+ if m != nil {
+ return m.Test
+ }
+ return nil
+}
+
+func (m *Fuchsia) GetGcsBucket() string {
+ if m != nil {
+ return m.GcsBucket
+ }
+ return ""
+}
+
+// Describes how to fetch the Fuchsia build inputs.
+type Fuchsia_Checkout struct {
+ // 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.
+ Attributes []string `protobuf:"bytes,1,rep,name=attributes,proto3" json:"attributes,omitempty"`
+ // Whether to checkout from a Jiri snapshot.
+ UseSnapshot bool `protobuf:"varint,2,opt,name=use_snapshot,json=useSnapshot,proto3" json:"use_snapshot,omitempty"`
+ // The name of the manifest to import from the integration repository.
+ Manifest string `protobuf:"bytes,4,opt,name=manifest,proto3" json:"manifest,omitempty"`
+ // 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.
+ Project string `protobuf:"bytes,6,opt,name=project,proto3" json:"project,omitempty"`
+ // The remote integration manifest repository.
+ Remote string `protobuf:"bytes,7,opt,name=remote,proto3" json:"remote,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *Fuchsia_Checkout) Reset() { *m = Fuchsia_Checkout{} }
+func (m *Fuchsia_Checkout) String() string { return proto.CompactTextString(m) }
+func (*Fuchsia_Checkout) ProtoMessage() {}
+func (*Fuchsia_Checkout) Descriptor() ([]byte, []int) {
+ return fileDescriptor_eb93a9da76a97780, []int{0, 0}
+}
+
+func (m *Fuchsia_Checkout) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_Fuchsia_Checkout.Unmarshal(m, b)
+}
+func (m *Fuchsia_Checkout) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_Fuchsia_Checkout.Marshal(b, m, deterministic)
+}
+func (m *Fuchsia_Checkout) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Fuchsia_Checkout.Merge(m, src)
+}
+func (m *Fuchsia_Checkout) XXX_Size() int {
+ return xxx_messageInfo_Fuchsia_Checkout.Size(m)
+}
+func (m *Fuchsia_Checkout) XXX_DiscardUnknown() {
+ xxx_messageInfo_Fuchsia_Checkout.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Fuchsia_Checkout proto.InternalMessageInfo
+
+func (m *Fuchsia_Checkout) GetAttributes() []string {
+ if m != nil {
+ return m.Attributes
+ }
+ return nil
+}
+
+func (m *Fuchsia_Checkout) GetUseSnapshot() bool {
+ if m != nil {
+ return m.UseSnapshot
+ }
+ return false
+}
+
+func (m *Fuchsia_Checkout) GetManifest() string {
+ if m != nil {
+ return m.Manifest
+ }
+ return ""
+}
+
+func (m *Fuchsia_Checkout) GetProject() string {
+ if m != nil {
+ return m.Project
+ }
+ return ""
+}
+
+func (m *Fuchsia_Checkout) GetRemote() string {
+ if m != nil {
+ return m.Remote
+ }
+ return ""
+}
+
+// Describes how to build Fuchsia.
+type Fuchsia_Build struct {
+ // The build type
+ BuildType string `protobuf:"bytes,1,opt,name=build_type,json=buildType,proto3" json:"build_type,omitempty"`
+ // Board to build
+ Board string `protobuf:"bytes,2,opt,name=board,proto3" json:"board,omitempty"`
+ // GCS bucket for uploading debug symbols.
+ DebugSymbolBucket string `protobuf:"bytes,3,opt,name=debug_symbol_bucket,json=debugSymbolBucket,proto3" json:"debug_symbol_bucket,omitempty"`
+ // Tags of environments on which the testsharder will key
+ EnvironmentTags []string `protobuf:"bytes,4,rep,name=environment_tags,json=environmentTags,proto3" json:"environment_tags,omitempty"`
+ // Whether to exclude images during the build.
+ ExcludeImages bool `protobuf:"varint,5,opt,name=exclude_images,json=excludeImages,proto3" json:"exclude_images,omitempty"`
+ // Extra args to pass to GN.
+ GnArgs []string `protobuf:"bytes,6,rep,name=gn_args,json=gnArgs,proto3" json:"gn_args,omitempty"`
+ // Whether to generate and upload breakpad symbols as part of this build.
+ IncludeBreakpadSymbols bool `protobuf:"varint,7,opt,name=include_breakpad_symbols,json=includeBreakpadSymbols,proto3" json:"include_breakpad_symbols,omitempty"`
+ // Whether to build and upload an archive of debug binaries.
+ IncludeSymbolArchive bool `protobuf:"varint,8,opt,name=include_symbol_archive,json=includeSymbolArchive,proto3" json:"include_symbol_archive,omitempty"`
+ // Extra targets to pass to Ninja.
+ NinjaTargets []string `protobuf:"bytes,9,rep,name=ninja_targets,json=ninjaTargets,proto3" json:"ninja_targets,omitempty"`
+ // A list of Fuchsia packages to build.
+ Packages []string `protobuf:"bytes,10,rep,name=packages,proto3" json:"packages,omitempty"`
+ // The product to build.
+ Product string `protobuf:"bytes,11,opt,name=product,proto3" json:"product,omitempty"`
+ // Whether to run any tests.
+ RunTests bool `protobuf:"varint,12,opt,name=run_tests,json=runTests,proto3" json:"run_tests,omitempty"`
+ // The target architecture. One of x64 or arm64.
+ Target string `protobuf:"bytes,13,opt,name=target,proto3" json:"target,omitempty"`
+ // Packages to build and add to the universe set
+ UniversePackages []string `protobuf:"bytes,14,rep,name=universe_packages,json=universePackages,proto3" json:"universe_packages,omitempty"`
+ // --variant arguments to GN in `select_variant`
+ Variants []string `protobuf:"bytes,15,rep,name=variants,proto3" json:"variants,omitempty"`
+ // Additional args to pass to zircon build using standard FOO=bar syntax.
+ ZirconArgs []string `protobuf:"bytes,16,rep,name=zircon_args,json=zirconArgs,proto3" json:"zircon_args,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *Fuchsia_Build) Reset() { *m = Fuchsia_Build{} }
+func (m *Fuchsia_Build) String() string { return proto.CompactTextString(m) }
+func (*Fuchsia_Build) ProtoMessage() {}
+func (*Fuchsia_Build) Descriptor() ([]byte, []int) {
+ return fileDescriptor_eb93a9da76a97780, []int{0, 1}
+}
+
+func (m *Fuchsia_Build) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_Fuchsia_Build.Unmarshal(m, b)
+}
+func (m *Fuchsia_Build) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_Fuchsia_Build.Marshal(b, m, deterministic)
+}
+func (m *Fuchsia_Build) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Fuchsia_Build.Merge(m, src)
+}
+func (m *Fuchsia_Build) XXX_Size() int {
+ return xxx_messageInfo_Fuchsia_Build.Size(m)
+}
+func (m *Fuchsia_Build) XXX_DiscardUnknown() {
+ xxx_messageInfo_Fuchsia_Build.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Fuchsia_Build proto.InternalMessageInfo
+
+func (m *Fuchsia_Build) GetBuildType() string {
+ if m != nil {
+ return m.BuildType
+ }
+ return ""
+}
+
+func (m *Fuchsia_Build) GetBoard() string {
+ if m != nil {
+ return m.Board
+ }
+ return ""
+}
+
+func (m *Fuchsia_Build) GetDebugSymbolBucket() string {
+ if m != nil {
+ return m.DebugSymbolBucket
+ }
+ return ""
+}
+
+func (m *Fuchsia_Build) GetEnvironmentTags() []string {
+ if m != nil {
+ return m.EnvironmentTags
+ }
+ return nil
+}
+
+func (m *Fuchsia_Build) GetExcludeImages() bool {
+ if m != nil {
+ return m.ExcludeImages
+ }
+ return false
+}
+
+func (m *Fuchsia_Build) GetGnArgs() []string {
+ if m != nil {
+ return m.GnArgs
+ }
+ return nil
+}
+
+func (m *Fuchsia_Build) GetIncludeBreakpadSymbols() bool {
+ if m != nil {
+ return m.IncludeBreakpadSymbols
+ }
+ return false
+}
+
+func (m *Fuchsia_Build) GetIncludeSymbolArchive() bool {
+ if m != nil {
+ return m.IncludeSymbolArchive
+ }
+ return false
+}
+
+func (m *Fuchsia_Build) GetNinjaTargets() []string {
+ if m != nil {
+ return m.NinjaTargets
+ }
+ return nil
+}
+
+func (m *Fuchsia_Build) GetPackages() []string {
+ if m != nil {
+ return m.Packages
+ }
+ return nil
+}
+
+func (m *Fuchsia_Build) GetProduct() string {
+ if m != nil {
+ return m.Product
+ }
+ return ""
+}
+
+func (m *Fuchsia_Build) GetRunTests() bool {
+ if m != nil {
+ return m.RunTests
+ }
+ return false
+}
+
+func (m *Fuchsia_Build) GetTarget() string {
+ if m != nil {
+ return m.Target
+ }
+ return ""
+}
+
+func (m *Fuchsia_Build) GetUniversePackages() []string {
+ if m != nil {
+ return m.UniversePackages
+ }
+ return nil
+}
+
+func (m *Fuchsia_Build) GetVariants() []string {
+ if m != nil {
+ return m.Variants
+ }
+ return nil
+}
+
+func (m *Fuchsia_Build) GetZirconArgs() []string {
+ if m != nil {
+ return m.ZirconArgs
+ }
+ return nil
+}
+
+// Describes how to test Fuchsia.
+type Fuchsia_Test struct {
+ // 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.
+ DeviceType string `protobuf:"bytes,1,opt,name=device_type,json=deviceType,proto3" json:"device_type,omitempty"`
+ // Whether to pave images the device for testing. (Ignored if
+ // device_type == QEMU)
+ Pave bool `protobuf:"varint,2,opt,name=pave,proto3" json:"pave,omitempty"`
+ // Swarming pool from which a test task will be drawn
+ Pool string `protobuf:"bytes,3,opt,name=pool,proto3" json:"pool,omitempty"`
+ // Shell-quoted string to add to the runtests commandline
+ RuntestsArgs string `protobuf:"bytes,4,opt,name=runtests_args,json=runtestsArgs,proto3" json:"runtests_args,omitempty"`
+ // Whether any plaintext needs to be supplied to the tests
+ RequiresSecrets bool `protobuf:"varint,5,opt,name=requires_secrets,json=requiresSecrets,proto3" json:"requires_secrets,omitempty"`
+ // How long to wait for Swarming to find a bot on which to test
+ SwarmingExpirationTimeoutSecs int32 `protobuf:"varint,6,opt,name=swarming_expiration_timeout_secs,json=swarmingExpirationTimeoutSecs,proto3" json:"swarming_expiration_timeout_secs,omitempty"`
+ // How long to wait (in seconds) before killing the test
+ // swarming task if there\'s no output being produced
+ SwarmingIoTimeoutSecs int32 `protobuf:"varint,7,opt,name=swarming_io_timeout_secs,json=swarmingIoTimeoutSecs,proto3" json:"swarming_io_timeout_secs,omitempty"`
+ // Whether to run tests as shards.
+ TestInShards bool `protobuf:"varint,8,opt,name=test_in_shards,json=testInShards,proto3" json:"test_in_shards,omitempty"`
+ // How long to wait until timing out on tests.
+ TimeoutSecs int32 `protobuf:"varint,9,opt,name=timeout_secs,json=timeoutSecs,proto3" json:"timeout_secs,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *Fuchsia_Test) Reset() { *m = Fuchsia_Test{} }
+func (m *Fuchsia_Test) String() string { return proto.CompactTextString(m) }
+func (*Fuchsia_Test) ProtoMessage() {}
+func (*Fuchsia_Test) Descriptor() ([]byte, []int) {
+ return fileDescriptor_eb93a9da76a97780, []int{0, 2}
+}
+
+func (m *Fuchsia_Test) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_Fuchsia_Test.Unmarshal(m, b)
+}
+func (m *Fuchsia_Test) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_Fuchsia_Test.Marshal(b, m, deterministic)
+}
+func (m *Fuchsia_Test) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Fuchsia_Test.Merge(m, src)
+}
+func (m *Fuchsia_Test) XXX_Size() int {
+ return xxx_messageInfo_Fuchsia_Test.Size(m)
+}
+func (m *Fuchsia_Test) XXX_DiscardUnknown() {
+ xxx_messageInfo_Fuchsia_Test.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Fuchsia_Test proto.InternalMessageInfo
+
+func (m *Fuchsia_Test) GetDeviceType() string {
+ if m != nil {
+ return m.DeviceType
+ }
+ return ""
+}
+
+func (m *Fuchsia_Test) GetPave() bool {
+ if m != nil {
+ return m.Pave
+ }
+ return false
+}
+
+func (m *Fuchsia_Test) GetPool() string {
+ if m != nil {
+ return m.Pool
+ }
+ return ""
+}
+
+func (m *Fuchsia_Test) GetRuntestsArgs() string {
+ if m != nil {
+ return m.RuntestsArgs
+ }
+ return ""
+}
+
+func (m *Fuchsia_Test) GetRequiresSecrets() bool {
+ if m != nil {
+ return m.RequiresSecrets
+ }
+ return false
+}
+
+func (m *Fuchsia_Test) GetSwarmingExpirationTimeoutSecs() int32 {
+ if m != nil {
+ return m.SwarmingExpirationTimeoutSecs
+ }
+ return 0
+}
+
+func (m *Fuchsia_Test) GetSwarmingIoTimeoutSecs() int32 {
+ if m != nil {
+ return m.SwarmingIoTimeoutSecs
+ }
+ return 0
+}
+
+func (m *Fuchsia_Test) GetTestInShards() bool {
+ if m != nil {
+ return m.TestInShards
+ }
+ return false
+}
+
+func (m *Fuchsia_Test) GetTimeoutSecs() int32 {
+ if m != nil {
+ return m.TimeoutSecs
+ }
+ return 0
+}
+
+func init() {
+ proto.RegisterType((*Fuchsia)(nil), "recipe_modules.infra.fuchsia.Fuchsia")
+ proto.RegisterType((*Fuchsia_Checkout)(nil), "recipe_modules.infra.fuchsia.Fuchsia.Checkout")
+ proto.RegisterType((*Fuchsia_Build)(nil), "recipe_modules.infra.fuchsia.Fuchsia.Build")
+ proto.RegisterType((*Fuchsia_Test)(nil), "recipe_modules.infra.fuchsia.Fuchsia.Test")
+}
+
+func init() { proto.RegisterFile("recipes/fuchsia.proto", fileDescriptor_eb93a9da76a97780) }
+
+var fileDescriptor_eb93a9da76a97780 = []byte{
+ // 737 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0xcd, 0x8e, 0x23, 0x35,
+ 0x10, 0x56, 0x76, 0xf2, 0xd7, 0x95, 0xcc, 0xcf, 0x9a, 0xdd, 0xc5, 0x0a, 0x2c, 0x0c, 0x7f, 0xd2,
+ 0x2c, 0x2b, 0x05, 0x09, 0x90, 0xe0, 0x84, 0x34, 0x83, 0x00, 0x0d, 0x27, 0xd4, 0xc9, 0x89, 0x4b,
+ 0xcb, 0xe9, 0xd4, 0x74, 0xbc, 0x93, 0xd8, 0x8d, 0xcb, 0x0e, 0x3b, 0xbc, 0x0a, 0x4f, 0xc3, 0x85,
+ 0x87, 0xe1, 0x29, 0x90, 0xcb, 0xee, 0x90, 0xbd, 0xa0, 0xbd, 0xb9, 0xbe, 0xaf, 0xea, 0x73, 0xf9,
+ 0xab, 0xea, 0x86, 0xa7, 0x0e, 0x6b, 0xdd, 0x22, 0x7d, 0x71, 0x17, 0xea, 0x0d, 0x69, 0x35, 0x6f,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 0xef, 0xca, 0xed, 0xb4, 0x69, 0x2a, 0x7c, 0xdd, 0x6a, 0xa7, 0xbc,
+ 0xb6, 0xa6, 0xf2, 0x7a, 0x87, 0x36, 0xf8, 0x58, 0x4d, 0xfc, 0xc1, 0x0c, 0xca, 0xe7, 0x5d, 0xde,
+ 0x0f, 0x87, 0xb4, 0x65, 0xca, 0x5a, 0x60, 0x4d, 0xe2, 0x1b, 0x90, 0x07, 0x21, 0x6d, 0xdf, 0x14,
+ 0x18, 0xb1, 0xc0, 0xd3, 0x8e, 0xbf, 0xb5, 0xc7, 0x85, 0x9f, 0xc2, 0x59, 0xec, 0xbc, 0xd2, 0xa6,
+ 0xa2, 0x8d, 0x72, 0x6b, 0xca, 0xbb, 0x34, 0x8d, 0xe8, 0xad, 0x59, 0x30, 0x16, 0x3f, 0xff, 0x37,
+ 0x24, 0x0b, 0x96, 0x9c, 0xf8, 0xff, 0x84, 0x6e, 0x8a, 0x5f, 0x47, 0xf9, 0xff, 0xbb, 0x1a, 0xf2,
+ 0x8f, 0xf7, 0xab, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xe9, 0x1e, 0xf5, 0x27, 0x91, 0x05, 0x00,
+ 0x00,
+}
diff --git a/fxicfg/starlark/protos/recipes/fuchsia.proto b/fxicfg/starlark/protos/recipes/fuchsia.proto
new file mode 100644
index 0000000..a6ac4ff
--- /dev/null
+++ b/fxicfg/starlark/protos/recipes/fuchsia.proto
@@ -0,0 +1,151 @@
+// 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";
+
+// "from PB.recipe_modules.infra.fuchsia import Fuchsia"
+package recipe_modules.infra.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.
+ string gcs_bucket = 4;
+
+ // 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;
+ }
+
+ // 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.
+ 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;
+
+ // Additional args to pass to zircon build using standard FOO=bar syntax.
+ repeated string zircon_args = 16;
+ }
+
+ // 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;
+ }
+}