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

Use arm runners #622

Merged
merged 9 commits into from
Oct 11, 2024
Merged

Use arm runners #622

merged 9 commits into from
Oct 11, 2024

Conversation

leighmcculloch
Copy link
Member

@leighmcculloch leighmcculloch commented Jul 28, 2024

What

Use arm64 runners to build core, rpc, and xdr-cli.

Uses free amd64 instances to first attempt to recover previously build core, rpc, and xdr-cli binaries from the GitHub Action cache.

Horizon, friendbot, and the quickstart image itself are still built only with free amd64 runners, because there doesn't appear to be a significant need to optimise those which would add additional cost.

Why

More efficient arm builds without needing emulation.

Lately core, now that it has all the rust components to build, has been taking a long time and struggling in many instances to build successfully. This changes brings core build time down to a consistent 20mins on the 4-core arm64 instance.

The workflow has many individual steps because building a single dependency like core first spins up a free amd64 instance to check the cache and load the image from there, and then the more expensive arm64 instance is only triggered when we actually need to build.

Trying It Out

docker run -i -p 8000:8000 stellar/quickstart:pr622-v445-testing --local

@leighmcculloch
Copy link
Member Author

This needs some more work. While this speeds up uncached builds so they only take 20 minutes instead of 2-3 hours, for cached builds there is very little difference in build time. That little difference in build time is however 7-14x more expensive because the builds are using non-free runners.

Base automatically changed from update-friendbot to master July 29, 2024 21:03
Copy link

This pull request is stale because it has been open for 30 days with no activity. It will be closed in 30 days unless the stale label is removed.

Copy link

github-actions bot commented Oct 3, 2024

This pull request is stale because it has been open for 30 days with no activity. It will be closed in 30 days unless the stale label is removed.

@leighmcculloch leighmcculloch marked this pull request as ready for review October 10, 2024 23:22
@leighmcculloch leighmcculloch enabled auto-merge (squash) October 10, 2024 23:30
@leighmcculloch leighmcculloch enabled auto-merge (squash) October 10, 2024 23:30
Copy link
Contributor

@graydon graydon left a comment

Choose a reason for hiding this comment

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

I don't understand all the details here but the code looks like benign build plumbing and I trust that you're pursuing a noble goal with it.

@leighmcculloch leighmcculloch merged commit f6c6648 into master Oct 11, 2024
176 checks passed
@leighmcculloch leighmcculloch deleted the use-arm-runners branch October 11, 2024 05:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants