# UltraCloud Makefile
# Unifies build and test commands

.PHONY: all build cluster-up cluster-down cluster-status cluster-validate cluster-smoke cluster-matrix cluster-bench-storage clean

PACKAGE ?= default

# Build a single package by default; set PACKAGE=default to build the full bundle.
build:
	nix build .#$(PACKAGE)

# Cluster Management
cluster-up:
	nix run ./nix/test-cluster#cluster -- start

cluster-down:
	nix run ./nix/test-cluster#cluster -- stop

cluster-status:
	nix run ./nix/test-cluster#cluster -- status

cluster-validate:
	nix run ./nix/test-cluster#cluster -- validate

cluster-smoke:
	nix run ./nix/test-cluster#cluster -- fresh-smoke

cluster-matrix:
	nix run ./nix/test-cluster#cluster -- fresh-matrix

cluster-bench-storage:
	nix run ./nix/test-cluster#cluster -- fresh-storage-bench

cluster-clean:
	nix run ./nix/test-cluster#cluster -- clean

# Clean up build artifacts
clean:
	rm -rf result
