-
Notifications
You must be signed in to change notification settings - Fork 1
/
.cirrus.yml
90 lines (88 loc) · 2.8 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
86
87
88
89
90
task:
name: stable
container:
image: rust
cpu: 1
memory: 1G
allow_failures: false
env:
RUST_BACKTRACE: 1
cargo_cache:
folder: $HOME/.cargo/registry
fingerprint_script: cat Cargo.lock 2> /dev/null || true
target_cache:
folder: target
fingerprint_script: cat Cargo.lock 2> /dev/null || true
setup_script:
- rustup component add clippy
info_script:
- rustc --version
check_script:
- cargo check --examples --tests --no-default-features
- cargo check --examples --tests --no-default-features --features std
- cargo check --examples --tests --no-default-features --features ascii
- cargo build --examples --tests --all-features
- cargo clippy --tests --examples --all-features
test_script:
- cargo test --all-features --no-fail-fast -- --test-threads=1
before_cache_script:
- rm -rf $HOME/.cargo/registry/index
task:
name: MSRV
container:
image: rust:1.56
cpu: 1
memory: 1G
allow_failures: false
env:
RUST_BACKTRACE: 1
cargo_cache:
folder: $HOME/.cargo/registry
fingerprint_script: cat Cargo.lock 2> /dev/null || true
target_cache:
folder: target
fingerprint_script: cat Cargo.lock 2> /dev/null || true
info_script:
- rustc --version
build_script:
# Lock to the specified minor versions of dependencies
# to test that they work with our MSRV.
# But that doesn't cover recursive dependencies,
# so avoid checking examples and tests because they build dev dependencies.
# Tests and examples don't need to work at MSRV anyway.
- sed -i 's/"^/"~/' Cargo.toml
- cargo check --no-default-features
- cargo check --no-default-features --features std
- cargo check --no-default-features --features ascii
- cargo check --all-features
before_cache_script:
- rm -rf $HOME/.cargo/registry/index
task:
name: nightly
container:
image: rustlang/rust:nightly
cpu: 1
memory: 1G
allow_failures: false
cargo_cache:
folder: $HOME/.cargo/registry
fingerprint_script: cat Cargo.lock 2> /dev/null || true
# rustc version is so likely to have changed that build artefacts are not worth caching
setup_script:
- cargo install cargo-fuzz
- rustup component add miri
info_script:
- rustc --version
check_script:
- cargo check --benches --no-default-features
- cargo check --benches --no-default-features --features std
- cargo check --benches --no-default-features --features ascii
- cargo build --benches --all-features
- cargo fuzz build
# fuzz supports feature selection,
# but --no-default-features doesn't seem to have any effect
test_script:
# the doc tets are fast and should cover a lot of code
- cargo miri test --all-features --doc -- --test-threads=1
before_cache_script:
- rm -rf $HOME/.cargo/registry/index