Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
bevyengine
GitHub Repository: bevyengine/bevy
Path: blob/main/tools/ci/src/commands/example_check.rs
6598 views
1
use crate::{args::Args, Prepare, PreparedCommand};
2
use argh::FromArgs;
3
use xshell::cmd;
4
5
/// Checks that the examples compile.
6
#[derive(FromArgs, Default)]
7
#[argh(subcommand, name = "example-check")]
8
pub struct ExampleCheckCommand {}
9
10
impl Prepare for ExampleCheckCommand {
11
fn prepare<'a>(&self, sh: &'a xshell::Shell, args: Args) -> Vec<PreparedCommand<'a>> {
12
let jobs = args.build_jobs();
13
14
vec![PreparedCommand::new::<Self>(
15
cmd!(sh, "cargo check --workspace --examples {jobs...}"),
16
"Please fix compiler errors for examples in output above.",
17
)]
18
}
19
}
20
21