Gunnar

nordisk/dwarves

holger.runa.ron

// holger.runa.ron — the holger CI/CD pipeline, authored in the typed `runa` format.
//
// This is the `*.runa.ron` port of the in-code `dwarves::holger_build::holger_pipeline`
// (crates/dwarves/src/holger_build.rs): holger ships ONE source tree built three ways
// — the deployment tiers `embedded` · `mini` · `full`, each producing its own binary
// (`holger-embedded` / `holger-mikro` / `holger-full`). It proves the runa format
// end-to-end: `dwarves run holger.runa.ron` loads + validates this file, topo-orders
// the stage DAG, and dispatches every step through the real jera Scheduler.
//
// Each `Build{variant}` names a build-thing variant holger declares in its
// `.nornir/build-variants.toml`; the forge resolves it against that discovered set and
// drives `nornir-build-thing::build_variant` IN-PROCESS (a real `cargo build`, zero
// shell). The `ReleaseDoctor` step kicks off the dwarves release engine in DRY-RUN.
//
// To execute against a real holger checkout:
//   DWARVES_REPO_ROOT=/path/to/holger dwarves run holger.runa.ron
// (else the repo root defaults to this file's directory).
Pipeline(
    name: "holger-tiers",
    // Built on a release push to main, and always startable by hand.
    triggers: [
        Push(branch: "main"),
        Manual,
    ],
    stages: [
        // ── build: one Build step per holger deployment tier (holger's real declared
        //    build-thing variant names). `"*"` would instead fan out over the WHOLE
        //    discovered variant set as a matrix; naming the tiers is explicit + stable.
        Stage(
            name: "build",
            steps: [
                Build(variant: "embedded"),
                Build(variant: "mini"),
                Build(variant: "full"),
            ],
        ),
        // ── test: gate the built tiers behind the fast test + lint matrix.
        Stage(
            name: "test",
            needs: ["build"],
            steps: [
                Nextest(all_features: true),
                Lint(tool: Clippy, deny_warnings: true),
            ],
        ),
        // ── package: forge the tier executables into holger deploy packages.
        Stage(
            name: "package",
            needs: ["build"],
            steps: [
                HolgerPackage(targets: ["x86_64-unknown-linux-gnu"]),
            ],
        ),
        // ── release: kick off the deps-first crates.io release PLAN (dry-run — the
        //    forge NEVER --execute/publishes from a pipeline step).
        Stage(
            name: "release",
            needs: ["test", "package"],
            steps: [
                ReleaseDoctor,
            ],
        ),
    ],
)