ci: Test loom under no-default-features

This commit adds loom tests to CI with --no-default-features, then also
fixes a compile error that was introduced in a new version of loom.

Closes #64
This commit is contained in:
John Nunley 2024-03-31 11:09:52 -07:00 committed by GitHub
parent c407467c20
commit 59e93fc952
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 0 deletions

View File

@ -107,6 +107,11 @@ jobs:
env:
RUSTFLAGS: "--cfg=loom"
LOOM_MAX_PREEMPTIONS: 4
- name: Loom tests without default features
run: cargo test --release --test loom --features loom --no-default-features
env:
RUSTFLAGS: "--cfg=loom"
LOOM_MAX_PREEMPTIONS: 4
security_audit:
permissions:

View File

@ -36,6 +36,9 @@ mod sync_impl {
pub(crate) use loom::sync::atomic::*;
}
#[cfg(not(feature = "std"))]
pub(crate) use loom::hint::spin_loop;
#[cfg(feature = "std")]
pub(crate) use loom::thread::yield_now;
}