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

chore(ci): add cargo build caching to ci pipeline #378

Merged
merged 1 commit into from
Aug 16, 2023
Merged

Conversation

LNSD
Copy link
Contributor

@LNSD LNSD commented Aug 16, 2023

Running the CI pipeline can take more than 10 minutes. And in the case the integration test fail (due to external reasons), one would have to rerun the CI job, consuming another 10 minutes.

  • This PR adds a "cargo build cache" step that caches the build artifacts to optimize significantly for the CI execution time. Reducing the execution time from minutes to a few seconds.
  • The unit and integration test steps have also been split to make spotting the failing test case easier.
  • Limited the CI jobs concurrency to only one per PR. When a new push happens, the previous build is canceled.
  • CI builds will only happen when "a PR is opened, or a push happens on a PR" and when a PR is merged into the main branch.

As Seeing is believing 👀:

First run (no cache):

image

Reusing an existing cache:

image

@LNSD LNSD self-assigned this Aug 16, 2023
@LNSD LNSD marked this pull request as ready for review August 16, 2023 18:37
Copy link
Member

@Theodus Theodus left a comment

Choose a reason for hiding this comment

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

Awesome! I was hoping there was a way to speed this up.

@LNSD LNSD merged commit eb5aa24 into main Aug 16, 2023
1 check passed
@LNSD LNSD deleted the chore-ci-cache-build branch August 16, 2023 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants