-
-
Notifications
You must be signed in to change notification settings - Fork 62
/
.cirrus.yml
82 lines (66 loc) · 2.91 KB
/
.cirrus.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
env:
# This cfg will prevent to run tests requiring large memory (~8GiB)
RUSTFLAGS: --cfg circleci
NUM_CPUS: "2"
linux_arm64_task:
# Skip the whole task when this is a temporary branch for GitHub merge queue.
skip: $CIRRUS_BRANCH =~ 'gh-readonly-queue/.*'
arm_container:
cpu: $NUM_CPUS
matrix:
- image: rust:slim # docker's official latest rust stable version
## Disable jobs for nightly and the MSRV to avoid to hit the concurrency limit.
# - image: rustlang/rust:nightly-slim # nightly hosted by rustlang
# - image: rust:1.65.0-slim # MSRV
# no rust-beta image found in docker hub, won't be tested
## Disable caching as there is no Cargo.lock file in Moka repository.
# registry_cache:
# folder: $CARGO_HOME/registry
# fingerprint_script: cat Cargo.lock
# target_cache:
# folder: target
# fingerprint_script:
# - rustc --version
# - cat Cargo.lock
# Install dependencies (native libraries)
setup_script:
- apt-get update
- apt-get install -y libssl-dev pkg-config
show_cpu_info_script: |
nproc
lscpu
# Show Rust version
check_version_script: rustc -Vv
# Downgrade dependencies to minimal versions (Nightly only)
# downgrade_deps_script: |
# # The nightly image has no RUST_VERSION set
# if [ -z "$RUST_VERSION" ]; then
# echo 'Downgrading dependencies to minimal versions'
# else
# echo 'Skipped'
# fi
# Pin some dependencies to specific versions (MSRV only)
# pin_deps_script: |
# if [ "v$RUST_VERSION" == "v1.65.0" ]; then
# echo 'Pinning some dependencies to specific versions'
# cargo update -p <crate> --precise <version>
# else
# echo 'Skipped'
# fi
test_script:
# Run tests (debug, sync feature)
- cargo test -j 1 --lib --features sync -- --test-threads=$NUM_CPUS
# Run tests (release, sync feature)
- cargo test -j 1 --release --features sync -- --test-threads=$NUM_CPUS
# Run tests (sync feature, key lock test for notification)
- cargo test --release --lib --features sync sync::cache::tests::test_key_lock_used_by_immediate_removal_notifications -- --exact --ignored
# Run tests (sync feature, drop value after eviction for sync::Cache)
- cargo test --release --lib --features sync sync::cache::tests::drop_value_immediately_after_eviction -- --exact --ignored
# Run tests (sync feature, drop value after eviction for sync::SegmentedCache)
- cargo test --release --lib --features sync sync::segment::tests::drop_value_immediately_after_eviction -- --exact --ignored
# Run tests (future feature, but no sync feature)
- cargo test -j 1 --no-default-features --features 'future, atomic64, quanta' -- --test-threads=$NUM_CPUS
# Run tests (future, sync and logging features)
- cargo test -j 1 --features 'future, sync, logging' -- --test-threads=$NUM_CPUS
# before_cache_script:
# - rm -rf $CARGO_HOME/registry/index