-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTiltfile
More file actions
54 lines (45 loc) · 1.27 KB
/
Tiltfile
File metadata and controls
54 lines (45 loc) · 1.27 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Beacon Gateway Development
load("ext://dotenv", "dotenv")
# Load environment from metarepo
env_file = "../../.env.local"
if os.path.exists(env_file):
dotenv(fn=env_file)
project_name = "beacon-gateway"
# Build the gateway
local_resource(
"build-%s" % project_name,
cmd="cargo build",
deps=["src", "Cargo.toml"],
labels=[project_name],
)
# Run the gateway (depends on Synapse for LLM routing when available)
gateway_deps = ["build-%s" % project_name]
# Check if Synapse is available (resource registered by parent Tiltfile)
synapse_path = "%s/projects/omni/synapse" % os.environ["HOME"]
if os.path.exists(synapse_path):
gateway_deps.append("dev-synapse")
local_resource(
"dev-%s" % project_name,
serve_cmd="cargo run -- --foreground --verbose --persona ${BEACON_PERSONA:-orin}",
deps=["src"],
resource_deps=gateway_deps,
labels=[project_name],
)
# Run tests
local_resource(
"test-%s" % project_name,
cmd="cargo test",
deps=["src", "Cargo.toml"],
labels=[project_name],
auto_init=False,
trigger_mode=TRIGGER_MODE_MANUAL,
)
# Lint
local_resource(
"lint-%s" % project_name,
cmd="cargo clippy",
deps=["src", "Cargo.toml"],
labels=[project_name],
auto_init=False,
trigger_mode=TRIGGER_MODE_MANUAL,
)