Skip to content

Conversation

@shekhirin
Copy link
Collaborator

@shekhirin shekhirin commented Dec 8, 2025

Building a cross-arch Docker image was done sequentially, meaning that we first wait ~20 minutes for amd64, and then another ~20 minutes for arm64

reth/Makefile

Lines 348 to 364 in 2f55b1c

# Create a cross-arch Docker image with the given tags and push it
define op_docker_build_push
$(MAKE) op-build-x86_64-unknown-linux-gnu
mkdir -p $(BIN_DIR)/amd64
cp $(CARGO_TARGET_DIR)/x86_64-unknown-linux-gnu/$(PROFILE)/op-reth $(BIN_DIR)/amd64/op-reth
$(MAKE) op-build-aarch64-unknown-linux-gnu
mkdir -p $(BIN_DIR)/arm64
cp $(CARGO_TARGET_DIR)/aarch64-unknown-linux-gnu/$(PROFILE)/op-reth $(BIN_DIR)/arm64/op-reth
docker buildx build --file ./DockerfileOp.cross . \
--platform linux/amd64,linux/arm64 \
--tag $(DOCKER_IMAGE_NAME):$(1) \
--tag $(DOCKER_IMAGE_NAME):$(2) \
--provenance=false \
--push
endef

This PR refactors the docker.yml and docker-nightly.yml workflows to run the maxperf/profiling X reth/op-reth X amd64/arm64 matrix in parallel.

@shekhirin shekhirin added the A-ci Related to github workflows or other build and lint tools label Dec 8, 2025
@github-project-automation github-project-automation bot moved this to Backlog in Reth Tracker Dec 8, 2025
@shekhirin shekhirin requested a review from Copilot December 8, 2025 11:32
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the Docker build workflows (docker.yml and docker-nightly.yml) to parallelize cross-architecture builds, reducing total build time from ~40 minutes (sequential) to ~20 minutes (parallel). The changes split the build process into two jobs: build-binaries (which builds all arch/variant combinations in parallel using a matrix strategy) and docker-push (which assembles and pushes multi-arch images).

Key changes:

  • Split Docker workflows into separate binary building and image pushing stages
  • Introduce matrix-based parallel builds for amd64/arm64 architectures across reth/op-reth variants
  • Use GitHub Actions artifacts to transfer built binaries between jobs

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
.github/workflows/docker.yml Refactored to use parallel matrix builds for amd64/arm64 with separate build-binaries and docker-push jobs; consolidated RC and latest image logic into a single conditional push
.github/workflows/docker-nightly.yml Refactored to use parallel matrix builds for amd64/arm64 across maxperf/profiling profiles for both reth and op-reth variants

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@shekhirin shekhirin force-pushed the alexey/docker-jobs-parallel branch 3 times, most recently from 0b648f4 to 494d9ce Compare December 8, 2025 11:59
@shekhirin shekhirin force-pushed the alexey/docker-jobs-parallel branch from 494d9ce to f7d50b5 Compare December 8, 2025 11:59
@shekhirin shekhirin marked this pull request as ready for review December 8, 2025 12:00
@github-project-automation github-project-automation bot moved this from Backlog to In Progress in Reth Tracker Dec 8, 2025
@shekhirin
Copy link
Collaborator Author

Should use depot instead

@shekhirin shekhirin closed this Dec 9, 2025
@github-project-automation github-project-automation bot moved this from In Progress to Done in Reth Tracker Dec 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-ci Related to github workflows or other build and lint tools

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants