-
Notifications
You must be signed in to change notification settings - Fork 45
Expand file tree
/
Copy pathJustfile
More file actions
90 lines (75 loc) · 3.53 KB
/
Copy pathJustfile
File metadata and controls
90 lines (75 loc) · 3.53 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
# DonSeTch dev loop — one profile, everything fast.
#
# Everything below runs on the `ci` cargo profile (release opts,
# no fat LTO): test links take seconds, the binary behaves like
# release (`panic = "abort"` inherited), and all artifacts share
# one graph in target/ci. Fat LTO runs once, at ship time, via a
# plain `cargo build --release` (see status.md Workflow section).
#
# just check compile-check the full feature set (~10s warm)
# just test full test suite, full features, fail-fast
# just lint clippy -Dwarnings on the full feature set
# just all the pre-push gate: fmt + lint + test
# just bin build target/ci/donsetch (for live smokes)
# just smoke bin + doctor + fetch/search/bypass smoke
# just fuzz extract 30s fuzz burst on one target
# just clean-bloat drop profiles the loop never uses + fuzz cache
# Cargo never GCs stale artifacts: debug/release/fuzz caches grow
# without bound across dep bumps (110G caught; ~99G was bloat). This
# clears everything except the warm `ci` loop profile.
clean-bloat:
rm -rf target/debug target/release fuzz/target
# Pre-push gate: everything CI will flag.
all: fmt-check lint test
# Pre-tag gate: `all` + the Cargo.lock gate (catches a version bump
# with a stale lock in seconds, the failure that used to cost a full
# release round-trip) + the tag-time payload gates mirrored against
# the ci-profile binary. Fat LTO is NOT built locally: the release
# workflow's own gates are the authoritative payload check, paying
# for the fat-LTO build twice bought nothing.
preflight: all lockgate ci-gates
# Full fat-LTO + gates, for when the release workflow itself changed
# and the payload gates must be proven locally first.
preflight-full: all gates
# Manifest/lock coherence: the bump-invalidates-lock failure must die
# here in seconds, never in CI.
lockgate:
cargo check --locked --profile ci --all-targets --features ocr,rerank,http
# The tag-time gates (linux-x64 mirror of release.yml), against the
# fast binary: sizes/version/dylib presence/ONNX probe/QEMU all hold
# on the ci profile as well, so the slow fat-LTO pass is CI's job.
ci-gates: bin
@sh scripts/gates.sh linux-x64 target/ci
# The tag-time gates (linux-x64 mirror of release.yml).
gates:
cargo build --release --features ocr,rerank,http
@sh scripts/gates.sh linux-x64 target/release
fmt:
cargo fmt --all
fmt-check:
cargo fmt --all -- --check
# Clippy on the full feature set; --profile ci reuses the test
# artifact graph instead of compiling a dev one.
lint:
cargo clippy --profile ci --all-targets --features ocr,rerank,http -- -Dwarnings
# Full suite, full feature set, fail-fast. The cargo profile is
# pinned via CLI (older nextest ignores the config-level
# cargo-profile key).
test:
cargo nextest run --cargo-profile ci --features ocr,rerank,http
# The binary for live smoke runs (fast profile, real behavior).
bin:
cargo build --profile ci --features ocr,rerank,http
# Compile-only full-feature check, fastest structural signal.
check:
cargo check --profile ci --all-targets --features ocr,rerank,http
# Live smoke: payload, normal site, walled site, search.
smoke: bin
target/ci/donsetch doctor 2>&1 | rg -i 'ONNX|Status' | head -4
target/ci/donsetch fetch https://en.wikipedia.org/wiki/Markdown --json 2>/dev/null | head -c 120
echo
target/ci/donsetch search "linux kernel" --json 2>/dev/null | head -c 120
echo
# 30-second fuzz burst on one target: just fuzz extract
fuzz target:
cd fuzz && cargo fuzz run {{target}} -s none -- -max_total_time=30