-
Notifications
You must be signed in to change notification settings - Fork 44
Expand file tree
/
Copy pathmise.toml
More file actions
107 lines (89 loc) · 3.09 KB
/
Copy pathmise.toml
File metadata and controls
107 lines (89 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
[tools]
"rust" = { version = "nightly", profile = "default", components = "rust-src,llvm-tools,rustfmt,rust-std,cargo,clippy" }
"cargo:cargo-fuzz" = "latest"
"cargo:cargo-mutants" = "latest"
"cargo:cargo-nextest" = "latest"
"cargo:cargo-llvm-cov" = "latest"
taplo = "latest"
[tasks.'fuzz']
description = "Run a fuzz target with cargo-fuzz"
env = { RUST_BACKTRACE = "1" }
usage = """
flag "--timeout <seconds>" default="60"
arg "<target>" help="Target fuzz script to run" {
choices "fuzzer_script_1" "fuzzer_script_2" "rank_seven" "replay_agent" "multi_replay_agent" "config_agent" "cfr_mixed_agents" "rank_omaha"
}
"""
run = '''
#!/usr/bin/env bash
set -euo pipefail
if [ "${usage_timeout}" != "0" ]; then
echo "Running with timeout of ${usage_timeout} seconds"
cargo fuzz run {{usage.target}} -- -max_total_time="${usage_timeout}"
else
echo "Running without timeout"
cargo fuzz run {{usage.target}}
fi
'''
[tasks.'bench']
description = "Run a benchmark"
usage = """
arg "<target>" help="Benchmark to run" {
choices "arena" "monte_carlo_game" "holdem_starting_hand" "iter" "parse" "rank" "icm_sim" "deal_deck" "player_bit_set_init" "cfr_throughput" "cfr"
}
"""
run = 'cargo bench --bench {{usage.target}}'
[tasks.'mutants']
description = "Run cargo mutants to find test issues"
run = "cargo mutants --all-features -j2 --test-tool=nextest -e '**/test_util.rs'"
[tasks.'coverage']
description = "Generate code coverage report"
usage = """
flag "--html" help="Generate HTML report and open in browser"
"""
run = '''
#!/usr/bin/env bash
set -euo pipefail
if [ "${usage_html:-false}" = "true" ]; then
cargo llvm-cov --all-features --workspace --html --open
else
cargo llvm-cov --all-features --workspace
fi
'''
[tasks.'check:fmt']
description = "Check code formatting"
run = 'cargo fmt --all -- --check'
[tasks.'check:clippy']
description = "Check for lints"
run = 'cargo clippy --all --workspace --all-features -- -D warnings'
[tasks.'check:clippy:examples']
description = "Check for lints"
run = 'cd examples && cargo clippy --all --workspace --all-features -- -D warnings'
[tasks.'check:test:nextest']
env = { RUST_BACKTRACE = "1" }
description = "Run tests with nextest"
run = 'cargo nextest run --all-features --workspace --examples --bins --lib --status-level none --final-status-level fail'
[tasks.'check:test:docs']
description = "Test code examples in documentation"
run = 'cargo test --doc --all-features --workspace -- --quiet'
[tasks.'check:taplo:lint']
description = "Check TOML files formatting"
run = 'taplo lint $(git ls-files "*.toml")'
[tasks.'check:taplo:format']
description = "Format TOML files"
run = 'taplo format --check $(git ls-files "*.toml")'
[tasks.check]
description = "Run all checks"
depends = ['check:*']
[tasks.'fix:taplo:format']
description = "Format TOML files"
run = 'taplo format $(git ls-files "*.toml")'
[tasks.'fix:clippy']
description = "Fix lints"
run = 'cargo clippy --all --all-targets --all-features --fix --allow-dirty -- -D warnings'
[tasks.'fix:fmt']
description = "Format code"
run = 'cargo fmt --all'
[tasks.fix]
description = "Run all fixers"
depends = ['fix:*']