File: Makefile

package info (click to toggle)
rust-speedate 0.17.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 340 kB
  • sloc: makefile: 34
file content (40 lines) | stat: -rw-r--r-- 847 bytes parent folder | download | duplicates (2)
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