Skip to content

Commit

Permalink
Add makefile for cargo make
Browse files Browse the repository at this point in the history
  • Loading branch information
scottanderson authored and localcc committed Sep 29, 2024
1 parent d577451 commit 8f65c48
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions Makefile.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# https://github.com/sagiegurari/cargo-make
# To install run `cargo install cargo-make`

# Default task when `makers` or `cargo make` is invoked with no arguments
[tasks.default]
clear = true
dependencies = ["format", "lint", "test"]

[tasks.fmt]
alias = "format"

[tasks.format]
description = "Formats all bin and lib files of the current crate using rustfmt."
command = "cargo"
args = ["fmt", "--all"]

[tasks.lint]
description = "Run rustfmt and clippy lints."
script = '''
cargo fmt --check --all
cargo clippy --all-targets --all-features -- -D warnings
'''

[tasks.test]
clear = true
description = "Run all tests."
script = '''
cargo build --all-targets --verbose --workspace
cargo test --all-targets --verbose --workspace
cargo build --all-targets --all-features --verbose --workspace
cargo test --all-targets --all-features --verbose --workspace
'''

0 comments on commit 8f65c48

Please sign in to comment.