bevy/tools/ci/src/commands/bench_check.rs
Mike 3d460e98ec
Fix CI bench compile check (#14728)
# Objective

- Fixes #14723 

## Solution

- add the manifest path to the cargo command

## Testing

- ran `cargo run -p ci -- bench-check` locally
2024-08-14 13:23:00 +00:00

21 lines
613 B
Rust

use crate::{Flag, Prepare, PreparedCommand};
use argh::FromArgs;
use xshell::cmd;
/// Checks that the benches compile.
#[derive(FromArgs, Default)]
#[argh(subcommand, name = "bench-check")]
pub struct BenchCheckCommand {}
impl Prepare for BenchCheckCommand {
fn prepare<'a>(&self, sh: &'a xshell::Shell, _flags: Flag) -> Vec<PreparedCommand<'a>> {
vec![PreparedCommand::new::<Self>(
cmd!(
sh,
"cargo check --benches --target-dir ../target --manifest-path ./benches/Cargo.toml"
),
"Failed to check the benches.",
)]
}
}