Skip to main content

Module ci

Module ci 

Source
Expand description

CI workflows defined in code instead of YAML.

The builder produces exactly the file bsdkrun ci (and tangled’s spindle) consumes — CiWorkflow::yaml is that file, CiWorkflow::save commits it to .tangled/workflows/, and CiWorkflow::run executes it in a microVM without a file ever touching the repository:

use bsdkrun_sdk::ci;

ci::workflow("test")
    .on_push(["main"])
    .deps(["rustc", "cargo"])
    .env("CARGO_INCREMENTAL", "0")
    .step("check", "cargo check")
    .step("test", "cargo test")
    .run()?;

Code is the source of truth and YAML the wire format, in that order — which is why save writes a generated-file header: a hand-edit there will be overwritten by the next save.

Structs§

CiWorkflow
A workflow under construction. See the module docs for the shape.

Functions§

workflow
Start a CI workflow definition.