-
Notifications
You must be signed in to change notification settings - Fork 20
/
makefile
28 lines (22 loc) · 1.11 KB
/
makefile
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
.PHONEY: coverage, test-32-bit, docs, docs-open, codecov-check
coverage-html:
mkdir -p target/coverage/html
mkdir -p target/coverage/raw
CARGO_INCREMENTAL=0 RUSTFLAGS='-Cinstrument-coverage' LLVM_PROFILE_FILE='target/coverage/raw/cargo-test-%p-%m.profraw' cargo test
grcov . --binary-path ./target/debug/deps/ -s . -t html --branch --ignore-not-existing --ignore '../*' --ignore "/*" -o target/coverage/html
rm target/coverage/raw/*.profraw
open target/coverage/html/index.html
coverage-lcov:
mkdir -p target/coverage/lcov
mkdir -p target/coverage/raw
CARGO_INCREMENTAL=0 RUSTFLAGS='-Cinstrument-coverage' LLVM_PROFILE_FILE='target/coverage/raw/cargo-test-%p-%m.profraw' cargo test
grcov . --binary-path ./target/debug/deps/ -s . -t lcov --branch --ignore-not-existing --ignore '../*' --ignore "/*" -o target/coverage/lcov/tests.lcov
rm target/coverage/raw/*.profraw
docs:
cargo +nightly doc
docs-open:
cargo +nightly doc --open
test-32-bit:
docker run --rm -v "$(PWD)":/usr/src/myapp -w /usr/src/myapp i386/rust:1.42.0 cargo test
codecov-check:
curl -X POST --data-binary @codecov.yml https://codecov.io/validate