-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
27 lines (18 loc) · 882 Bytes
/
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
.PHONY: rust-lint rust-lint-near rust-lint-omni-relayer
LINT_OPTIONS = -D warnings -D clippy::pedantic -A clippy::missing_errors_doc -A clippy::must_use_candidate -A clippy::module_name_repetitions
RUSTFLAGS = -C link-arg=-s
NEAR_MANIFEST = ./near/Cargo.toml
OMNI_RELAYER_MANIFEST = ./omni-relayer/Cargo.toml
clippy: clippy-near #clippy-relayer
clippy-near:
cargo clippy --manifest-path $(NEAR_MANIFEST) -- $(LINT_OPTIONS)
fmt-near:
cargo fmt --all --check --manifest-path $(NEAR_MANIFEST)
fmt-omni-relayer:
cargo fmt --all --check --manifest-path $(OMNI_RELAYER_MANIFEST)
clippy-omni-relayer:
cargo clippy --manifest-path $(OMNI_RELAYER_MANIFEST) -- $(LINT_OPTIONS)
rust-build-near:
RUSTFLAGS='$(RUSTFLAGS)' cargo build --target wasm32-unknown-unknown --release --manifest-path $(NEAR_MANIFEST)
test-near: rust-build-near
cargo test --manifest-path $(NEAR_MANIFEST)