-
-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathMakefile
40 lines (32 loc) · 847 Bytes
/
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
.DEFAULT_GOAL := all
.PHONY: install-rust-coverage
install-rust-coverage:
cargo install rustfilt cargo-binutils
rustup component add llvm-tools-preview
.PHONY: build-prod
build-prod:
cargo build --release
.PHONY: format
format:
cargo fmt
.PHONY: lint
lint:
cargo fmt --version
cargo fmt --all -- --check
cargo clippy --version
cargo clippy -- -D warnings -A incomplete_features
cargo doc
.PHONY: test
test:
RUSTFLAGS='-Z macro-backtrace' cargo test
.PHONY: bench
bench:
cargo bench
.PHONY: testcov
testcov:
RUSTFLAGS='-C instrument-coverage' cargo test --test main
coverage-prepare --ignore-filename-regex '/tests/' lcov $(shell find target/debug/deps -regex '.*/main[^.]*')
genhtml rust_coverage.lcov --output-directory htmlcov
@echo "HTML coverage report available at htmlcov/index.html"
.PHONY: all
all: format lint test