-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmise.toml
More file actions
128 lines (104 loc) · 3.09 KB
/
Copy pathmise.toml
File metadata and controls
128 lines (104 loc) · 3.09 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
# Mise is used to manage dependencies and run tasks. See it as an alternative to flake.nix.
# https://mise.jdx.dev/
min_version = "2026.7.0"
[env]
RUSTC_WRAPPER = "sccache"
[tools]
python = "3.13"
"cargo:cargo-nextest" = "latest"
"cargo:cargo-expand" = "latest"
"cargo:cargo-deny" = "latest"
"cargo:cargo-zigbuild" = "latest"
"cargo:sccache" = "latest"
"cargo:bacon" = "latest"
"cargo:git-cliff" = "latest"
"cargo:samply" = "latest"
[tasks.build]
description = "Build all workspace crates"
run = "cargo build --workspace"
[tasks.test]
description = "Run standard workspace tests"
run = "cargo nextest run --workspace"
[tasks.test-full]
description = "Run all tests, including ignored tests"
run = "cargo nextest run --workspace --run-ignored all --no-fail-fast"
[tasks.bench]
description = "Run Criterion benchmarks (generic crate/bench/filter)"
usage = '''
arg "<crate>" help="Workspace crate/package name, e.g. vildrose-core"
arg "<bench>" help="Bench target name, e.g. benchmarks"
arg "[filter]" help="Optional Criterion benchmark filter, e.g. 'trit packing/4encode'"
'''
run = '''
#!/usr/bin/env bash
set -euo pipefail
crate="{{usage.crate}}"
bench="{{usage.bench}}"
filter="{{usage.filter | default(value='')}}"
cmd=(cargo bench -p "$crate" --bench "$bench" --)
if [ -n "$filter" ]; then
cmd+=("$filter")
fi
echo "[bench] Running: ${cmd[*]}"
exec "${cmd[@]}"
'''
[tasks.bench-profile]
description = "Profile Criterion bench target with Samply (generic)"
usage = '''
arg "<crate>" help="Workspace crate/package name, e.g. vildrose-core"
arg "<bench>" help="Bench target name, e.g. benchmarks"
arg "[filter]" help="Optional Criterion benchmark filter"
'''
run = '''
#!/usr/bin/env bash
set -euo pipefail
crate="{{usage.crate}}"
bench="{{usage.bench}}"
filter="{{usage.filter | default(value='')}}"
cmd=(cargo bench -p "$crate" --bench "$bench" --)
if [ -n "$filter" ]; then
cmd+=("$filter")
fi
echo "[bench-profile] Profiling: ${cmd[*]}"
exec samply record -- "${cmd[@]}"
'''
[tasks.bench-all]
description = "Run all workspace benches"
run = "cargo bench --workspace"
[tasks.bench-test]
description = "Compile Criterion benchmarks without running them"
run = "cargo bench --workspace --no-run"
[tasks.lint]
description = "Run Clippy with warnings treated as errors"
run = "cargo clippy --workspace --all-targets --all-features -- -D warnings"
[tasks.fmt]
description = "Format Rust"
run = "cargo fmt --all"
[tasks.docs]
description = "Build Rust API documentation"
run = 'RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps'
[tasks.docs-test]
description = "Run Rust documentation tests"
run = "cargo test --workspace --doc"
[tasks.watch]
description = "Continuously run the tests"
run = "bacon test"
[tasks.watch-crate]
description = "Run Bacon for one package"
usage = '''
arg "<crate>" help="Workspace crate/package name"
'''
run = "bacon -j test -- -p {{usage.crate}}"
[tasks.ci]
description = "Run CI-equivalent checks"
run = """
mise run lint
mise run test-full
"""
[tasks.check]
description = "Run every local quality check (run this before committing)"
run = """
mise run ci
mise run docs-test
mise run bench-test
"""