diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 75513740..3f5e7104 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -50,7 +50,8 @@ jobs: # 2-core CPU (x86_64), 7 GB of RAM - name: Show CPU into run: | - nproc + echo "nproc: $(nproc)" + free -m lscpu - name: Install Rust toolchain diff --git a/.github/workflows/CIArm64.yml b/.github/workflows/CIArm64.yml index bff664f7..c7dc5348 100644 --- a/.github/workflows/CIArm64.yml +++ b/.github/workflows/CIArm64.yml @@ -45,7 +45,8 @@ jobs: # 2-core CPU (x86_64), 7 GB of RAM - name: Show CPU into run: | - nproc + echo "nproc: $(nproc)" + free -m lscpu - name: Install Rust toolchain @@ -59,12 +60,12 @@ jobs: - name: Run tests (debug, sync feature) run: cargo test --features sync env: - RUSTFLAGS: '--cfg rustver' + RUSTFLAGS: '--cfg rustver --cfg skip_large_mem_tests' - name: Run tests (release, sync feature) run: cargo test --release --features sync env: - RUSTFLAGS: '--cfg rustver' + RUSTFLAGS: '--cfg rustver --cfg skip_large_mem_tests' - name: Run tests (sync feature, key lock test for notification) run: cargo test --release --lib --features sync sync::cache::tests::test_key_lock_used_by_immediate_removal_notifications -- --exact --ignored @@ -80,6 +81,10 @@ jobs: - name: Run tests (future feature, but no sync feature) run: cargo test --no-default-features --features 'future, atomic64, quanta' + env: + RUSTFLAGS: '--cfg skip_large_mem_tests' - name: Run tests (future, sync and logging features) run: cargo test --features 'future, sync, logging' + env: + RUSTFLAGS: '--cfg skip_large_mem_tests' diff --git a/.github/workflows/Kani.yml b/.github/workflows/Kani.yml index 0c47f6a8..59c0bff2 100644 --- a/.github/workflows/Kani.yml +++ b/.github/workflows/Kani.yml @@ -39,9 +39,9 @@ jobs: - name: Show CPU into run: | - nproc - lscpu + echo "nproc: $(nproc)" free -m + lscpu - name: Pin some dependencies to specific versions run: ./.ci_extras/pin-crate-vers-kani.sh diff --git a/.vscode/settings.json b/.vscode/settings.json index 6cdda843..c9ae44b0 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -12,7 +12,6 @@ "benmanes", "cfgs", "CHECKME", - "circleci", "CLFU", "clippy", "Codecov", diff --git a/Cargo.toml b/Cargo.toml index b89c67a6..3e4a3c8f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ repository = "https://github.com/moka-rs/moka" keywords = ["cache", "concurrent"] categories = ["caching", "concurrency"] readme = "README.md" -exclude = [".circleci", ".cirrus.yml", ".devcontainer", ".github", ".gitpod.yml", ".vscode"] +exclude = [".devcontainer", ".github", ".gitpod.yml", ".vscode"] build = "build.rs" [features] diff --git a/build.rs b/build.rs index e99050f6..b82d02a6 100644 --- a/build.rs +++ b/build.rs @@ -3,10 +3,10 @@ const ALLOWED_CFG_NAMES: &[&str] = &[ "armv5te", "beta_clippy", - "circleci", "kani", "mips", "rustver", + "skip_large_mem_tests", "trybuild", ]; diff --git a/src/cht/segment.rs b/src/cht/segment.rs index 6d00efc1..7bd301bb 100644 --- a/src/cht/segment.rs +++ b/src/cht/segment.rs @@ -1393,14 +1393,10 @@ mod tests { NUM_VALUES - key_parents.iter().filter(|k| k.was_dropped()).count(); let bucket_array_len = map.capacity() * 2; assert_eq!(bucket_array_len, map.num_segments() * 128 * 2); - if !cfg!(circleci) { - // TODO: FIXME: These assertions sometimes fail when cargo tarpaulin - // is used on Circle CI. - assert!(live_key_count <= bucket_array_len / 10); + assert!(live_key_count <= bucket_array_len / 10); - for this_value_parent in value_parents.iter() { - assert!(this_value_parent.was_dropped()); - } + for this_value_parent in value_parents.iter() { + assert!(this_value_parent.was_dropped()); } for i in 0..NUM_VALUES { diff --git a/src/future/base_cache.rs b/src/future/base_cache.rs index 4881cd2b..f495bba1 100644 --- a/src/future/base_cache.rs +++ b/src/future/base_cache.rs @@ -2954,8 +2954,7 @@ mod tests { ensure_sketch_len(pot16 + 1, pot(17), "pot16 + 1").await; // The following tests will allocate large memory (~8GiB). - // Skip when running on Circle CI. - if !cfg!(circleci) { + if !cfg!(skip_large_mem_tests) { // due to ceiling to next_power_of_two ensure_sketch_len(pot30 - 1, pot30, "pot30- 1").await; ensure_sketch_len(pot30, pot30, "pot30").await; diff --git a/src/sync_base/base_cache.rs b/src/sync_base/base_cache.rs index 3d68de2d..64468479 100644 --- a/src/sync_base/base_cache.rs +++ b/src/sync_base/base_cache.rs @@ -2682,8 +2682,7 @@ mod tests { ensure_sketch_len(pot16 + 1, pot(17), "pot16 + 1"); // The following tests will allocate large memory (~8GiB). - // Skip when running on Circle CI. - if !cfg!(circleci) { + if !cfg!(skip_large_mem_tests) { // due to ceiling to next_power_of_two ensure_sketch_len(pot30 - 1, pot30, "pot30- 1"); ensure_sketch_len(pot30, pot30, "pot30");