-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjustfile
58 lines (41 loc) · 1.88 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
# justfile
[private]
default:
@just --list
alias b := build
alias r := run
alias c := clippy
# targets := ["esp32", "esp32c3"]
[group('cargo')]
build board="esp32c3":
cargo +esp build --target {{ if board == "esp32" { "xtensa-esp32-none-elf" } else { "riscv32imc-unknown-none-elf" } }} --features {{board}}
[group('cargo')]
run board="esp32c3":
cargo +esp run --target {{ if board == "esp32" { "xtensa-esp32-none-elf" } else { "riscv32imc-unknown-none-elf" } }} --features {{ board }}
[group('cargo')]
clippy board="esp32c3":
cargo +esp clippy --target {{ if board == "esp32" { "xtensa-esp32-none-elf" } else { "riscv32imc-unknown-none-elf" } }} --features {{ board }}
[group('release')]
release board="esp32c3":
cargo +esp run --target {{ if board == "esp32" { "xtensa-esp32-none-elf" } else { "riscv32imc-unknown-none-elf" } }} --features {{ board }},release --release
# test board: fmt
# cargo +esp nextest run --target {{ if board == "esp32" { "xtensa-esp32-none-elf" } else { "riscv32imc-unknown-none-elf" } }} --features {{ board }} --release
[group('ci')]
prepare: fmt (_prepare "esp32") (_prepare "esp32c3")
[group('ci')]
fix board:
cargo +esp clippy --fix --target {{ if board == "esp32" { "xtensa-esp32-none-elf" } else { "riscv32imc-unknown-none-elf" } }} --features {{ board }} --allow-dirty
[group('ci')]
fmt: taplo
cargo +nightly fmt -- --config-path ./rustfmt.nightly.toml
taplo:
@taplo fmt
[group('ci')]
_ci_fmt:
cargo +nightly fmt --all -- --config-path ./rustfmt.nightly.toml --check --color always
_ci_build board: (build board)
[group('ci')]
_ci_clippy board:
cargo +esp clippy --target {{ if board == "esp32" { "xtensa-esp32-none-elf" } else { "riscv32imc-unknown-none-elf" } }} --features {{ board }} --workspace -- -D warnings
_prepare board: (_ci_clippy board) (_ci_build board)
_prepare_all: (_prepare "esp32c3") (_prepare "esp32")