-
Notifications
You must be signed in to change notification settings - Fork 12
/
.cirrus.yml
72 lines (71 loc) · 2.04 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
test_task:
name: cargo test
env:
RUSTDOCFLAGS: -D warnings
matrix:
- container:
image: rust:1.49.0
- container:
image: rust:latest
- container:
image: rustlang/rust:nightly
cargo_cache:
folder: $CARGO_HOME/registry
build_script:
- if rustc --version | grep -q 1.49.0; then
- cp Cargo.lock.msrv Cargo.lock
- fi
- if rustc --version | grep -q nightly; then
- cargo build --all-targets
- else
- cargo build
- fi
test_script:
- if rustc --version | grep -q nightly; then
- cargo test --all-targets
- else
- cargo test
- fi
- cargo test --no-default-features
doc_script:
- if rustc --version | grep -q nightly; then
- cargo doc --all-features --no-deps
- fi
clippy_script:
- if rustc --version | grep -q nightly; then
- rustup component add clippy
- cargo clippy --all-features --all-targets
- fi
audit_script:
- if rustc --version | grep -q nightly; then
- cargo install cargo-audit
- cargo audit
- fi
minver_script:
- if rustc --version | grep -q nightly; then
- cargo update -Zdirect-minimal-versions
- cargo check --all-targets
- fi
before_cache_script: rm -rf $CARGO_HOME/registry/index
codecov_task:
name: codecov
depends_on:
- cargo test
environment:
CODECOV_TOKEN: ENCRYPTED[8cd2d4365a2079c3ee4c4d7ce9cbb8ac440cd341f9e688318b923f026c7d8bfbdb0556c2c238a67b3f44dd396f25b1f5]
# Improves coverage accuracy
RUSTFLAGS: "-C link-dead-code"
matrix:
- container:
image: rust:latest
cargo_cache:
folder: $CARGO_HOME/registry
setup_script:
- apt-get -y update
- apt-get -y install libcurl4-openssl-dev libelf-dev libdw-dev cmake gcc binutils-dev libiberty-dev python-is-python3
- cargo install cargo-llvm-cov
codecov_script:
- cargo check # Ensure Cargo.lock exists
- cargo llvm-cov --lcov --output-path lcov.info
- bash <(curl -s https://codecov.io/bash)
before_cache_script: rm -rf $CARGO_HOME/registry/index