cargo-matrix 0.4.6

Run feature matrices against cargo commands that support feature lists
# =============================================================================
# Rakefile.toml — cargo-matrix build pipeline
#
# Quick reference:
#
#   cargo rake                           default (most: fmt→clippy→build→test→coverage)
#   cargo rake most ^test ^coverage      skip tests and coverage
#   cargo rake most ^coverage            skip coverage only
#   cargo rake most clean                add cargo clean
#   cargo rake all                       everything (puc + most + audit + clean)
#   cargo rake daily                     alias for all (morning full-pipeline run)
#   cargo rake audit                     cargo-audit advisory check (CI-gated on release tags, not `most`)
#   cargo rake release                   run the repomon release pipeline (see scripts/release/release.fish)
# =============================================================================

# ---------------------------------------------------------------------------
# tools
# ---------------------------------------------------------------------------

[tool.cargo.matrix]
crate = "cargo-matrix"
check = ["cargo", "matrix", "--version"]
install = ["cargo", "install", "cargo-matrix", "--force", "--locked"]
update = true

[tool.cargo.nextest]
crate = "cargo-nextest"
check = ["cargo", "nextest", "--version"]
install = ["cargo", "install", "cargo-nextest", "--force", "--locked"]
update = true

[tool.cargo.llvm-cov]
crate = "cargo-llvm-cov"
check = ["cargo", "llvm-cov", "--version"]
install = ["cargo", "install", "cargo-llvm-cov", "--force", "--locked"]
update = true

[tool.cargo.audit]
crate = "cargo-audit"
check = ["cargo", "audit", "--version"]
install = ["cargo", "install", "cargo-audit", "--force", "--locked"]
update = true

[tool.fish.puc]
hint = "The 'puc' fish function is required to run this target"

# ---------------------------------------------------------------------------
# update
# ---------------------------------------------------------------------------

[target.puc]
tools = ["puc"]
time_tracking = false

[[target.puc.command]]
name = "puc"
platform = ["linux"]
fish = "puc"

# ---------------------------------------------------------------------------
# fmt
# ---------------------------------------------------------------------------

[[target.fmt.command]]
name = "fmt"
cmd = ["cargo", "fmt"]

[[target.fmt.command]]
name = "fmt check"
cmd = ["cargo", "fmt", "--all", "--", "--check"]

# ---------------------------------------------------------------------------
# clippy
# ---------------------------------------------------------------------------

[target.clippy]
tools = ["matrix"]

[[target.clippy.command]]
name = "clippy"
cmd = ["cargo", "matrix", "clippy", "--all-targets", "--", "-Dwarnings"]

# ---------------------------------------------------------------------------
# build
# ---------------------------------------------------------------------------

[target.build]
tools = ["matrix"]

[[target.build.command]]
name = "build"
cmd = ["cargo", "matrix", "build"]

# ---------------------------------------------------------------------------
# test
# ---------------------------------------------------------------------------

[target.test]
depends_on = ["build"]
tools = ["matrix", "nextest"]

[[target.test.command]]
name = "nextest"
cmd = ["cargo", "matrix", "nextest", "run"]

# ---------------------------------------------------------------------------
# coverage
# ---------------------------------------------------------------------------

[target.coverage]
depends_on = ["test"]
tools = ["matrix", "llvm-cov", "nextest"]

[[target.coverage.command]]
name = "coverage"
cmd = ["cargo", "matrix", "-F", "unstable", "llvm-cov", "nextest", "--no-report"]

[[target.coverage.command]]
name = "lcov.info"
cmd = ["cargo", "llvm-cov", "report", "--lcov", "--output-path", "lcov.info"]

[[target.coverage.command]]
name = "html"
cmd = ["cargo", "llvm-cov", "report", "--html"]

# ---------------------------------------------------------------------------
# audit
# ---------------------------------------------------------------------------
# Not part of `most`/`default` -- gated in CI on release-tag pushes only
# (see .repomon/audit.toml), same as every repomon-converted sibling. Still
# included in `all`/`daily` for a full local pre-release sweep.

[target.audit]
tools = ["audit"]

[[target.audit.command]]
name = "audit"
cmd = ["cargo", "audit", "--deny", "warnings"]

# ---------------------------------------------------------------------------
# release
# ---------------------------------------------------------------------------
# Orchestrates the repomon release pipeline (tag push -> remote builds ->
# publish). Linux-only: it's only ever run from this machine. Not part of
# `most`/`all`/`daily` -- invoked standalone after pushing a release tag.

[[target.release.command]]
name = "release"
platform = ["linux"]
fish = "fish scripts/release/release.fish"

# ---------------------------------------------------------------------------
# clean
# ---------------------------------------------------------------------------

[[target.clean.command]]
name = "clean"
cmd = ["cargo", "clean"]

[[target.clean.command]]
name = "rm lcov.info"
sh = "rm -f lcov.info"
fish = "rm -f lcov.info"
ps = "Remove-Item -Force lcov.info -ErrorAction Ignore"

# ---------------------------------------------------------------------------
# aggregates
# ---------------------------------------------------------------------------

[target.most]
depends_on = ["fmt", "clippy", "build", "test", "coverage"]

[target.all]
depends_on = ["puc", "fmt", "clippy", "audit", "build", "test", "coverage", "clean"]

[target.daily]
depends_on = ["all"]

[target.default]
depends_on = ["most"]