Files
OpenShell/tasks/rust.toml
Dimitar Mirchev 61529cf648 refactor(tasks): split rust:verify:drivers-off into per-driver subtasks
Break the flat 12-step run list into seven hidden sibling tasks — one
positive control, four single-driver builds, one mixed docker+podman
build, and one zero-driver build (which also runs the extension-only
unit tests). The top-level task becomes a `depends` aggregator over
them.

Each sub-task runs the exact same cargo build + verify-drivers-compiled-
out.sh pair as before, so total work and CI wall clock are unchanged.
The split lets a developer re-run a single leg in isolation
(`mise run rust:verify:drivers-off:podman`) after a failure, and mise's
per-task log prefix makes a failing leg trivially identifiable in CI
output. The parent task keeps the same name so
`.github/workflows/branch-checks.yml` needs no change.

Signed-off-by: Dimitar Mirchev <28221091+dimityrmirchev@users.noreply.github.com>
2026-07-08 10:48:36 +03:00

122 lines
5.1 KiB
TOML

# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
# Rust check, lint, and format tasks
["rust:check"]
description = "Check all Rust crates for errors"
run = "cargo check --workspace"
hide = true
["rust:lint"]
description = "Lint Rust code with Clippy (deny warnings)"
run = [
"cargo clippy --workspace --all-targets -- -D warnings",
"cargo clippy --manifest-path e2e/rust/Cargo.toml --all-targets -- -D warnings",
]
hide = true
["rust:format"]
description = "Format Rust code"
run = "cargo fmt --all"
hide = true
["rust:format:check"]
description = "Check Rust formatting"
run = "cargo fmt --all -- --check"
hide = true
["rust:verify:telemetry-off"]
description = "Verify telemetry emission code is compiled out with --no-default-features"
run = [
# Positive control: the default (telemetry-on) gateway must contain the
# markers, so the absent checks below can never become silently vacuous.
"cargo build -p openshell-server --bin openshell-gateway",
"tasks/scripts/verify-telemetry-compiled-out.sh present target/debug/openshell-gateway",
# Guard: telemetry-free builds must contain no telemetry markers. The
# gateway needs at least one compute driver to link, so build with a
# single-driver feature set that excludes telemetry.
"cargo build -p openshell-server --bin openshell-gateway --no-default-features --features driver-kubernetes,driver-docker,driver-podman,driver-vm",
"tasks/scripts/verify-telemetry-compiled-out.sh absent target/debug/openshell-gateway",
"cargo build -p openshell-sandbox --bin openshell-sandbox --no-default-features",
"tasks/scripts/verify-telemetry-compiled-out.sh absent target/debug/openshell-sandbox",
]
["rust:verify:drivers-off"]
description = "Verify each compute driver can be compiled out via per-driver cargo features"
depends = [
# Positive control: the default build carries every driver's markers.
"rust:verify:drivers-off:default-all",
# Each single-driver build carries only that driver's markers.
"rust:verify:drivers-off:kubernetes",
"rust:verify:drivers-off:docker",
"rust:verify:drivers-off:podman",
"rust:verify:drivers-off:vm",
# Mixed feature set: verifies driver features compose additively.
"rust:verify:drivers-off:docker+podman",
# Zero-driver build is a valid extension-only gateway shape. Asserts the
# binary links, no built-in driver markers survived, and the extension-only
# unit-test paths behind #[cfg(not(any(feature = "driver-*")))] execute.
"rust:verify:drivers-off:none",
]
["rust:verify:drivers-off:default-all"]
description = "Verify the default gateway build carries every driver's markers"
hide = true
run = [
"cargo build -p openshell-server --bin openshell-gateway",
"tasks/scripts/verify-drivers-compiled-out.sh present all target/debug/openshell-gateway",
]
["rust:verify:drivers-off:kubernetes"]
description = "Verify a --features driver-kubernetes gateway carries only the kubernetes marker"
hide = true
run = [
"cargo build -p openshell-server --bin openshell-gateway --no-default-features --features driver-kubernetes",
"tasks/scripts/verify-drivers-compiled-out.sh only kubernetes target/debug/openshell-gateway",
]
["rust:verify:drivers-off:docker"]
description = "Verify a --features driver-docker gateway carries only the docker marker"
hide = true
run = [
"cargo build -p openshell-server --bin openshell-gateway --no-default-features --features driver-docker",
"tasks/scripts/verify-drivers-compiled-out.sh only docker target/debug/openshell-gateway",
]
["rust:verify:drivers-off:podman"]
description = "Verify a --features driver-podman gateway carries only the podman marker"
hide = true
run = [
"cargo build -p openshell-server --bin openshell-gateway --no-default-features --features driver-podman",
"tasks/scripts/verify-drivers-compiled-out.sh only podman target/debug/openshell-gateway",
]
["rust:verify:drivers-off:vm"]
description = "Verify a --features driver-vm gateway carries only the vm marker"
hide = true
run = [
"cargo build -p openshell-server --bin openshell-gateway --no-default-features --features driver-vm",
"tasks/scripts/verify-drivers-compiled-out.sh only vm target/debug/openshell-gateway",
]
["rust:verify:drivers-off:docker+podman"]
description = "Verify a --features driver-docker,driver-podman gateway carries only those two markers"
hide = true
run = [
"cargo build -p openshell-server --bin openshell-gateway --no-default-features --features driver-docker,driver-podman",
"tasks/scripts/verify-drivers-compiled-out.sh only docker,podman target/debug/openshell-gateway",
]
["rust:verify:drivers-off:none"]
description = "Verify a --no-default-features gateway links, carries no driver markers, and runs the extension-only unit tests"
hide = true
run = [
"cargo build -p openshell-server --bin openshell-gateway --no-default-features",
"tasks/scripts/verify-drivers-compiled-out.sh absent all target/debug/openshell-gateway",
# The zero-driver profile gates the extension-only unit test paths; run
# the library test suite under --no-default-features so those assertions
# actually execute.
"cargo test -p openshell-server --lib --no-default-features",
]