-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (30 loc) · 1.61 KB
/
Copy pathMakefile
File metadata and controls
40 lines (30 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
.DEFAULT_GOAL := help
SHELL := bash
help: ## show available targets
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN{FS=":.*?## "}{printf " \033[36m%-16s\033[0m %s\n",$$1,$$2}'
guard: ## fail if internal/confidential content leaked into tracked files
bash scripts/check-no-internal.sh
fmt: ## format rust + python
cargo fmt --manifest-path shinkend/Cargo.toml
cd sdk/python && ruff format .
lint: ## lint rust + python + typescript with the same flags as CI
cargo fmt --manifest-path shinkend/Cargo.toml --all -- --check
cargo clippy --locked --manifest-path shinkend/Cargo.toml --all-targets -- -D warnings
cd sdk/python && ruff check .
cd sdk/python && ruff format --check .
npm run ts:check
test: ## test rust + python + typescript
cargo test --locked --manifest-path shinkend/Cargo.toml --all
cd sdk/python && pytest -q
npm run ts:test
run: ## run the token-protected Guest Runtime (prints a fresh local token)
@TOKEN="$${SHINKEND_TOKEN:-$$(python3 -c 'import secrets; print(secrets.token_hex(32))')}"; \
echo "SHINKEND_TOKEN=$$TOKEN"; \
SHINKEND_TOKEN="$$TOKEN" cargo run --manifest-path shinkend/Cargo.toml
sandbox-image: ## build the Linux Sandbox docker image
docker build -f images/linux/Dockerfile -t shinken/sandbox-linux .
sandbox-bench: ## run a one-sandbox local Docker provider benchmark
PYTHONPATH=sdk/python/src python scripts/sandbox_bench.py --provider docker --concurrency 1 --iterations 1
benchmarks: ## run every local benchmark suite (Docker; regenerates results JSON + plots)
bash benchmarks/run_all.sh
.PHONY: help guard fmt lint test run sandbox-image sandbox-bench benchmarks