mirror of
https://github.com/CloudNebulaProject/barycenter.git
synced 2026-04-10 21:20:41 +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 source code
|
||||||
COPY src ./src
|
COPY src ./src
|
||||||
|
|
||||||
# Build release binary
|
# Build release binary with platform-specific caches to avoid race conditions
|
||||||
RUN --mount=type=cache,target=/usr/local/cargo/registry \
|
ARG TARGETPLATFORM
|
||||||
--mount=type=cache,target=/build/target \
|
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 && \
|
cargo build --release && \
|
||||||
cp target/release/barycenter /barycenter
|
cp target/release/barycenter /barycenter
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue