forked from moka-rs/moka
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.cirrus.yml
85 lines (70 loc) · 2.99 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
83
84
85
env:
# This cfg will prevent to run tests requiring large memory (~8GiB)
RUSTFLAGS: --cfg circleci
NUM_CPUS: "2"
linux_arm64_task:
arm_container:
cpu: $NUM_CPUS
matrix:
- image: rust:slim # docker's official latest rust stable version
- image: rustlang/rust:nightly-slim # nightly hosted by rustlang
- image: rust:1.51.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'
cargo update -Z minimal-versions
else
echo 'Skipped'
fi
# Pin some dependencies to specific versions (MSRV only)
pin_deps_script: |
if [ "v$RUST_VERSION" == "v1.51.0" ]; then
echo 'Pinning some dependencies to specific versions'
cargo update -p dashmap --precise 5.2.0
cargo update -p indexmap --precise 1.8.2
cargo update -p hashbrown --precise 0.11.2
cargo update -p native-tls --precise 0.2.8
cargo update -p async-global-executor --precise 2.0.4
cargo update -p pulldown-cmark --precise 0.9.1
cargo update -p once_cell --precise 1.14.0
else
echo 'Skipped'
fi
test_script:
# Run tests (debug, sync feature)
- cargo test -j 1 --lib --features sync -- --test-threads=$NUM_CPUS
# Run tests (debug, sync feature, thread-pool test for sync::Cache)
- cargo test -j 1 --lib --features sync sync::cache::tests::enabling_and_disabling_thread_pools -- --exact --ignored --test-threads=$NUM_CPUS
# Run tests (debug, sync feature, thread-pool test for sync::SegmentCache)
- cargo test -j 1 --lib --features sync sync::segment::tests::enabling_and_disabling_thread_pools -- --exact --ignored --test-threads=$NUM_CPUS
# Run tests (release, sync feature)
- cargo test -j 1 --release --features sync -- --test-threads=$NUM_CPUS
# 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
# Run tests (dash feature, but no sync feature)
- cargo test -j 1 --no-default-features --features 'dash, atomic64, quanta' -- --test-threads=$NUM_CPUS
# before_cache_script:
# - rm -rf $CARGO_HOME/registry/index