Skip to content

Commit 6ce63b9

Browse files
committed
Expand CI
1 parent fea86fa commit 6ce63b9

3 files changed

Lines changed: 32 additions & 9 deletions

File tree

.github/workflows/ci.yml

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,34 @@
11
name: Continuous integration
22
on: [push, pull_request]
33

4+
env:
5+
RUSTFLAGS: "-Dwarnings"
6+
RUSTDOCFLAGS: "-Dwarnings"
7+
8+
permissions:
9+
contents: read
10+
411
jobs:
5-
ci:
12+
tests:
13+
name: Tests
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
17+
- uses: dtolnay/rust-toolchain@e814c742d4444ce2f3f6abddea7faf00161ed941 # 1.88.0
18+
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
19+
- run: cargo test --workspace --all-features --no-run
20+
- run: cargo test --workspace --all-features --no-fail-fast
21+
- run: git diff --exit-code
22+
23+
checks:
24+
name: Check clippy, formatting, and documentation
625
runs-on: ubuntu-latest
726
steps:
8-
- uses: actions/checkout@v3
9-
- uses: dtolnay/rust-toolchain@1.88.0
10-
- run: cargo build --all-features
11-
- run: cargo test --all-features
27+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
28+
- uses: dtolnay/rust-toolchain@e814c742d4444ce2f3f6abddea7faf00161ed941 # 1.88.0
29+
with:
30+
components: clippy, rustfmt
31+
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
32+
- run: cargo clippy --workspace --all-targets --all-features
33+
- run: cargo fmt --check --all
34+
- run: cargo doc --workspace --no-deps

macros/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ use syn::{Error, Result, parse_quote};
9090
/// arguments.
9191
///
9292
/// # Example
93-
/// ```
93+
/// ```ignore
9494
/// /// Evaluate a `.calc` script.
9595
/// #[comemo::memoize]
9696
/// fn evaluate(script: &str, files: comemo::Tracked<Files>) -> i32 {
@@ -120,7 +120,7 @@ use syn::{Error, Result, parse_quote};
120120
/// and caching.
121121
///
122122
/// ## Example
123-
/// ```
123+
/// ```ignore
124124
/// /// Compute the sum of a slice of floats, but only memoize if the slice is
125125
/// /// longer than 1024 elements.
126126
/// #[comemo::memoize(enabled = add.len() > 1024)]
@@ -188,7 +188,7 @@ pub fn memoize(args: BoundaryStream, stream: BoundaryStream) -> BoundaryStream {
188188
/// - They cannot use destructuring patterns in their arguments.
189189
///
190190
/// # Example
191-
/// ```
191+
/// ```ignore
192192
/// /// File storage.
193193
/// struct Files(HashMap<PathBuf, String>);
194194
///

src/accelerate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use std::sync::atomic::{AtomicUsize, Ordering};
22

3-
use rustc_hash::FxHashMap;
43
use parking_lot::{MappedRwLockReadGuard, Mutex, RwLock, RwLockReadGuard};
4+
use rustc_hash::FxHashMap;
55

66
/// The global list of currently alive accelerators.
77
static ACCELERATORS: RwLock<(usize, Vec<Accelerator>)> = RwLock::new((0, Vec::new()));

0 commit comments

Comments
 (0)