forked from nervosnetwork/ckb-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
34 lines (24 loc) · 1.27 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
# -D clippy::fallible_impl_from
CLIPPY_OPTS := -D warnings -D clippy::clone_on_ref_ptr -D clippy::enum_glob_use \
-A clippy::mutable_key_type -A clippy::upper_case_acronyms
fmt:
cargo fmt --all -- --check
cd test && cargo fmt --all -- --check
clippy:
cargo clippy --all --all-targets --all-features -- ${CLIPPY_OPTS}
cp -f Cargo.lock test/Cargo.lock && cd test && cargo clippy --all -- ${CLIPPY_OPTS}
test:
RUST_BACKTRACE=full cargo test --all
ci: fmt clippy test security-audit check-crates check-licenses
git diff --exit-code Cargo.lock
integration:
bash devtools/ci/integration.sh v0.118.0-rc2
prod: ## Build binary with release profile.
cargo build --release
security-audit: ## Use cargo-deny to audit Cargo.lock for crates with security vulnerabilities.
cargo deny check --hide-inclusion-graph --show-stats advisories sources -Wunmaintained
check-crates: ## Use cargo-deny to check specific crates, detect and handle multiple versions of the same crate and wildcards version requirement.
cargo deny check --hide-inclusion-graph --show-stats bans
check-licenses: ## Use cargo-deny to check licenses for all dependencies.
cargo deny check --hide-inclusion-graph --show-stats licenses
.PHONY: test clippy fmt integration ci prod security-audit check-crates check-licenses