Merged
Conversation
Signed-off-by: Stavros Foteinopoulos <stafot@gmail.com>
e23fedb to
1af2288
Compare
andrleite
approved these changes
Sep 4, 2025
angeloskyratzakos
approved these changes
Sep 4, 2025
Signed-off-by: Stavros Foteinopoulos <stafot@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🚀 Optimize Multi-Architecture Docker Builds: 5x Performance Improvement
Summary
This PR migrates elrond from slow multi-architecture builds to the efficient pattern used in mattermost-cloud, reducing build times from ~20 minutes to ~4 minutes (5x improvement). The change eliminates ARM64 emulation overhead by using native architecture runners for each platform.
Problem
The current build process uses:
docker buildx build --platform linux/arm64,linux/amd64This builds both architectures on a single AMD64 runner, meaning ARM64 images are built through emulation, which is extremely slow. In mattermost-cloud, this same pattern was causing 1-hour build times.
Solution
Implemented the proven pattern from mattermost-cloud:
Separate Native Builds:
ubuntu-24.04runners (native, fast)ubuntu-24.04-armrunners (native, fast)Parallel Execution: Both architectures build simultaneously
Temporary Tags: Use
temp-{sha}-{arch}tags during buildUnified Manifests: Create multi-arch manifests from single-arch images
Automatic Cleanup: Clean up temporary tags via Docker Hub API
Key Changes
🔄 Updated Workflows
.github/workflows/ci.yml:pr-{number}) and main branch (test-{timestamp}).github/workflows/publish-github-release.yml:latesttag🔧 Enhanced Makefile
Added new single-architecture build targets:
Performance Impact
Required Setup
The following GitHub repository secrets must be configured:
Setup Instructions:
New Tag Strategy
Pull Requests
Main Branch Merges
Releases
Testing
Verify Multi-Architecture Support
docker manifest inspect mattermost/elrond:pr-{number}Check Build Performance
Validate Functionality
Implementation Notes
This implementation follows the exact pattern from mattermost-cloud to avoid mistakes already solved:
ubuntu-24.04andubuntu-24.04-arm)Risk Assessment
Low Risk:
Benefits:
Next Steps
Related: This resolves the slow ARM64 build issue that has been impacting developer productivity and CI reliability.
Ticket Link
https://mattermost.atlassian.net/browse/CLD-9503