feat(dev): add local dockerized ci workflow (#342)
This commit is contained in:
parent
f2c73bacf8
commit
b61d33aa1c
7 changed files with 259 additions and 17 deletions
|
|
@ -14,14 +14,18 @@ RUN apt-get update && apt-get install -y \
|
|||
COPY Cargo.toml Cargo.lock ./
|
||||
# Create dummy main.rs to build dependencies
|
||||
RUN mkdir src && echo "fn main() {}" > src/main.rs
|
||||
RUN cargo build --release --locked
|
||||
RUN --mount=type=cache,target=/usr/local/cargo/registry \
|
||||
--mount=type=cache,target=/usr/local/cargo/git \
|
||||
cargo build --release --locked
|
||||
RUN rm -rf src
|
||||
|
||||
# 2. Copy source code
|
||||
COPY . .
|
||||
# Touch main.rs to force rebuild
|
||||
RUN touch src/main.rs
|
||||
RUN cargo build --release --locked && \
|
||||
RUN --mount=type=cache,target=/usr/local/cargo/registry \
|
||||
--mount=type=cache,target=/usr/local/cargo/git \
|
||||
cargo build --release --locked && \
|
||||
strip target/release/zeroclaw
|
||||
|
||||
# ── Stage 2: Permissions & Config Prep ───────────────────────
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue