-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
55 lines (45 loc) · 1.43 KB
/
Makefile
File metadata and controls
55 lines (45 loc) · 1.43 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 clean deploy-localnet deploy-devnet deploy-mainnet format lint check help
# Verify code quality (format check + lint + build + test)
check:
cargo fmt --all -- --check
cargo clippy
cargo build-sbf
cargo test
# Build the program
build:
cargo build-sbf
# Run tests
test:
cargo test
# Clean build artifacts
clean:
cargo clean
# Format code
format:
cargo fmt --all
# Lint code
lint:
cargo clippy
# Deploy to localnet (requires validator to be running)
deploy-localnet:
solana program deploy target/deploy/cascade_protocol_deadline_validator.so --url localhost
# Deploy to devnet
deploy-devnet:
solana program deploy target/deploy/cascade_protocol_deadline_validator.so --url devnet
# Deploy to mainnet (with confirmation prompt)
deploy-mainnet:
@echo "WARNING: Deploying to MAINNET. Press Ctrl+C to cancel, Enter to continue..."
@read confirm
solana program deploy target/deploy/cascade_protocol_deadline_validator.so --url mainnet-beta
# Help
help:
@echo "Deadline Validator - Makefile Commands"
@echo ""
@echo " make build Build the Solana program"
@echo " make test Run all tests"
@echo " make clean Remove build artifacts"
@echo " make deploy-localnet Deploy to localnet"
@echo " make deploy-devnet Deploy to devnet"
@echo " make format Format Rust code"
@echo " make lint Lint Rust code"
@echo " make help Show this help message"