forked from Haroldwonder/AnchorKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
56 lines (43 loc) · 1.29 KB
/
Copy pathMakefile
File metadata and controls
56 lines (43 loc) · 1.29 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
.PHONY: build test lint fmt clean deploy-testnet help build-wasm storybook validate coverage bench
## build: Build the contract in release mode
build:
cargo build --release
## test: Run all Rust tests
test:
cargo test
## bench: Run criterion benchmarks for contract hot paths
bench:
cargo bench
## lint: Run clippy with warnings as errors
lint:
cargo clippy -- -D warnings
## build-wasm: Build the contract WASM artifact used for deployment
build-wasm:
cargo build --release --target wasm32-unknown-unknown
## storybook: Run Storybook (UI components)
storybook:
cd ui && npm run storybook
## validate: Run repo validation (configs + Rust validation)
validate:
./validate_all.sh
## coverage: Run Rust + UI coverage (best-effort)
coverage:
cargo tarpaulin --version >/dev/null 2>&1 || true
@echo "(1/2) Rust coverage"
@cargo tarpaulin --ignore-tests 2>/dev/null || cargo test
@echo "(2/2) UI coverage"
cd ui && npm run test:coverage
## fmt: Format code with rustfmt
fmt:
cargo fmt
## clean: Remove build artifacts
clean:
cargo clean
## deploy-testnet: Deploy contract to Stellar testnet
deploy-testnet:
soroban contract deploy \
--wasm target/wasm32-unknown-unknown/release/anchor_kit.wasm \
--network testnet
## help: Show this help message
help:
@grep -E '^## ' Makefile | sed 's/## //'