feat(dev): add local dockerized ci workflow (#342)

This commit is contained in:
Will Sarg 2026-02-16 09:10:39 -05:00 committed by GitHub
parent f2c73bacf8
commit b61d33aa1c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 259 additions and 17 deletions

View file

@ -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 ───────────────────────