From 63dcaa9fbf0e8ee6cd542fa31610e042319f02dc Mon Sep 17 00:00:00 2001 From: Petr Tsymbarovich Date: Fri, 28 Aug 2026 17:57:17 +0300 Subject: [PATCH] chore: add clean task --- benches/tasks.toml | 5 +++++ codegen/tasks.toml | 5 +++++ docs/tasks.toml | 5 +++++ mise.toml | 4 ++++ targets/ptfkit-py/tasks.toml | 5 +++++ targets/ptfkit-rs/tasks.toml | 5 +++++ 6 files changed, 29 insertions(+) diff --git a/benches/tasks.toml b/benches/tasks.toml index bb3a4f7..c2c5743 100644 --- a/benches/tasks.toml +++ b/benches/tasks.toml @@ -24,3 +24,8 @@ depends = ["bench:build"] dir = "benches" run = "uv run --no-project run.py" output = "interleave" + +["bench:clean"] +description = "Remove benchmark build artifacts and environments" +dir = "benches" +run = "cmake -E rm -rf .venv ptfkit-native/build ptfkit-py/.venv ptfkit-rs/target" diff --git a/codegen/tasks.toml b/codegen/tasks.toml index 8a0d533..e8a3b29 100644 --- a/codegen/tasks.toml +++ b/codegen/tasks.toml @@ -16,3 +16,8 @@ run = "cargo test" ["codegen:verify"] description = "Run all code generator quality checks" depends = ["codegen:format", "codegen:lint", "codegen:test"] + +["codegen:clean"] +description = "Remove code generator Cargo build artifacts" +dir = "codegen" +run = "cargo clean" diff --git a/docs/tasks.toml b/docs/tasks.toml index 6109d30..2f10589 100644 --- a/docs/tasks.toml +++ b/docs/tasks.toml @@ -24,3 +24,8 @@ run = "uv run --no-sync ty check" ["docs:verify"] description = "Run documentation quality checks and build the site" depends = ["docs:lint", "docs:format", "docs:typecheck", "docs:build"] + +["docs:clean"] +description = "Remove documentation build artifacts and environment" +dir = "docs" +run = "cmake -E rm -rf .venv dist __pycache__" diff --git a/mise.toml b/mise.toml index b4d1a34..487612f 100644 --- a/mise.toml +++ b/mise.toml @@ -52,3 +52,7 @@ depends = ["codegen:test", "native:test", "python:test", "rust:test"] [tasks.verify] description = "Run all component verification suites" depends = ["codegen:verify", "native:verify", "python:verify", "rust:verify"] + +[tasks.clean] +description = "Remove all local build artifacts and development environments" +depends = ["bench:clean", "codegen:clean", "docs:clean", "native:clean", "python:clean", "rust:clean"] diff --git a/targets/ptfkit-py/tasks.toml b/targets/ptfkit-py/tasks.toml index a048fab..72fe514 100644 --- a/targets/ptfkit-py/tasks.toml +++ b/targets/ptfkit-py/tasks.toml @@ -51,3 +51,8 @@ run = "ty check --fix" ["python:verify"] description = "Run all Python target quality checks" depends = ["python:lint", "python:format", "python:typecheck", "python:test"] + +["python:clean"] +description = "Remove Python build artifacts and development environment" +dir = "targets/ptfkit-py" +run = "cmake -E rm -rf .venv build dist wheelhouse src/ptfkit.egg-info" diff --git a/targets/ptfkit-rs/tasks.toml b/targets/ptfkit-rs/tasks.toml index dd20852..a37e01b 100644 --- a/targets/ptfkit-rs/tasks.toml +++ b/targets/ptfkit-rs/tasks.toml @@ -16,3 +16,8 @@ run = "cargo test" ["rust:verify"] description = "Run all Rust target quality checks" depends = ["rust:format", "rust:lint", "rust:test"] + +["rust:clean"] +description = "Remove Rust target Cargo build artifacts" +dir = "targets/ptfkit-rs" +run = "cargo clean"