-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathjustfile
More file actions
131 lines (112 loc) · 5.66 KB
/
Copy pathjustfile
File metadata and controls
131 lines (112 loc) · 5.66 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# Build the engine binaries: the bare `nexum` engine and the cow
# composition root `shepherd`.
build-engine:
cargo build -p nexum-cli -p shepherd
# Build the example WASM module
build-module:
cargo build --target wasm32-wasip2 --release -p example
# Build the reference venue adapter (echo-venue) for wasm32-wasip2. Its
# per-component world pins the #[videre_sdk::venue] acceptance test.
build-venue:
cargo build --target wasm32-wasip2 --release -p echo-venue
# Build the bundled cow venue adapter component. Install via the
# engine.toml [[adapters]] stanza; the venue id is its manifest name.
build-cow-venue:
cargo build --target wasm32-wasip2 --release -p cow-venue --features adapter
# Build everything
build: build-engine build-module
# Build the module then run the engine with it. The second argument is the
# module's module.toml — without it the engine prints the 0.1-compat
# deprecation warning and proceeds with empty capabilities/config.
run: build-module build-engine
cargo run -p nexum-cli -- target/wasm32-wasip2/release/example.wasm nexum/modules/example/module.toml
# Run host engine unit tests
test:
cargo nextest run -p nexum-runtime
# Build module + engine, then run E2E integration tests
test-e2e: build-module build-engine
cargo nextest run -p nexum-runtime supervisor::tests::e2e
# Build the M2 modules (twap-monitor + ethflow-watcher) for wasm32-wasip2.
build-m2:
cargo build -p twap-monitor --target wasm32-wasip2 --release
cargo build -p ethflow-watcher --target wasm32-wasip2 --release
# Run nexum wired for the M2 smoke / round-trip scenario
# (Sepolia, both M2 modules). See `docs/operations/m2-testnet-runbook.md`.
# --pretty-logs keeps the runbook-friendly human-readable formatter;
# production deploys omit the flag and emit JSON.
run-m2: build-m2 build-cow-venue build-engine
cargo run -p shepherd -- --engine-config engine.m2.toml --pretty-logs
# Build the M3 example modules (price-alert + balance-tracker) for
# wasm32-wasip2.
build-m3:
cargo build -p price-alert --target wasm32-wasip2 --release
cargo build -p balance-tracker --target wasm32-wasip2 --release
# Run nexum wired for the M3 smoke / validation scenario
# (Sepolia, 2 example modules). See `docs/operations/m3-testnet-runbook.md`.
# --pretty-logs keeps the runbook-friendly human-readable formatter;
# production deploys omit the flag and emit JSON.
run-m3: build-m3 build-cow-venue build-engine
cargo run -p shepherd -- --engine-config engine.m3.toml --pretty-logs
# Build the http-probe example module (wasi:http fetch + allowlist
# denial demo) for wasm32-wasip2.
build-http-probe:
cargo build -p http-probe --target wasm32-wasip2 --release
# Build all 4 modules required by the E2E run (twap-monitor +
# ethflow-watcher + price-alert + balance-tracker).
build-e2e: build-m2 build-m3
# Run the 4-6 h E2E integration scenario on Sepolia. All 4 modules
# dispatched simultaneously against a live RPC; metrics scraped at
# 127.0.0.1:9100/metrics. JSON logs (no --pretty-logs) so a
# downstream `jq` filter can mine submitted/dropped/backoff markers
# for the e2e report. See `docs/operations/e2e-testnet-runbook.md`.
run-e2e: build-e2e build-cow-venue build-engine
cargo run -p shepherd -- --engine-config engine.e2e.toml
# Zero-leak gate: host-layer crate graphs, runtime charter-symbol and
# router-field scans, and the nexum:host WIT leaf and foreign-namespace
# scans. Blocking in CI.
check-venue-agnostic:
./scripts/check-venue-agnostic.sh
# Orderbook-only gate: the CoW venue crate carries no composable
# symbol. Blocking in CI.
check-cow-orderbook-only:
./scripts/check-cow-orderbook-only.sh
# Dep-sync gate: every crate is grouped under nexum/videre/shepherd and
# depends only within or below its tier, so no upward edge becomes a
# circular repo dependency at the carve. Blocking in CI (M5 #403).
check-carve-groups:
./scripts/check-carve-groups.sh
# Check the entire workspace
check:
cargo check --target wasm32-wasip2 -p example
cargo check -p nexum-runtime
cargo check -p nexum-cli -p shepherd
# 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-carve-groups.sh
cargo doc --workspace --no-deps
cargo build --release --target wasm32-wasip2 \
-p example -p twap-monitor -p ethflow-watcher -p price-alert \
-p balance-tracker -p http-probe -p echo-venue \
-p echo-client -p clock-reader -p flaky-bomb -p flaky-venue -p fuel-bomb \
-p memory-bomb -p panic-bomb -p slow-host
# The module build above emits a featureless cow_venue.wasm through
# twap-monitor's cow-venue dep; rebuild the adapter component over it
# (as CI does) so the platform e2e tests load the adapter, not the stub.
cargo build --release --target wasm32-wasip2 -p cow-venue --features adapter
# 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