-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile
41 lines (34 loc) · 1.36 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
29
30
31
32
33
34
35
36
37
38
39
40
41
build:
cargo build --all-features
# Run all tests and examples
test:
cargo test --tests --examples --all-features
cargo run --all-features --example isolate_test
cargo run --all-features --example ipc_server_with_database
# Run all tests with and without all features
test-ci:
cargo test --target=$(TARGET_TRIPLE) --tests --examples --all-features
cargo test --target=$(TARGET_TRIPLE) --tests --examples --no-default-features
cargo run --target=$(TARGET_TRIPLE) --all-features --example isolate_test
cargo run --target=$(TARGET_TRIPLE) --all-features --example ipc_server_with_database
# Run clippy
lint:
cargo clippy --no-deps --all-targets --all-features -- -W clippy::pedantic \
-A clippy::let-unit-value \
-A clippy::wildcard-imports \
-A clippy::module-name-repetitions \
-A clippy::uninlined-format-args
# Generate docs
doc:
RUSTDOCFLAGS="-Dwarnings" cargo doc --no-deps
do-cov:
cargo llvm-cov clean --workspace
cargo llvm-cov --no-report --tests --examples --all-targets --all-features --workspace
cargo llvm-cov --no-report --all-features run --example isolate_test
cargo llvm-cov --no-report --all-features run --example ipc_server_with_database
# Compute test coverage for CI with llvm-cov
coverage-ci: do-cov
cargo llvm-cov report --lcov --output-path lcov.info
# Compute test coverage with HTML output
coverage: do-cov
cargo llvm-cov report --html