-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
73 lines (55 loc) · 2.72 KB
/
Copy pathMakefile
File metadata and controls
73 lines (55 loc) · 2.72 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
.PHONY: build test fmt lint clean check audit
# ─── Build ───────────────────────────────────────────────────────────────
## Build all contracts for WASM deployment
build:
cargo build --release --target wasm32-unknown-unknown
## Build with the Stellar CLI (preferred)
build-stellar:
stellar contract build
# ─── Test ────────────────────────────────────────────────────────────────
## Run all tests
test:
cargo test --all
## Run tests for a specific contract (usage: make test-one CRATE=ajo-pool)
test-one:
cargo test -p $(CRATE) -- --nocapture
## Run tests in release mode
test-release:
cargo test --all --release
# ─── Lint & Format ───────────────────────────────────────────────────────
## Format all source files
fmt:
cargo fmt --all
## Check formatting (CI mode)
fmt-check:
cargo fmt --all -- --check
## Run clippy lints
lint:
cargo clippy --all-targets -- -D warnings
## Run all checks (format + lint + WASM check)
check: fmt-check lint
cargo check --target wasm32-unknown-unknown
# ─── Security ────────────────────────────────────────────────────────────
## Run dependency security audit
audit:
cargo audit
# ─── Clean ───────────────────────────────────────────────────────────────
## Remove build artifacts
clean:
cargo clean
# ─── Help ────────────────────────────────────────────────────────────────
## Show available commands
help:
@echo "AjoChain Development Commands:"
@echo ""
@echo " make build Build all contracts (WASM)"
@echo " make build-stellar Build using Stellar CLI"
@echo " make test Run all tests"
@echo " make test-one Run tests for one contract (CRATE=ajo-pool)"
@echo " make test-release Run tests in release mode"
@echo " make fmt Format source files"
@echo " make fmt-check Check formatting (CI)"
@echo " make lint Run clippy lints"
@echo " make check Run all checks"
@echo " make audit Security audit"
@echo " make clean Remove build artifacts"