Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: improve parallelism #755

Merged
merged 1 commit into from
Dec 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,23 @@ FROM builder-base AS builder-ci
RUN --mount=type=cache,target=${CARGO_HOME}/registry \
--mount=type=cache,target=${CARGO_HOME}/git \
--mount=type=cache,target=/app/target \
cargo build && \
cargo clippy --workspace --benches --tests --examples --all-features --frozen -- -D warnings && \
cargo nextest archive --archive-file tests.tar.zst

FROM builder-ci as doc

RUN --mount=type=cache,target=${CARGO_HOME}/registry \
--mount=type=cache,target=${CARGO_HOME}/git \
--mount=type=cache,target=/app/target \
cargo doc --all-features --workspace --frozen --no-deps && \
touch doc-done


FROM builder-ci AS ci-part

RUN --mount=type=cache,target=${CARGO_HOME}/registry \
--mount=type=cache,target=${CARGO_HOME}/git \
--mount=type=cache,target=/app/target \
cargo clippy --workspace --benches --tests --examples --all-features --frozen -- -D warnings && \
cargo doc --all-features --workspace --frozen --no-deps && \
touch ci-part-done

Expand All @@ -85,6 +92,7 @@ COPY --from=ci-part /app/ci-part-done /app/ci-part-done
COPY --from=machete /app/machete-done /app/machete-done
COPY --from=fmt /app/fmt-done /app/fmt-done
COPY --from=nextest /app/nextest-done /app/nextest-done
COPY --from=doc /app/doc-done /app/doc-done

# Release builder
FROM builder-base AS build-release
Expand Down
Loading