Foundry.BuildPipeline

g Foundry.BuildPipeline Foundry.BuildPipeline Foundry.Contextual Foundry.Contextual Foundry.Contextual->Foundry.BuildPipeline GObject.GInterface GObject.GInterface Gio.ListModel Gio.ListModel GObject.GInterface->Gio.ListModel Json.Serializable Json.Serializable GObject.GInterface->Json.Serializable GObject.Object GObject.Object GObject.Object->Foundry.Contextual Gio.ListModel->Foundry.BuildPipeline Json.Serializable->Foundry.Contextual

Subclasses:

None

Methods

Inherited:

Foundry.Contextual (4), GObject.Object (37), Json.Serializable (8), Gio.ListModel (4)

Structs:

GObject.ObjectClass (5)

class

new (context, config, device, sdk, enable_adddins)

add_stage (stage)

append_path (path)

build (phase, pty_fd, cancellable)

clean (phase, pty_fd, cancellable)

contains_program (program)

dup_append_path ()

dup_arch ()

dup_build_system ()

dup_builddir ()

dup_config ()

dup_device ()

dup_prepend_path ()

dup_sdk ()

dup_srcdir ()

dup_triplet ()

find_build_flags (file)

get_phase ()

list_build_targets ()

prepare (launcher, phase)

prepare_for_run (launcher)

prepend_path (path)

purge (phase, pty_fd, cancellable)

query ()

remove_stage (stage)

setenv (variable, value)

Virtual Methods

Inherited:

GObject.Object (7), Json.Serializable (5), Gio.ListModel (3)

Properties

Inherited:

Foundry.Contextual (1)

Name

Type

Flags

Short Description

arch

str

r

build-system

str

r

config

Foundry.Config

r/w/co

device

Foundry.Device

r/w/co

enable-addins

bool

r/w/co

phase

Foundry.BuildPipelinePhase

r

sdk

Foundry.Sdk

r/w/co

triplet

Foundry.Triplet

r/w/co

Signals

Inherited:

GObject.Object (1), Gio.ListModel (1)

Fields

Inherited:

GObject.Object (1), Gio.ListModel (1)

Class Details

class Foundry.BuildPipeline(**kwargs)
Bases:

Foundry.Contextual, Gio.ListModel

Abstract:

No

Structure:

Foundry.BuildPipelineClass

Manages build pipeline execution and coordination.

Foundry.BuildPipeline provides functionality for executing build pipelines including configuration management, device targeting, and addin integration. It coordinates build stages, manages build artifacts, and provides a unified interface for build operations across different build systems.

classmethod new(context, config, device, sdk, enable_adddins)
Parameters:
Return type:

Dex.Future

add_stage(stage)
Parameters:

stage (Foundry.BuildStage) –

append_path(path)
Parameters:

path (str) – the path to append

Adds a path to the list of paths that will be appended to PATH.

New in version 1.1.

build(phase, pty_fd, cancellable)
Parameters:
Returns:

a Foundry.BuildProgress

Return type:

Foundry.BuildProgress

Build the build pipeline.

clean(phase, pty_fd, cancellable)
Parameters:
Returns:

a Foundry.BuildProgress

Return type:

Foundry.BuildProgress

Clean the build pipeline. (e.g. make clean)

contains_program(program)
Parameters:

program (str) – the name of a program such as “meson”

Returns:

a [class`Dex`.Future] that resolves to a string containing the path or rejects with error.

Return type:

Dex.Future

dup_append_path()
Returns:

the joined append paths, or None

Return type:

str or None

Gets the joined form of all append paths (e.g. “a:b:py:data::c<Foundry.BuildPipeline.props.c>").

New in version 1.1.

dup_arch()
Return type:

str

dup_build_system()
Return type:

str or None

Get the expected build system for the pipeline.

New in version 1.1.

dup_builddir()
Returns:

a string containing a file path

Return type:

str

Gets the directory where the project should be built.

dup_config()
Returns:

a Foundry.Config

Return type:

Foundry.Config

Gets the CONFIG to use for the platform.

dup_device()
Returns:

a Foundry.Device

Return type:

Foundry.Device

Gets the device used for the pipeline.

dup_prepend_path()
Returns:

the joined prepend paths, or None

Return type:

str or None

Gets the joined form of all prepend paths (e.g. “a:b:py:data::c<Foundry.BuildPipeline.props.c>").

New in version 1.1.

dup_sdk()
Returns:

a Foundry.Sdk

Return type:

Foundry.Sdk

Gets the SDK to use for the platform.

dup_srcdir()
Returns:

a string containing the project directory path

Return type:

str

Gets the project directory path from the context as a string.

New in version 1.1.

dup_triplet()
Returns:

a [struct`Foundry`.Triplet]

Return type:

Foundry.Triplet

Gets the triplet for a build pipeline.

find_build_flags(file)
Parameters:

file (Gio.File) –

Returns:

a [class`Dex`.Future] that resolves to a [class`Foundry`.Command] or rejects with error.

Return type:

Dex.Future

Queries build stages for a build command for file.

get_phase()
Returns:

the maximum phase reached

Return type:

Foundry.BuildPipelinePhase

Gets the maximum phase reached by all completed stages.

The phase is calculated as the maximum phase of all stages that have the completed property set to true, up to the first stage that is not completed. If two stages in the same phase have different values for completed, that phase has not been reached.

New in version 1.1.

list_build_targets()
Returns:

a [class`Dex`.Future] that resolves to a [iface`Gio`.ListModel] of [class`Foundry`.BuildTarget] or rejects with error.

Return type:

Dex.Future

Gets a list of build targets.

This list is dynamically populated. If you want to wait for all providers to complete use [func`Foundry`.list_model_await] on the resulting [iface`Gio`.ListModel].

prepare(launcher, phase)
Parameters:
Returns:

a [class`Dex`.Future] that resolves to any value or rejects with error.

Return type:

Dex.Future

Prepares the launcher for running within the build pipeline.

prepare_for_run(launcher)
Parameters:

launcher (Foundry.ProcessLauncher) – a [class`Foundry`.ProcessLauncher]

Returns:

a [class`Dex`.Future] that resolves to any value or rejects with error.

Return type:

Dex.Future

Prepares the launcher for running within the build pipeline.

prepend_path(path)
Parameters:

path (str) – the path to prepend

Adds a path to the list of paths that will be prepended to PATH.

New in version 1.1.

purge(phase, pty_fd, cancellable)
Parameters:
Returns:

a Foundry.BuildProgress

Return type:

Foundry.BuildProgress

Purge the build pipeline. (e.g. make distclean)

query()
Returns:

a Dex.Future that resolves when all stage queries have completed or rejects with an error.

Return type:

Dex.Future

Query information about the state of all stages in the pipeline and update as necessary. This method calls [method`Foundry`.BuildStage.query] for each stage in parallel and resolves when all queries are complete.

New in version 1.1.

remove_stage(stage)
Parameters:

stage (Foundry.BuildStage) –

setenv(variable, value)
Parameters:
  • variable (str) –

  • value (str) –

Property Details

Foundry.BuildPipeline.props.arch
Name:

arch

Type:

str

Default Value:

None

Flags:

READABLE

Foundry.BuildPipeline.props.build_system
Name:

build-system

Type:

str

Default Value:

None

Flags:

READABLE

Foundry.BuildPipeline.props.config
Name:

config

Type:

Foundry.Config

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Foundry.BuildPipeline.props.device
Name:

device

Type:

Foundry.Device

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Foundry.BuildPipeline.props.enable_addins
Name:

enable-addins

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Foundry.BuildPipeline.props.phase
Name:

phase

Type:

Foundry.BuildPipelinePhase

Default Value:

Foundry.BuildPipelinePhase.NONE

Flags:

READABLE

Foundry.BuildPipeline.props.sdk
Name:

sdk

Type:

Foundry.Sdk

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Foundry.BuildPipeline.props.triplet
Name:

triplet

Type:

Foundry.Triplet

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY