fix(docker): avoid double compile in smoke build (#686)

This commit is contained in:
Will Sarg 2026-02-17 17:00:23 -05:00 committed by GitHub
parent 48fdc1c113
commit a973f31065
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -12,8 +12,8 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
pkg-config \ pkg-config \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
# 1. Copy manifests to cache dependencies # 1. Copy manifests and toolchain pin to cache dependencies with the same compiler
COPY Cargo.toml Cargo.lock ./ COPY Cargo.toml Cargo.lock rust-toolchain.toml ./
# Create dummy targets declared in Cargo.toml so manifest parsing succeeds. # Create dummy targets declared in Cargo.toml so manifest parsing succeeds.
RUN mkdir -p src benches \ RUN mkdir -p src benches \
&& echo "fn main() {}" > src/main.rs \ && echo "fn main() {}" > src/main.rs \