-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJustfile
74 lines (52 loc) · 1.46 KB
/
Justfile
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
default:
just --choose
# lint the code
@lint:
cargo fmt --all
cargo clippy --all-targets --all-features
@test:
cargo test --workspace -- --quiet
# update dependency versions, and checks for outdated ones
@update-deps:
cargo update
command -v cargo-outdated > /dev/null || (echo "cargo-outdated is not installed" && exit 1)
cargo outdated
# list unused dependencies
@unused-deps:
command -v cargo-udeps >/dev/null || (echo "cargo-udeps not installed" && exit 1)
cargo +nightly udeps
@versions:
rustc --version
cargo --version
@check:
cargo check
@watch-check:
command -v cargo-watch > /dev/null || (echo "cargo-watch is not installed" && exit 1)
cargo watch -x "check"
@release:
cargo build --release --verbose
# run unit tests (in release mode)
@test-release:
cargo test --workspace --release --verbose
@run:
cargo run --bin=ktx
@debug:
RUST_BACKTRACE=full cargo run --bin=ktx
@watch:
command -v cargo-watch > /dev/null || (echo "cargo-watch is not installed" && exit 1)
cargo watch -x "run --bin=ktx"
# run github actions ci locally
@ci:
command -v act > /dev/null || (echo "act is not installed. see https://nektosact.com" && exit 1)
act
@log:
mkdir -p dev
cargo run --bin=ktx 2>dev/stdout.log 1> dev/stdout.log
@debug-log:
mkdir -p dev
RUST_BACKTRACE=full cargo run --bin=ktx 2>dev/stderr.log 1> dev/stdout.log
alias r:=run
alias d:=debug
alias w:=watch
alias l:=lint
alias c:=check