forked from AlienScroll78/vesting-cliff-drip-stream
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (31 loc) · 1.28 KB
/
Copy pathMakefile
File metadata and controls
41 lines (31 loc) · 1.28 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
# ──────────────────────────────────────────────────────────────
# Vesting Cliff Drip Stream – Build & Test Makefile
# ──────────────────────────────────────────────────────────────
CONTRACT_NAME = vesting_cliff_drip_stream
WASM_OUTPUT = target/wasm32-unknown-unknown/release/$(CONTRACT_NAME).wasm
OPTIMIZED = target/$(CONTRACT_NAME).optimized.wasm
.PHONY: all build test optimize clean fmt lint check
all: build
## Compile the contract to WASM
build:
cargo build --target wasm32-unknown-unknown --release
## Run all unit tests (native target, with testutils)
test:
cargo test --features testutils
## Optimize the WASM binary with soroban CLI
optimize: build
stellar contract optimize --wasm $(WASM_OUTPUT) --wasm-out $(OPTIMIZED)
@echo "Optimized: $(OPTIMIZED)"
@ls -lh $(OPTIMIZED)
## Format source code
fmt:
cargo fmt --all
## Run clippy lints
lint:
cargo clippy --all-targets --all-features -- -D warnings
## Type-check without building
check:
cargo check --all-targets --all-features
## Remove build artifacts
clean:
cargo clean