From 665d75f35b127aa19df0e8b2c59d983b44c36ac4 Mon Sep 17 00:00:00 2001 From: jabu Date: Mon, 13 May 2024 23:30:44 -0500 Subject: [PATCH] don't set RUSTFLAGS in ci so it runs faster locally --- ci/src/main.rs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/ci/src/main.rs b/ci/src/main.rs index 1a188d0..a6248c4 100644 --- a/ci/src/main.rs +++ b/ci/src/main.rs @@ -20,8 +20,6 @@ bitflags! { } fn main() -> anyhow::Result<()> { - std::env::set_var("RUSTFLAGS", "-D warnings"); - let arguments = [ ("check", Check::CHECK), ("wasm-check", Check::WASM_CHECK), @@ -81,13 +79,19 @@ fn check(sh: &Shell, target: Target, features: Features) -> anyhow::Result<()> { let target_flags = &target.flags(); let feature_combination_flags = features.combination_flags(); for feature_flags in feature_combination_flags.iter() { - cmd!(sh, "cargo check {target_flags...} {feature_flags...}").run()?; + cmd!( + sh, + "cargo rustc {target_flags...} {feature_flags...} -- -D warnings" + ) + .run()?; } Ok(()) } fn example_check(sh: &Shell) -> anyhow::Result<()> { - cmd!(sh, "cargo check --examples").run()?; + for example in ["c", "miniquad", "simple"] { + cmd!(sh, "cargo rustc --example {example} -- -D warnings").run()?; + } Ok(()) } @@ -124,6 +128,6 @@ fn doc_check(sh: &Shell) -> anyhow::Result<()> { } fn clippy(sh: &Shell) -> anyhow::Result<()> { - cmd!(sh, "cargo clippy --workspace --all-targets").run()?; + cmd!(sh, "cargo clippy --workspace --all-targets -- -D warnings").run()?; Ok(()) }