-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathMakefile
More file actions
50 lines (40 loc) · 1.51 KB
/
Makefile
File metadata and controls
50 lines (40 loc) · 1.51 KB
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
.PHONY: build release clean check test fix install uninstall run coverage
build:
cargo build
# make run ARGS="http://localhost:3000/api/data"
run:
cargo run -q -p tempo-wallet -- $(ARGS)
release:
cargo build --release
install: release
mkdir -p $(HOME)/.tempo/bin
cp target/release/tempo-wallet $(HOME)/.tempo/bin/tempo-wallet
cp target/release/tempo-request $(HOME)/.tempo/bin/tempo-request
chmod +x $(HOME)/.tempo/bin/tempo-wallet $(HOME)/.tempo/bin/tempo-request
@echo ""
@echo "Installed:"
@$(HOME)/.tempo/bin/tempo-wallet --version
@$(HOME)/.tempo/bin/tempo-request --version
uninstall:
rm -f $(HOME)/.tempo/bin/tempo-wallet $(HOME)/.tempo/bin/tempo-request
clean:
cargo clean
# Run all tests (uses mocks, no network required)
test:
cargo test --workspace --all-features --locked
# Full local parity with CI lint+test gates.
# Requires `typos` and `cargo-deny` to be installed.
check:
cargo +nightly fmt --all -- --check
cargo +nightly clippy --workspace --all-targets --all-features --locked -- -D warnings
cargo test --workspace --all-features --locked
RUSTDOCFLAGS='-D warnings' cargo doc --workspace --all-features --no-deps --locked
typos
cargo deny check
fix:
cargo +nightly fmt --all
cargo clippy --fix --allow-dirty --allow-staged
# Generate coverage locally (requires cargo-llvm-cov and llvm-tools-preview)
# Install once: `rustup component add llvm-tools-preview` and `cargo install cargo-llvm-cov`
coverage:
cargo llvm-cov --all-features --workspace --fail-under-lines 85 --lcov --output-path lcov.info