heddle_cli_args/cli/cli_args/commands_ci.rs
1// SPDX-License-Identifier: Apache-2.0
2//! Local CI executor arguments.
3
4use std::path::PathBuf;
5
6use clap::{Args, Subcommand};
7
8/// CI executor subcommands.
9#[derive(Clone, Debug, Subcommand)]
10pub enum CiCommands {
11 /// Run the configured checks against a local working tree or state.
12 Run(CiRunArgs),
13}
14
15/// Arguments for `heddle ci run`.
16#[derive(Clone, Debug, Args)]
17pub struct CiRunArgs {
18 /// Select the local, device-signed executor.
19 #[arg(long, required = true)]
20 pub local: bool,
21
22 /// Evaluate an immutable state instead of the current working tree.
23 #[arg(long, value_name = "STATE")]
24 pub state: Option<String>,
25
26 /// Read a CI definition from this path instead of `.heddle/ci.toml`.
27 #[arg(long, value_name = "PATH")]
28 pub config: Option<PathBuf>,
29
30 /// Run only this named check; may be repeated.
31 #[arg(long = "check", value_name = "NAME")]
32 pub checks: Vec<String>,
33}