-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy path.mise.toml
More file actions
89 lines (73 loc) · 2.62 KB
/
Copy path.mise.toml
File metadata and controls
89 lines (73 loc) · 2.62 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
[env]
# RUSTC_WRAPPER = "sccache"
MISE_CARGO_BINSTALL = "true"
[tools]
"aqua:cargo-bins/cargo-binstall" = "1"
rust = { version = "1.93.1", profile = "minimal", components = "rustfmt,clippy" } # the rust tool stack (with cargo, fmt, clippy) to build source
"cargo:cargo-nextest" = "0.9"
"cargo:cargo-hack" = "0.6"
"cargo:cargo-deny" = "0.19"
# "cargo:git-cliff" = "latest"
"dprint" = "latest"
[tasks."format"]
alias = "fmt"
description = "Format the code and sort dependencies"
run = [
"cargo --locked fmt",
"cargo --locked sort --grouped",
"dprint fmt --config=tools/dprint/dprint.json",
]
[tasks.autofix]
description = "Automatically fix some linting issues & format code"
depends_post = ["format"]
run = [
"cargo fix --allow-dirty --workspace --all-features --all-targets --profile test",
"cargo clippy --fix --allow-dirty --workspace --all-features --all-targets --no-deps --profile test",
]
[tasks.check]
wait_for = ["generate"]
run = "cargo hack check --each-feature"
# no uncommitted changes on sdk (generated code)
[tasks."check:no_uncommitted_changes_on_sdk"]
run = "git diff --exit-code cdevents-sdk"
[tasks."lint:cargo_fmt"]
run = "cargo fmt --all -- --check"
[tasks."lint:cargo_deny"]
run = """
cargo deny --workspace --all-features \
--exclude-dev \
--exclude generator \
check licenses advisories \
--config=tools/cargo-deny/deny.toml
"""
[tasks."lint:cargo_clippy"]
wait_for = ["generate"]
run = "cargo clippy --workspace --all-features --no-deps --all-targets -- --deny warnings"
[tasks."lint:toml"]
run = "dprint check --config=tools/dprint/dprint.json"
[tasks."lint"]
depends = ["lint:*"]
[tasks.clean]
run = "cargo clean"
[tasks.generate]
run = """cargo run -p generator -- --templates-dir "generator/templates" --jsonschemas "cdevents-specs/*/schemas/*.json" --dest "cdevents-sdk/src/generated""""
[tasks.test]
wait_for = ["generate", "lint:*"]
run = [
"cargo nextest run --all-features",
"cargo test --doc",
]
# [tasks."git:setup_cdevents-specs"]
# run = [
# "git submodule deinit -f --all",
# "git submodule init",
# "git submodule add -f https://github.com/cdevents/spec.git cdevents-specs/main",
# "git submodule add -f -b spec-v0.3 https://github.com/cdevents/spec.git cdevents-specs/spec-v0.3",
# "git submodule add -f -b spec-v0.4 https://github.com/cdevents/spec.git cdevents-specs/spec-v0.4",
# "git submodule add -f -b spec-v0.5 https://github.com/cdevents/spec.git cdevents-specs/spec-v0.5",
# "git submodule update -f --rebase -- cdevents-specs/main",
# ]
[tasks."git:update_cdevents-specs"]
run = "git submodule update --recursive --remote"
[tasks.ci]
depends = ["generate", "test", "lint", "check"]