Run Clippy on macOS (#2222)

* macos clippy

* Fix clippy on macOS
This commit is contained in:
Dominik Maier 2024-05-20 02:58:42 +02:00 committed by GitHub
parent cc71979826
commit 117741e1b1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 4 deletions

View File

@ -527,6 +527,8 @@ jobs:
run: ./scripts/shmem_limits_macos.sh
- name: Run Tests
run: cargo test
- name: Clippy
run: cargo +nightly clippy --tests --all
ios:
runs-on: macOS-latest

View File

@ -20,6 +20,10 @@ fn nightly() {}
fn main() {
println!("cargo:rustc-check-cfg=cfg(nightly)");
println!(r#"cargo::rustc-check-cfg=cfg(emulation_mode, values("usermode", "systemmode"))"#);
println!(
r#"cargo::rustc-check-cfg=cfg(cpu_target, values("arm", "aarch64", "hexagon", "i386", "mips", "ppc", "x86_64"))"#
);
nightly();
host_specific::build();
}

View File

@ -15,10 +15,6 @@ macro_rules! assert_unique_feature {
}
pub fn build() {
println!(r#"cargo::rustc-check-cfg=cfg(emulation_mode, values("usermode", "systemmode"))"#);
println!(
r#"cargo::rustc-check-cfg=cfg(cpu_target, values("arm", "aarch64", "hexagon", "i386", "mips", "ppc", "x86_64"))"#
);
// Make sure that exactly one qemu mode is set
assert_unique_feature!("usermode", "systemmode");
let emulation_mode = if cfg!(feature = "usermode") {