Skip to content

Commit 6c04b9c

Browse files
Antigravity Agentclaude
andcommitted
fix(build): add train-deploy step, fix Dockerfile raylib build failure
The Dockerfile.hslm-train was running `zig build` which compiled ALL targets including raylib GUI binaries that fail on Railway (no raylib). Added `train-deploy` build step that only compiles hslm-train and hslm-entrypoint. Dockerfile now uses this targeted step. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent de4e123 commit 6c04b9c

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

Dockerfile.hslm-train

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,10 @@ ENV PATH="/usr/local/zig-x86_64-linux-0.15.2:${PATH}"
2020
WORKDIR /app
2121
COPY . .
2222

23-
# Build hslm-train + hslm-entrypoint (retry 3x for Zig 0.15.x transient build runner crash)
23+
# Build ONLY training binaries (train-deploy step — no raylib/GUI targets)
2424
RUN for i in 1 2 3; do \
2525
echo "[build] attempt $i/3..."; \
26-
zig build hslm-train -Doptimize=ReleaseSafe 2>&1 && \
27-
zig build -Doptimize=ReleaseFast 2>&1 && break; \
26+
zig build train-deploy -Doptimize=ReleaseFast 2>&1 && break; \
2827
echo "[build] attempt $i failed, retrying..."; \
2928
sleep 1; \
3029
done && \

build.zig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1611,6 +1611,11 @@ pub fn build(b: *std.Build) void {
16111611
});
16121612
b.installArtifact(hslm_entrypoint);
16131613

1614+
// train-deploy: build ONLY training binaries (for Railway Dockerfile — no raylib)
1615+
const train_deploy_step = b.step("train-deploy", "Build hslm-train + hslm-entrypoint for Railway deploy");
1616+
train_deploy_step.dependOn(&hslm_train.step);
1617+
train_deploy_step.dependOn(&hslm_entrypoint.step);
1618+
16141619
// HSLM tests
16151620
const hslm_tests = b.addTest(.{
16161621
.root_module = b.createModule(.{

0 commit comments

Comments
 (0)