From a0d05ed8dd4766edccfc0f39e5a9f76addef9f87 Mon Sep 17 00:00:00 2001 From: Valentin Date: Sat, 9 Nov 2024 17:09:28 +0100 Subject: [PATCH] temp --- .github/workflows/check.yml | 6 +++--- xtask/src/main.rs | 20 ++++++++------------ 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index bad503d..c4f3a6c 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - run: rustup default stable + - run: rustup --quiet default stable --component clippy - run: cargo fmt --check - run: cargo fetch --quiet --locked - run: cargo clippy --quiet --frozen --workspace --all-targets -- -D warnings @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - - run: rustup default 1.71 - - run: cargo fetch --locked + - run: rustup --quiet default 1.71 --component clippy + - run: cargo fetch --quiet --locked - run: cargo clippy --quiet --frozen --workspace --all-targets -- -D warnings - run: cargo xtask diff --git a/xtask/src/main.rs b/xtask/src/main.rs index c2d165b..c6571d0 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -45,19 +45,9 @@ fn main() -> Result<()> { }, ]; - let installed_targets = installed_rustup_targets().context("get installed rustup targets")?; - let missing_targets = targets.iter().map(|target| target.target).filter(|target| { - installed_targets - .iter() - .all(|installed_target| installed_target != target) - }); - for target in missing_targets { - println!("Installing needed rustup target {}.", target); - install_rustup_target(target).context("install rustup target")?; - } - for target in targets.iter() { println!("Handling target {}.", target.name); + install_rustup_target(target.target).context("install rustup target")?; clippy(target).context("clippy")?; expected_target(target).context("expected_target")?; qemu_test(target).context("qemu test")?; @@ -133,7 +123,13 @@ fn installed_rustup_targets() -> Result> { } fn install_rustup_target(target: &str) -> Result<()> { - run_command(Command::new("rustup").args(["--quiet", "target", "add", target]))?; + run_command(Command::new("rustup").args([ + "--quiet", + "target", + "add", + target, + "--component=clippy", + ]))?; Ok(()) }