-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathjustfile
More file actions
82 lines (69 loc) · 3.04 KB
/
Copy pathjustfile
File metadata and controls
82 lines (69 loc) · 3.04 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
# Build the cow composition-root engine binary.
build-engine:
cargo build -p shepherd-engine
# Build the two production keeper modules (twap-monitor +
# ethflow-watcher) for wasm32-wasip2.
build-modules:
cargo build -p twap-monitor --target wasm32-wasip2 --release
cargo build -p ethflow-watcher --target wasm32-wasip2 --release
# Build everything this repo ships. The cow venue is native Rust now, so
# it builds with the engine that registers it.
build: build-modules build-engine
# Run the workspace test suite.
test:
cargo nextest run --workspace --all-features --no-fail-fast
cargo test --doc --workspace --all-features
# Format / lint.
fmt:
cargo fmt --all
lint:
cargo clippy --workspace --all-targets --all-features -- -D warnings
# Run shepherd wired for the M2 smoke / round-trip scenario
# (Sepolia, both keeper modules). --pretty-logs keeps the
# runbook-friendly human-readable formatter; production deploys omit
# the flag and emit JSON.
run-m2: build-modules build-engine
cargo run -p shepherd-engine -- --engine-config engine.m2.toml --pretty-logs
# Run the E2E integration scenario on Sepolia. The scenario also loads
# the nexum example modules (price-alert + balance-tracker); build
# their wasms from a sibling nexum-runtime checkout into this repo's
# target dir first (see scripts/e2e-run.sh).
run-e2e: build-modules build-engine
cargo run -p shepherd-engine -- --engine-config engine.e2e.toml
# Managed e2e / load / soak drivers.
e2e *ARGS:
./scripts/e2e-run.sh {{ARGS}}
load *ARGS:
./scripts/load-run.sh {{ARGS}}
soak-snapshot *ARGS:
./scripts/soak-snapshot.sh {{ARGS}}
# Orderbook-only gate: the CoW venue crate carries no composable
# symbol. Blocking in CI.
check-cow-orderbook-only:
./scripts/check-cow-orderbook-only.sh
# Docker image (the shepherd-engine composition root + module wasms).
docker-build:
docker build -t ghcr.io/nullislabs/shepherd:dev .
# Run the full CI series locally before pushing. Mirrors
# .github/workflows/ci.yml one-to-one: rustfmt, clippy, rustdoc, the
# module wasms the integration tests need, and the workspace test
# suite via nextest plus the doctests, all under the `-D warnings` the
# CI workflow sets globally.
ci:
#!/usr/bin/env bash
set -euo pipefail
# Append -D warnings without clobbering the devshell's flags (mold linker,
# set in flake.nix), so the local run keeps fast native linking. RUSTC_WRAPPER
# is already sccache from the devshell shellHook.
export RUSTFLAGS="${RUSTFLAGS:-} -D warnings"
export RUSTDOCFLAGS="${RUSTDOCFLAGS:-} -D warnings"
cargo fmt --all --check
cargo clippy --workspace --all-targets --all-features -- -D warnings
./scripts/check-cow-orderbook-only.sh
cargo doc --workspace --no-deps
cargo build --release --target wasm32-wasip2 \
-p twap-monitor -p ethflow-watcher
# nextest for the suite (as CI does); doctests run separately since nextest
# does not cover them.
cargo nextest run --workspace --all-features --no-fail-fast
cargo test --doc --workspace --all-features