-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathTaskfile.yaml
73 lines (62 loc) · 1.44 KB
/
Taskfile.yaml
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
# https://taskfile.dev
version: "3"
vars:
CARGO_BIN: ~/.cargo/bin/
tasks:
install-nextest:
status:
- test -f {{.CARGO_BIN}}/cargo-nextest
cmds:
- curl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C {{.CARGO_BIN}}
install-cross:
status:
- which cross
cmds:
- cargo install cross
check:
cmds:
- cargo check --all {{.CLI_ARGS}}
format:
cmds:
- cargo fmt --all {{.CLI_ARGS}}
lint:
cmds:
- >
cargo clippy
--examples --tests --benches --bins --lib --workspace
-- -D clippy::pedantic -D clippy::dbg-macro -D warnings
nextest:
deps:
- install-nextest
env:
CLICOLOR_FORCE: "yes"
cmds:
- cargo nextest run --no-fail-fast {{.CLI_ARGS}}
release:
desc: "build and upload a new release"
cmds:
- which gh
- test {{.CLI_ARGS}}
- cat Cargo.toml | grep -F 'version = "{{.CLI_ARGS}}"'
- cargo publish
- git tag {{.CLI_ARGS}}
- git push
- git push --tags
- gh release create --generate-notes {{.CLI_ARGS}}
test:
desc: "run all tests"
cmds:
- task: nextest
build-all:
deps:
- install-cross
cmds:
- cargo build --all-targets --release
# - cross build --target x86_64-pc-windows-gnu
all:
desc: "run all code formatters, linters, and tests"
cmds:
- task: format
- task: check
- task: lint
- task: test