Skip to content

Commit

Permalink
don't set RUSTFLAGS in ci so it runs faster locally
Browse files Browse the repository at this point in the history
  • Loading branch information
jabuwu committed May 14, 2024
1 parent 7978774 commit 665d75f
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions ci/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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(())
}

Expand Down Expand Up @@ -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(())
}

0 comments on commit 665d75f

Please sign in to comment.