mirror of
https://github.com/CloudNebulaProject/barycenter.git
synced 2026-04-10 13:10:42 +00:00
fix: use platform-specific build caches to avoid race conditions
This commit is contained in:
parent
55a0141a2f
commit
94767f5554
1 changed files with 4 additions and 3 deletions
|
|
@ -10,9 +10,10 @@ COPY Cargo.toml Cargo.lock ./
|
|||
# Copy source code
|
||||
COPY src ./src
|
||||
|
||||
# Build release binary
|
||||
RUN --mount=type=cache,target=/usr/local/cargo/registry \
|
||||
--mount=type=cache,target=/build/target \
|
||||
# Build release binary with platform-specific caches to avoid race conditions
|
||||
ARG TARGETPLATFORM
|
||||
RUN --mount=type=cache,target=/usr/local/cargo/registry,id=cargo-registry-${TARGETPLATFORM} \
|
||||
--mount=type=cache,target=/build/target,id=build-target-${TARGETPLATFORM} \
|
||||
cargo build --release && \
|
||||
cp target/release/barycenter /barycenter
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue