-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
52 lines (41 loc) · 1.94 KB
/
Copy pathMakefile
File metadata and controls
52 lines (41 loc) · 1.94 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
# Local mirror of the GitHub CI pipeline (.github/workflows/ci.yml).
#
# CI runs EVERY step with RUSTFLAGS=-Dwarnings, so warnings — clippy lints,
# `unsafe_code`, dead_code, etc. — are hard errors there. Plain local
# `cargo test` / `cargo clippy` (without -Dwarnings) pass while CI fails, and
# `cargo clippy`'s incremental cache can hide a warning in an unchanged file.
# Run `make ci` before every push so what's green locally is green in CI.
export RUSTFLAGS := -Dwarnings
.PHONY: ci check lint test integration release fmt install-hooks
# NOTE: `make ci` mirrors ci.yml's BUILD/TEST/LINT jobs (the ones a code change
# can break). The separate `audit` job (cargo-audit / RUSTSEC advisory scan) is
# NOT mirrored here: it needs the advisory DB and can go red on a newly-published
# advisory with no code change, so it must not gate a local push.
## ci — full CI-parity gate; run before every push (mirrors ci.yml's build/test jobs)
ci: check lint test integration release
@echo "✅ CI-parity gate passed — matches .github/workflows/ci.yml"
## check — cargo check (the "Check & Lint" job, part 1)
check:
cargo check --workspace
## lint — clippy on all targets (the "Check & Lint" job, part 2)
lint:
cargo clippy --all-targets
## test — unit tests, per crate, as CI runs them
test:
cargo test -p rwa-ondo --lib
cargo test -p rwa-cli --lib
## integration — the mock-backed integration + JSON-contract + docs-drift suites
integration:
cargo test -p rwa-ondo --test rpc_portfolio
cargo test -p rwa --test cli_contract
cargo test -p rwa-cli --test docs_sync
## release — release build (the gating "Release Build" job)
release:
cargo build --release
## fmt — format (not gated by CI, but keep the tree tidy)
fmt:
cargo fmt --all
## install-hooks — enable the pre-push hook that runs `make ci`
install-hooks:
git config core.hooksPath .githooks
@echo "pre-push hook enabled → 'make ci' runs before every push (bypass: git push --no-verify)"