-
Notifications
You must be signed in to change notification settings - Fork 215
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
Tune up backend
GHA
#495
Tune up backend
GHA
#495
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit sad that we need to split into multiple files to make thie work better (though well done on reducing the build times so much; that's great :)).
Could you achieve a similar thing by using one file but tagging the rust cache invocation in each job with some different thing to give each a unique cache or something?
Still; I'm ok with it either way; just wondering really because I could see this sort of change being applied across a lot of projects.
I've tried that approach as well, but looks like when it happens within one runner those caches corrupting each other. And it always a lottery whether it will work or not. Probably because it populating cache to So either in sequence or in separate runners. |
Refactored workflow
backend.yml
by splitting it in four parts. Each job into its independentbackend_fmt.yml
,backend_check.yml
,backend_docs.yml
andbackend_tests.yml
respectively.The goal of this change is to overcome limitations of the Swatinem/rust-cache GitHub Action. When multiple jobs within one workflow uses above mentioned GHA and executed in parallel it often fails to restore rust cache. Possible two solutions, make jobs using
rust-cache
to run sequentially within single workflow or setup separate workflows for every job. The latter approach is more reliable as allows to execute jobs in parallel despite little overhead of spinning up additional runners.As a result workflows execution time reduced almost 3 times. From 15-18 minutes to 5-7 minutes.