-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
78 lines (59 loc) · 1.91 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
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
73
74
75
76
77
78
.PHONY: update format lint tests build release install uninstall docs clean demo
.DEFAULT_GOAL := build
# -----------------------------------------------------------------------------
# Developer Operations
# -----------------------------------------------------------------------------
update:
cargo update
format:
cargo fmt
line-count:
find src -name '*.rs' | xargs wc -l
lint:
cargo fmt --check
cargo check
cargo clippy
tests:
RUST_LOG=debug RUST_BACKTRACE=1 cargo test -- --test-threads=1
coverage: export CARGO_INCREMENTAL=0
coverage: export CARGO_ENCODED_RUSTFLAGS=-Cinstrument-coverage
coverage: export LLVM_PROFILE_FILE=cargo-test-%p-%m.profraw
coverage:
@mkdir -p target/coverage
@rm -rf target/coverage/*
cargo test -- --test-threads=1
@grcov . --binary-path ./target/debug/deps/ -s . -t lcov --branch --ignore-not-existing --ignore '../*' --ignore "/*" -o target/coverage/tests.lcov
@find . -name '*.profraw' -delete
coverage_report: export CARGO_INCREMENTAL=0
coverage_report: export CARGO_ENCODED_RUSTFLAGS=-Cinstrument-coverage
coverage_report: export LLVM_PROFILE_FILE=cargo-test-%p-%m.profraw
coverage_report:
@mkdir -p target/coverage
@rm -rf target/coverage/*
cargo test -- --test-threads=1
@grcov . --binary-path ./target/debug/deps/ -s . -t html --branch --ignore-not-existing --ignore '../*' --ignore "/*" -o target/coverage/html
@find . -name '*.profraw' -delete
open target/coverage/html/index.html
build:
cargo build
release:
cargo build --release
install:
cargo install --path .
uninstall:
cargo uninstall
docs:
cargo doc --workspace --no-deps --open
CHANGELOG.md:
git cliff > CHANGELOG.md
clean:
cargo clean
rm -rf debug/
rm -rf target/
find . -name '*.rs.bk' -delete
find . -name '*.pdb' -delete
demo:
docker build -f demo/Dockerfile -t awsipranges-demo:local .
docker run --rm -v $$(pwd)/demo:/vhs awsipranges-demo:local demo.tape
publish-demo:
vhs publish demo/awsipranges.gif