Module Assemblage.Run

module Run: sig .. end
Runs.

A run is an action whose commands are always run even if the inputs are up to date. Runs are typically used to run the project's test suites or other convenience development executions.

Strictly speaking a run action is not part of the build system but it can input products of the build system to ensure they exist when the run is executed. The run part gives us an explicit name to invoke the run.

Important. Since runs always execute their action you should usually not use them for generating build products.

FIXME What's the semantics of outputs for a Run ?



Runs


val v : ?usage:Assemblage.Part.usage ->
?exists:bool Assemblage.Conf.value ->
?args:Assemblage.Args.t ->
?dir:Assemblage.Path.t Assemblage.Conf.value ->
string ->
Assemblage.Action.t Assemblage.Conf.value ->
[< Assemblage.part_kind > `Run ] Assemblage.part
v dir name action is a run that executes the action action. If dir is specified an Assemblage.Acmd.cd command to that directory is added in front of action's commands. Otherwise the commands are executed from the Assemblage.Conf.root_dir directory.
val with_bin : ?usage:Assemblage.Part.usage ->
?exists:bool Assemblage.Conf.value ->
?args:Assemblage.Args.t ->
?dir:Assemblage.Path.t Assemblage.Conf.value ->
?name:string ->
?ext:Assemblage.Path.ext ->
[< `Bin ] Assemblage.part ->
(Assemblage.Acmd.cmd -> Assemblage.Acmd.t list) Assemblage.Conf.value ->
[< Assemblage.part_kind > `Run ] Assemblage.part
with_bin dir ext bin cmds is a run that executes the sequence of commands Conf.(cmds $ Bin.of_cmd ext bin). name is the name of the run; if unspecified this is derived from the bin part. ext is the binary to select see Assemblage.Bin.to_cmd.

The binary is automatically added to the inputs of run's action and the resulting part only exists if the executable does.

val bin : ?usage:Assemblage.Part.usage ->
?exists:bool Assemblage.Conf.value ->
?args:Assemblage.Args.t ->
?dir:Assemblage.Path.t Assemblage.Conf.value ->
?name:string ->
?ext:Assemblage.Path.ext ->
?stdin:Assemblage.Path.t Assemblage.Conf.value ->
?stdout:Assemblage.Path.t Assemblage.Conf.value ->
?stderr:Assemblage.Path.t Assemblage.Conf.value ->
[< `Bin ] Assemblage.part ->
string list Assemblage.Conf.value ->
[< Assemblage.part_kind > `Run ] Assemblage.part
bin bin args is like Assemblage.Run.with_bin but directly executes the binary with args and redirects its outputs as specified.