-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJustFile
More file actions
132 lines (105 loc) · 4.71 KB
/
JustFile
File metadata and controls
132 lines (105 loc) · 4.71 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
import "./.just/all.just"
default:
@just --list
# Build the project.
[group("build")]
build *FLAGS: _check_install_rustup
cargo build {{ FLAGS }}
[doc("Build an auditable binary using [cargo-auditable](https://github.com/rust-secure-code/cargo-auditable).
This forces building with nightly.
")]
[group("build")]
build-auditable *FLAGS: _check_install_nightly _check_install_cargo_auditable
CARGO_BUILD_SBOM=true cargo +nightly auditable build -Z sbom {{ FLAGS }}
# Clean all project files.
[group("chore")]
clean: _check_install_rustup
cargo clean
# Run `cargo tree` to get a list of dependencies of this project.
[group("chore")]
deps *FLAGS: _check_install_nightly
cargo tree {{ FLAGS }}
[doc("Upgrade all packages in `Cargo.toml` to their latest semver compatible version, using [cargo-edit](https://github.com/killercup/cargo-edit).
To upgrade to the latest semver *in*compatible version, add the `-i` flag.
To list the upgradable crate, add the `n` flag.")]
[group("chore")]
upgrade *FLAGS: _check_install_cargo_edit
cargo upgrade {{ FLAGS }}
cargo update
[doc("Upgrade every bin currently installed with `cargo` using [cargo-update](https://github.com/nabijaczleweli/cargo-update).
To list the updatable package, instead of updating, add the `-l` flag.")]
[group("chore")]
upgrade-bins *FLAGS: _check_install_cargo_update
cargo install-update -a {{ FLAGS }}
# Run [cargo-udeps](https://github.com/est31/cargo-udeps) to check if any dependencies is unused.
[group("chore")]
udeps *FLAGS: _check_install_cargo_udeps
cargo +nightly udeps {{ FLAGS }}
# Run everything from the `ci` group, what's used for CI build.
[group("ci")]
ci-all: fmt lint coverage changelog license
# Run [cargo-about](https://github.com/EmbarkStudios/cargo-about) to generate a license file that's an aggregate of all dependencies licenses.
[group("ci")]
license: _check_install_cargo_about
cargo about generate about.hbs > LICENSE-THIRD-PARTY.html
# Run `cargo bench`
[group("ci")]
benchmark *FLAGS: _check_install_rustup
cargo bench {{ FLAGS }}
# Generate `CHANGELOG.md` using [git-cliff](https://github.com/orhun/git-cliff)
[group("ci")]
changelog *FLAGS: _check_install_git_cliff
git cliff {{ FLAGS }}
# Generate crate documentation.
[group("ci")]
doc *FLAGS: _check_install_rustup
cargo +nightly doc --no-deps --document-private-items -Zunstable-options -Zrustdoc-scrape-examples {{ FLAGS }}
# Run [dprint](https://github.com/dprint/dprint) to check formatting.
[group("ci")]
fmt-check: _check_install_cargo_dprint
dprint check "**"
# Run [dprint](https://github.com/dprint/dprint) to format files.
[group("ci")]
fmt: _check_install_cargo_dprint
dprint fmt "**"
# Run the rust linter and [clippy](https://github.com/rust-lang/rust-clippy).
[group("ci")]
lint: _check_install_rustup
cargo +nightly clippy
# Run [cargo-semver-checks](https://github.com/obi1kenobi/cargo-semver-checks) to make sure that the new version doesn't break semantic versionning.
[group("ci")]
semver rev *FLAGS: _check_install_cargo_semver_checks
cargo semver-checks --baseline-rev {{ rev }} {{ FLAGS }}
# Run [cargo-llvm-cov](https://github.com/taiki-e/cargo-llvm-cov) to get coverage.
[group("ci")]
[group("coverage")]
coverage *FLAGS: _check_install_nightly _check_install_cargo_llvm_cov
cargo +nightly llvm-cov clean --workspace
cargo +nightly llvm-cov --doctests --branch --html {{ FLAGS }}
[doc("Run [cargo-llvm-cov](https://github.com/taiki-e/cargo-llvm-cov?tab=readme-ov-file#display-coverage-in-vs-code)
and get a `lcov.info` file that's usable to get coverage gutter in your IDE.
")]
[group("coverage")]
coverage-gutter *FLAGS: _check_install_nightly _check_install_cargo_llvm_cov
cargo +nightly llvm-cov clean --workspace
cargo +nightly llvm-cov --lcov --output-path lcov.info {{ FLAGS }}
# Run tests and doctests.
[group("tests")]
tests *FLAGS: _check_install_rustup
cargo test {{ FLAGS }}
# Run [cargo-hack](https://github.com/taiki-e/cargo-hack) tests and doctests on the entire feature matrix. Very long execution time.
[group("tests")]
tests-all-features *FLAGS: _check_install_cargo_hack
cargo hack test --feature-powerset {{ FLAGS }}
# Run [cargo-hack](https://github.com/taiki-e/cargo-hack) tests and doctests on all features individually.
[group("tests")]
tests-features *FLAGS: _check_install_cargo_hack
cargo hack test --each-feature {{ FLAGS }}
# Run [cargo-insta](https://github.com/mitsuhiko/insta) to run and review snapshot tests.
[group("tests")]
tests-snapshots: _check_install_cargo_insta
cargo insta review
# Generate a flamegraph, using [cargo-flamegraph](https://github.com/flamegraph-rs/flamegraph).
[group("profiling")]
flamegraph *FLAGS: _check_install_cargo_flamegraph
cargo flamegraph {{ FLAGS }}