forked from istio/ztunnel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.core.mk
65 lines (46 loc) · 1.49 KB
/
Makefile.core.mk
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
include common/Makefile.common.mk
FEATURES ?=
ifeq ($(TLS_MODE), boring)
FEATURES:=--no-default-features -F tls-boring
endif
test:
RUST_BACKTRACE=1 cargo test --benches --tests --bins $(FEATURES)
coverage:
FEATURES=$(FEATURES) ./scripts/test-with-coverage.sh
build:
cargo build $(FEATURES)
# Build the inpodserver example
inpodserver:
cargo build --example inpodserver
# Test that all important features build
check-features:
cargo check --no-default-features -F tls-boring
cargo check -F jemalloc
(cd fuzz; RUSTFLAGS="--cfg fuzzing" cargo check)
# target in common/Makefile.common.mk doesn't handle our third party vendored files; only check golang and rust codes
lint-copyright:
@${FINDFILES} \( -name '*.go' -o -name '*.rs' \) \( ! \( -name '*.gen.go' -o -name '*.pb.go' -o -name '*_pb2.py' \) \) -print0 |\
${XARGS} common/scripts/lint_copyright_banner.sh
lint: lint-scripts lint-yaml lint-markdown lint-licenses lint-copyright
cargo clippy --benches --tests --bins $(FEATURES)
check:
cargo check $(FEATURES)
cve-check:
cargo deny check advisories $(FEATURES)
license-check:
cargo deny check licenses $(FEATURES)
fix: fix-copyright-banner
cargo clippy --fix --allow-staged --allow-dirty $(FEATURES)
cargo fmt
format:
cargo fmt
release:
./scripts/release.sh
gen: format
gen-check: gen check-clean-repo
presubmit: export RUSTFLAGS = -D warnings
presubmit: check-features test lint gen-check
clean:
cargo clean $(FEATURES)
rust-version:
./common/scripts/run.sh /usr/bin/rustc -vV