fix(docker): restore benches/ copy after stub removal in builder stage
The dep-caching layer creates stub files (src/main.rs and benches/agent_benchmarks.rs) to warm the cargo registry cache, then removes them with `rm -rf src benches`. The subsequent real source copy only restored `src/` — leaving `benches/` absent. Cargo's manifest parser then failed to locate `benches/agent_benchmarks.rs` referenced in Cargo.toml, aborting the release build with: error: failed to parse manifest at `/app/Cargo.toml` Caused by: can't find `agent_benchmarks` bench at `benches/agent_benchmarks.rs` Fix: add `COPY benches/ benches/` alongside the `COPY src/ src/` step so the real bench source is present for the incremental release build.
This commit is contained in:
parent
a3eedfdc78
commit
7f15627f8c
1 changed files with 2 additions and 1 deletions
|
|
@ -26,6 +26,7 @@ RUN rm -rf src benches
|
|||
|
||||
# 2. Copy only build-relevant source paths (avoid cache-busting on docs/tests/scripts)
|
||||
COPY src/ src/
|
||||
COPY benches/ benches/
|
||||
COPY firmware/ firmware/
|
||||
RUN --mount=type=cache,id=zeroclaw-cargo-registry,target=/usr/local/cargo/registry,sharing=locked \
|
||||
--mount=type=cache,id=zeroclaw-cargo-git,target=/usr/local/cargo/git,sharing=locked \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue