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

Improve workflow times for releasing Docker image #2909

Open
Eligioo opened this issue Sep 11, 2024 · 0 comments
Open

Improve workflow times for releasing Docker image #2909

Eligioo opened this issue Sep 11, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@Eligioo
Copy link
Member

Eligioo commented Sep 11, 2024

When releasing a new tag, we build a new Docker image through the Build + Release docker workflow. It compiles the whole project including binaries and libs which don't end up in the Docker image.

Some unnecessary binaries are: nimiq-performance-history-store, nimiq-performance-accounts-tree, nimiq-signtx, nimiq-zkp-constraints. But there are more.

The Docker image currently only needs:

  • nimiq-client
  • nimiq-bls
  • nimiq-address
  • nimiq-rpc

Locally a fresh cargo build --release takes 5m 46s and keeps growing as the project grows and more libs and binaries are introduced.

Compiling only the necessary binaries result in faster times.
cargo build --release --bin nimiq-client takes 2m 33s.
cargo build --release --bin nimiq-bls takes 22.01s.
cargo build --release --bin nimiq-address takes 2.8s.
cargo build --release --bin nimiq-rpc takes 25.13s.
Which is around 3m 22s in total.

This strategy can applied to more workflows to reduce Action times in general.

@Eligioo Eligioo added the enhancement New feature or request label Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant