Skip to content

Commit

Permalink
temp
Browse files Browse the repository at this point in the history
  • Loading branch information
e00E committed Nov 9, 2024
1 parent 31a7c90 commit a0d05ed
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 15 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
20 changes: 8 additions & 12 deletions xtask/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")?;
Expand Down Expand Up @@ -133,7 +123,13 @@ fn installed_rustup_targets() -> Result<Vec<String>> {
}

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(())
}

Expand Down

0 comments on commit a0d05ed

Please sign in to comment.