Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
bevyengine
GitHub Repository: bevyengine/bevy
Path: blob/main/tools/ci/src/commands/bench_check.rs
6598 views
1
use crate::{args::Args, Prepare, PreparedCommand};
2
use argh::FromArgs;
3
use xshell::cmd;
4
5
/// Checks that the benches compile.
6
#[derive(FromArgs, Default)]
7
#[argh(subcommand, name = "bench-check")]
8
pub struct BenchCheckCommand {}
9
10
impl Prepare for BenchCheckCommand {
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!(
16
sh,
17
"cargo check --benches {jobs...} --target-dir ../target --manifest-path ./benches/Cargo.toml"
18
),
19
"Failed to check the benches.",
20
)]
21
}
22
}
23
24