Documentation ¶
Overview ¶
Package matrix provides a utility for running a single Go command
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Runner ¶
type Runner struct { // The number of single architecture-version runners that are active at any time. Parallelism int // List of Go versions to run commands on. // These should all be non-beta/RC versions. Versions []goversion.GoVersion // List of Go architectures (values for GOARCH) to run commands on. Architectures []string // The root directory that the matrix runner should use to install the Go toolchain versions. InstallDirectory string // Constructs the command to run for the single architecture-version runner. // The implementation should use `exec.CommandContext` and pass in the supplied context // to ensure that the command is cancelled if the runner exits early. // The GOARCH environment variable is automatically injected with the appropriate value. // Additionally, the value of `Path` is ignored // and replaced with the path to the installed Go binary. // Finally, due to a quirk with how the toolchain install path is resolved, // the HOME environment variable is replaced with a synthetic value. // // To skip a version-architecture pair, return `nil` for this function. GetCommand func(ctx context.Context, version goversion.GoVersion, arch string, goExe string) *exec.Cmd }
Runner contains the logic used to run a single Go command on a matrix of Go toolchain version and Go architecture combinations. It handles downloading the Go toolchains for each version to the provided `InstallDirectory`, which can be cached to speed up future runs.
Click to show internal directories.
Click to hide internal directories.