-
Notifications
You must be signed in to change notification settings - Fork 427
Expand file tree
/
Copy pathMakefile
More file actions
217 lines (186 loc) · 9.21 KB
/
Copy pathMakefile
File metadata and controls
217 lines (186 loc) · 9.21 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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
# Dora QA targets
#
# Local-first quality gates. Same scripts run in CI.
# See docs/plan-agentic-qa-strategy.md for the full strategy.
#
# The ladder (increasing thoroughness, increasing runtime):
#
# make qa-fast ~1 min pre-commit sanity
# make qa-full ~5-10 min pre-push
# make qa-deep ~15 min target Tier 1 gate, stronger than today's CI
# (adds coverage, adversarial, mutants, semver -
# kept laptop-only, see strategy doc §5)
# make qa-nightly ~3-4 hours Full parity with .github/workflows/nightly.yml
# (qa-deep + proptest@1000 + miri + example-smoke
# + ci-nightly-jobs). After the #1716 rebalance,
# nightly.yml has 27 test jobs (re-counted
# in #2999): example-smoke
# covers 4 (smoke-suite/log-sinks/service-action/
# streaming); scripts/qa/ci-nightly-jobs.sh drives
# 20 more with platform-aware dispatch
# (record-replay, cluster-smoke, cluster-e2e [Linux],
# cluster-record-replay [Linux],
# topic-and-top, cpu-affinity [Linux], redb-backend,
# daemon-reconnect [Linux], state-reconstruction,
# multi-daemon-late-subscriber [Linux],
# test-cross-platform, examples, cli-tests,
# bench-example, cross-check, ros2-bridge [Linux+ROS2],
# ros2-zenoh-humble, ros2-zenoh-kilted,
# msrv, kani-proofs [skipped if Kani absent]). Of
# the rest, memory-pool-smoke (torch-gated #[ignore]
# memory-pool tests), is covered locally by
# `make qa-examples` / smoke-all.sh, not the
# qa-nightly example-smoke step (which skips
# #[ignore] tests). Green local run on platform X predicts
# green CI nightly for platform X's jobs.
# make qa-release-gate Tier 3 automatable parts (deep + semver;
# audit/dogfood are human)
# make qa-mutation-audit ~10-18 hrs full-repo cargo-mutants; deliberate
# test-quality audit, NOT every nightly
#
# Orthogonal to the ladder:
#
# make qa-examples ~15-20 min run all smoke-eligible example
# dataflows end-to-end (wraps
# scripts/smoke-all.sh). The script
# skips examples that need CUDA, ROS2,
# webcam, multi-machine deploy, C/C++
# toolchains, or interactive CLI --
# run `scripts/smoke-all.sh -h` to see
# the SKIP list. Not part of qa-*
# ladder by design: the ladder
# excludes dora-examples tests to
# keep per-commit budgets tight.
#
# make qa-test-python ~1 min warm unit tests of the three PyO3 crates,
# which every other qa-* target
# excludes. Needs a Python >= 3.11
# with a shared libpython; run it
# after touching apis/python/* or
# libraries/extensions/ros2-bridge/
# python. CI runs the same command in
# ci.yml's contract-tests job.
#
# `make qa-tier1` is a back-compat alias for `make qa-deep`.
.PHONY: qa qa-fast qa-full qa-deep qa-tier1 qa-nightly qa-release-gate qa-mutation-audit \
qa-examples qa-cluster-e2e qa-cluster-record-replay ros2-zenoh-humble ros2-zenoh-kilted \
qa-fmt qa-audit qa-unwrap qa-clippy qa-test qa-test-python qa-coverage qa-mutants qa-semver \
qa-adversarial qa-kani qa-pgo qa-install qa-pgo-install qa-kani-install
qa: qa-fast
qa-fast:
@scripts/qa/all.sh --fast
qa-full:
@scripts/qa/all.sh --full
qa-deep:
@scripts/qa/all.sh --deep
# Back-compat alias. Prefer `make qa-deep` in new docs/scripts.
qa-tier1: qa-deep
qa-nightly:
@scripts/qa/all.sh --nightly
ros2-zenoh-humble:
@scripts/ros2-zenoh-interop.sh humble all
ros2-zenoh-kilted:
@scripts/ros2-zenoh-interop.sh kilted all
qa-release-gate:
@scripts/qa/all.sh --release-gate
qa-mutation-audit:
@scripts/qa/all.sh --mutation-audit
# Run all smoke-eligible example dataflows end-to-end via
# scripts/smoke-all.sh. Skips examples requiring CUDA, ROS2, webcam,
# multi-machine deploy, C/C++ toolchains, or interactive CLI.
# Budget ~15-20 min. Pass flags through, e.g.
# make qa-examples ARGS="--rust-only"
# make qa-examples ARGS="-v" # stream dora output live
qa-examples:
@scripts/smoke-all.sh $(ARGS)
# Real-sshd end-to-end test of `dora cluster up/status/down`. Linux-only.
# Hard-fails if openssh-server is not installed (install via
# `sudo apt-get install -y openssh-server`). Subset of qa-nightly; this
# target is here so developers can run just this job locally without
# invoking the full nightly suite.
qa-cluster-e2e:
@scripts/qa/ci-nightly-jobs.sh cluster-e2e
# Stitches cluster-e2e + record-replay (#2013): record a dataflow spread
# across a 3-daemon SSH cluster, replay it locally, and validate the replayed
# state against the seed(42) baseline. Linux-only; same openssh-server
# requirement as qa-cluster-e2e. Subset of qa-nightly, broken out for local
# runs.
qa-cluster-record-replay:
@scripts/qa/ci-nightly-jobs.sh cluster-record-replay
# Individual gates
qa-fmt:
@cargo fmt --all -- --check
qa-audit:
@scripts/qa/audit.sh
qa-unwrap:
@scripts/qa/unwrap-budget.sh
qa-clippy:
@cargo clippy --all \
--exclude dora-node-api-python \
--exclude dora-operator-api-python \
--exclude dora-ros2-bridge-python \
-- -D warnings
qa-test:
@cargo test --all \
--exclude dora-node-api-python \
--exclude dora-operator-api-python \
--exclude dora-ros2-bridge-python \
--exclude dora-runtime-python \
--exclude dora-cli-api-python \
--exclude dora-examples
# The unit tests of the PyO3 crates `qa-test` excludes. Kept a separate
# target, not folded into `qa-test`: cargo builds these crates without
# `pyo3/extension-module` (unlike the maturin wheel), so the test binaries
# link libpython directly and need an interpreter >= 3.11 with a shared
# library — a machine set up only for Rust work would start failing the
# everyday gate. CI runs this same target in ci.yml's `contract-tests` job,
# which sets Python up explicitly.
#
# `dora-runtime-python` is the operator runtime's Python backend. Its tests
# cover the cross-language arms of the runtime split — above all that a
# shared-library operator reaching the Python runtime is *delegated* to the
# shared-lib backend rather than rejected, which is what keeps native
# operators working under an embedded-Python daemon.
qa-test-python:
@cargo test --lib \
-p dora-node-api-python \
-p dora-operator-api-python \
-p dora-ros2-bridge-python \
-p dora-runtime-python
qa-coverage:
@scripts/qa/coverage.sh
qa-mutants:
@scripts/qa/mutants.sh
qa-semver:
@scripts/qa/semver.sh
# Adversarial LLM review of current diff (requires codex or claude CLI)
qa-adversarial:
@scripts/qa/adversarial.sh
# Formal verification: run the #[kani::proof] harnesses (cfg(kani)-gated,
# zero impact on normal builds). A passing proof covers every input in the
# harness state space, not just sampled values. Budget ~5-10 min cold,
# <1 min warm. Run when touching files that contain proofs (see
# docs/formal-verification.md) and in pre-release gating; not part of the
# per-commit qa-fast loop. Nightly CI runs the same proofs (kani-proofs
# job). Install via `make qa-kani-install`.
qa-kani:
@scripts/qa/kani.sh
# Profile-Guided Optimization measurement. Build dora-cli with cargo-pgo
# (instrument -> train on examples/benchmark -> optimize), then run the
# benchmark twice (baseline vs PGO) and print a side-by-side comparison.
# Budget ~30-40 min wall time, ~5-10 GB extra target/ artifacts. PGO results
# don't transfer across OS/arch — run this on your target platform to find
# out if PGO helps. See dora-rs/dora#331 for the methodology and the
# macOS-arm64 baseline data point (+25% throughput geomean).
qa-pgo:
@scripts/qa/pgo.sh
# One-shot tool installation
qa-install:
cargo install cargo-audit cargo-deny cargo-llvm-cov cargo-mutants cargo-semver-checks
rustup component add llvm-tools-preview
qa-pgo-install:
cargo install cargo-pgo
rustup component add llvm-tools-preview
qa-kani-install:
cargo install kani-verifier --locked
cargo kani setup