Skip to content

Commit

Permalink
chore(CI): Speeding up docker builds in CI (matter-labs#640)
Browse files Browse the repository at this point in the history
## What ❔

* Removed zk contract compilation that was run before prover docker
builds
* Removed docker builds for old prover and old circuit_synthesizer
* Downloading CRS file only for the snark wrapper / compressor job

## Why ❔

* to speed up docker CI that runs on every PR
  • Loading branch information
mm-zk authored Dec 8, 2023
1 parent d91b55b commit 21fc6ff
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 16 deletions.
14 changes: 5 additions & 9 deletions .github/workflows/build-prover-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ jobs:
matrix:
component:
- witness-generator
- prover-v2
- circuit-synthesizer
- prover-fri
- prover-gpu-fri
- witness-vector-generator
Expand Down Expand Up @@ -74,16 +72,14 @@ jobs:
- name: init
run: |
ci_run git config --global --add safe.directory /usr/src/zksync
ci_run git config --global --add safe.directory /usr/src/zksync/sdk/binaryen
ci_run git config --global --add safe.directory /usr/src/zksync/etc/system-contracts
ci_run git config --global --add safe.directory /usr/src/zksync/contracts
ci_run zk
ci_run zk clean --all
ci_run zk run yarn
ci_run cp etc/tokens/{test,localhost}.json
ci_run zk compiler all
ci_run zk contract build
ci_run zk f yarn run l2-contracts build
# We need the CRS only for the fri compressor.
- name: download CRS
if: matrix.component == 'proof-fri-compressor'
run: |
ci_run curl -LO https://storage.googleapis.com/matterlabs-setup-keys-us/setup-keys/setup_2\^26.key
- name: login to Docker registries
Expand Down
2 changes: 1 addition & 1 deletion docker/proof-fri-compressor/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ RUN curl https://sh.rustup.rs -sSf | bash -s -- -y && \
WORKDIR /usr/src/zksync
COPY . .

RUN cargo build --release
RUN cargo build --release --bin zksync_proof_fri_compressor

FROM debian:bookworm-slim

Expand Down
2 changes: 1 addition & 1 deletion docker/prover-fri-gateway/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ RUN curl https://sh.rustup.rs -sSf | bash -s -- -y && \
WORKDIR /usr/src/zksync
COPY . .

RUN cargo build --release
RUN cargo build --release --bin zksync_prover_fri_gateway

FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y curl libpq5 ca-certificates && rm -rf /var/lib/apt/lists/*
Expand Down
2 changes: 1 addition & 1 deletion docker/prover-fri/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ RUN curl https://sh.rustup.rs -sSf | bash -s -- -y && \
WORKDIR /usr/src/zksync
COPY . .

RUN cargo build --release
RUN cargo build --release --bin zksync_prover_fri

FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y curl libpq5 ca-certificates && rm -rf /var/lib/apt/lists/*
Expand Down
2 changes: 1 addition & 1 deletion docker/prover-gpu-fri/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ RUN curl -Lo cmake-3.24.2-linux-x86_64.sh https://github.com/Kitware/CMake/relea
WORKDIR /usr/src/zksync
COPY . .

RUN cargo build --release --features "gpu"
RUN cargo build --release --features "gpu" --bin zksync_prover_fri

FROM nvidia/cuda:12.2.0-runtime-ubuntu22.04

Expand Down
2 changes: 1 addition & 1 deletion docker/witness-generator/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ RUN curl https://sh.rustup.rs -sSf | bash -s -- -y && \
WORKDIR /usr/src/zksync
COPY . .

RUN cargo build --release
RUN cargo build --release --bin zksync_witness_generator

FROM debian:bookworm-slim

Expand Down
2 changes: 1 addition & 1 deletion docker/witness-vector-generator/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ RUN curl https://sh.rustup.rs -sSf | bash -s -- -y && \
WORKDIR /usr/src/zksync
COPY . .

RUN cargo build --release
RUN cargo build --release --bin zksync_witness_vector_generator

FROM debian:bookworm-slim

Expand Down
1 change: 1 addition & 0 deletions prover/circuit_synthesizer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# PART OF OLD PROVER - OBSOLETE
2 changes: 1 addition & 1 deletion prover/prover/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Readme
# OLD PROVER - OBSOLETE

For compiling locally (no cuda) set `features=["legacy"], default-features=false` for:

Expand Down

0 comments on commit 21fc6ff

Please sign in to comment.