Documentation
¶
Overview ¶
Package golang provides golang toolchain (go) support for dukkha
Index ¶
Constants ¶
View Source
const TaskKindBuild = "build"
View Source
const TaskKindTest = "test"
View Source
const ToolKind = "golang"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CGOSepc ¶
type CGOSepc struct {
rs.BaseField `yaml:"-"`
// Enable cgo
Enabled bool `yaml:"enabled"`
// CPPFlags (env CGO_CPPFLAGS) C preprocessor flags
CPPFlags []string `yaml:"cppflags"`
// CFlags (env CGO_CFLAGS) C flags
CFlags []string `yaml:"cflags"`
// CXXFlags (env CGO_CXXFLAGS)
CXXFlags []string `yaml:"cxxflags"`
// FFlags (env CGO_FFLAGS) Fortran flags
FFlags []string `yaml:"fflags"`
// LDFlags (env CGO_LDFLAGS) ldflags
LDFlags []string `yaml:"ldflags"`
// CC sets C compiler path or executable name
CC string `yaml:"cc"`
// CXX sets C++ compiler path or executable name
CXX string `yaml:"cxx"`
// FC sets Fortan compiler path or executable name
FC string `yaml:"fc"`
}
type TaskBuild ¶
type TaskBuild struct {
rs.BaseField `yaml:"-"`
TaskName string `yaml:"name"`
tools.BaseTask `yaml:",inline"`
// Chdir into a different dir when running go command while keep `dukkha.WorkDir` unchanged
// this can be helpful when you are managing multiple go modules in one workspace
Chdir string `yaml:"chdir"`
// Path is the import path of the source code to be built
// it will be the last argument of this go command execution
//
// see `go help packages` for more information about import path
Path string `yaml:"path"`
// Outputs of the go build command, when multiple entries specified, will build multiple times with same
// arguments
Outputs []string `yaml:"outputs"`
BuildOptions buildOptions `yaml:",inline"`
// CGo options
CGo CGOSepc `yaml:"cgo"`
// ExtraArgs for go build (inserted before `Path`)
ExtraArgs []string `yaml:"extra_args"`
}
func (*TaskBuild) GetExecSpecs ¶
func (c *TaskBuild) GetExecSpecs( rc dukkha.TaskExecContext, options dukkha.TaskMatrixExecOptions, ) ([]dukkha.TaskExecSpec, error)
type TaskTest ¶
type TaskTest struct {
rs.BaseField `yaml:"-"`
TaskName string `yaml:"name"`
tools.BaseTask `yaml:",inline"`
CGO CGOSepc `yaml:"cgo"`
Path string `yaml:"path"`
Chdir string `yaml:"chdir"`
BuildOptions buildOptions `yaml:",inline"`
Test testSpec `yaml:",inline"`
Benchmark testBenchmarkSpec `yaml:"benchmark"`
Profile testProfileSpec `yaml:"profile"`
// ExtraArgs for go test (inserted before `Path`)
ExtraArgs []string `yaml:"extra_args"`
// CustomCmdPrefix to run compiled test file with this cmd prefix
// e.g. built xxx.test, usually will run in local host as ./xxx.test
// but with `custom_cmd_prefx=[ssh, testsrv]`, will run as `ssh testsrv xxx.test`
CustomCmdPrefix []string `yaml:"custom_cmd_prefix"`
// CustomArgs appended when running the test
CustomArgs []string `yaml:"custom_args"`
}
func (*TaskTest) GetExecSpecs ¶
func (c *TaskTest) GetExecSpecs( rc dukkha.TaskExecContext, options dukkha.TaskMatrixExecOptions, ) ([]dukkha.TaskExecSpec, error)
Click to show internal directories.
Click to hide internal directories.