Only build the CLI crate when running benchmarks

This commit is contained in:
Max Brunsfeld 2021-02-05 11:55:54 -08:00
parent 9857438d9b
commit 242ad90770
2 changed files with 3 additions and 3 deletions

View file

@ -48,11 +48,11 @@ done
if [[ "${mode}" == "debug" ]]; then
test_binary=$(
cargo bench benchmark --no-run --message-format=json 2> /dev/null |\
cargo bench benchmark -p tree-sitter-cli --no-run --message-format=json 2> /dev/null |\
jq -rs 'map(select(.target.name == "benchmark" and .executable))[0].executable'
)
env | grep TREE_SITTER
echo $test_binary
else
exec cargo bench benchmark
exec cargo bench benchmark -p tree-sitter-cli
fi

View file

@ -1,3 +1,3 @@
@echo off
cargo bench
cargo bench benchmark -p tree-sitter-cli