Skip to content

Commit

Permalink
Add flag to deny warnings in workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
mirromutth committed Dec 19, 2023
1 parent 048df23 commit ea8f3fe
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 7 deletions.
1 change: 1 addition & 0 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
timeout-minutes: 10
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -D warnings
steps:
- uses: actions/checkout@v4
- name: Install Rust
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ jobs:
timeout-minutes: 10
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -D warnings
steps:
- uses: actions/checkout@v4
- name: Install Rust
run: rustup update stable
- name: Publish to crates.io
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: cargo publish -p latches --all-features
run: cargo publish -p latches
17 changes: 15 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,27 @@ on: [ pull_request ]
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10
timeout-minutes: 15
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -D warnings
steps:
- uses: actions/checkout@v4
- name: Install Rust
run: rustup update stable
- name: Run tests with no-std
- name: Run tests for sync with atomic-wait
run: cargo test -p latches --no-default-features --features sync --features atomic-wait
- name: Run tests for sync with std
run: cargo test -p latches --no-default-features --features sync --features std
- name: Run tests for futex
run: cargo test -p latches --no-default-features --features futex
- name: Run tests for task with spins
run: cargo test -p latches --no-default-features --features task
- name: Run tests for task with atomic-wait
run: cargo test -p latches --no-default-features --features task --features atomic-wait
- name: Run tests for task with std
run: cargo test -p latches --no-default-features --features task --features std
- name: Run tests for all with atomic-wait
run: cargo test -p latches --no-default-features --features task --features futex --features sync
- name: Run tests with std
run: cargo test -p no-std-tests -p latches --all-features
6 changes: 2 additions & 4 deletions latches/src/lock/futexes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@ use core::{
cell::UnsafeCell,
hint,
ops::{Deref, DerefMut},
sync::atomic::Ordering::{Acquire, Release},
};
use core::{
marker::PhantomData,
sync::atomic::{
AtomicU32,
Ordering::{Acquire, Relaxed, Release},
},
sync::atomic::{AtomicU32, Ordering::Relaxed},
};

/// An alternative to [`std::sync::Mutex`] for `no_std`.
Expand Down

0 comments on commit ea8f3fe

Please sign in to comment.