Repository navigation
Expand file tree
/
Copy pathjustfile
More file actions
102 lines (81 loc) · 3.2 KB
/
Copy pathjustfile
File metadata and controls
102 lines (81 loc) · 3.2 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# Vortex Contracts — justfile
#
# Alternative to the Makefile using `just` (https://just.systems/).
# All recipes mirror the Makefile exactly; use whichever tool you prefer.
#
# Usage:
# just — list available recipes
# just all — fmt + lint + test + build
# just fmt — format source
# just lint — clippy -D warnings (identical to CI)
# just test — run tests
# just build — build release wasm
# just deploy-testnet STELLAR_SOURCE=<key> — deploy to testnet
#
# Proof Registry recipes (issue #213):
# just proof-registry-fmt — format proof_registry source
# just proof-registry-lint — clippy proof_registry
# just proof-registry-test — test proof_registry
# just proof-registry-build — build proof_registry wasm
# just proof-registry-all — full check for proof_registry
workspace := "intent_settlement"
proof_registry := "proof_registry"
wasm_target := "wasm32-unknown-unknown"
wasm_out := workspace / "target" / wasm_target / "release/vortex_intent_settlement.wasm"
pr_wasm_out := proof_registry / "target" / wasm_target / "release/vortex_proof_registry.wasm"
# Show available recipes (default)
default:
@just --list
# Run fmt, lint, test, and build (full pre-push check)
all: fmt lint test build
# Full check for proof_registry
proof-registry-all: proof-registry-fmt proof-registry-lint proof-registry-test proof-registry-build
# Format all source files with rustfmt
fmt:
cd {{workspace}} && cargo fmt --all
# Check formatting without modifying files (used by CI)
fmt-check:
cd {{workspace}} && cargo fmt --all -- --check
# Run clippy with -D warnings (identical to the CI command)
lint:
cd {{workspace}} && cargo clippy --all-targets -- -D warnings
# Run the full test suite
test:
cd {{workspace}} && cargo test
# Build the release wasm binary
build:
cd {{workspace}} && cargo build --target {{wasm_target}} --release
# Run cargo-audit against the dependency tree
audit:
cd {{workspace}} && cargo audit
# Regenerate README.md's Error Reference table from the Error enum (issue #531)
error-reference:
python3 scripts/generate-error-reference.py --write
# Verify README.md's Error Reference table matches the Error enum (issue #531)
error-reference-check:
python3 scripts/generate-error-reference.py --check
# Remove build artefacts
clean:
cd {{workspace}} && cargo clean
# Proof Registry recipes (issue #213)
proof-registry-fmt:
cd {{proof_registry}} && cargo fmt --all
proof-registry-fmt-check:
cd {{proof_registry}} && cargo fmt --all -- --check
proof-registry-lint:
cd {{proof_registry}} && cargo clippy --all-targets -- -D warnings
proof-registry-test:
cd {{proof_registry}} && cargo test
proof-registry-build:
cd {{proof_registry}} && cargo build --target {{wasm_target}} --release
proof-registry-audit:
cd {{proof_registry}} && cargo audit
proof-registry-clean:
cd {{proof_registry}} && cargo clean
# Deploy the wasm to Stellar testnet
# Usage: just deploy-testnet STELLAR_SOURCE=<secret-key-or-name>
deploy-testnet STELLAR_SOURCE network="testnet": build
stellar contract deploy \
--wasm {{wasm_out}} \
--source {{STELLAR_SOURCE}} \
--network {{network}}