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

Cache the dependencies #302

Merged
merged 9 commits into from
Sep 4, 2023
Merged

Cache the dependencies #302

merged 9 commits into from
Sep 4, 2023

Conversation

zoo868e
Copy link
Contributor

@zoo868e zoo868e commented Aug 31, 2023

Fixes #295

.github/workflows/ci.yml Outdated Show resolved Hide resolved
.github/workflows/ci.yml Outdated Show resolved Hide resolved
.github/workflows/ci.yml Outdated Show resolved Hide resolved
.github/workflows/ci.yml Outdated Show resolved Hide resolved
Copy link
Member

@joshlf joshlf left a comment

Choose a reason for hiding this comment

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

Okay, I think this is in a good state other than a few small cleanup items. Thanks so much for your work on this, @zoo868e! Very excited to have more reliable jobs - they've been failing a lot recently and causing a lot of headache.

.github/workflows/ci.yml Show resolved Hide resolved
.github/workflows/ci.yml Outdated Show resolved Hide resolved
.github/workflows/ci.yml Outdated Show resolved Hide resolved
.github/workflows/ci.yml Outdated Show resolved Hide resolved
.github/workflows/ci.yml Outdated Show resolved Hide resolved
.github/workflows/ci.yml Outdated Show resolved Hide resolved
.github/workflows/ci.yml Show resolved Hide resolved
.github/workflows/ci.yml Outdated Show resolved Hide resolved
.github/workflows/ci.yml Outdated Show resolved Hide resolved
.github/workflows/ci.yml Outdated Show resolved Hide resolved
In this commit, we optimize the population of the global Cargo registry
and cache in the CI workflow. By populating the cache before running the
jobs in the matrix, we avoid redundant downloads of crates from the
internet, improving overall workflow efficiency.

We also include the following changes:
- Removed the 'Clean build artifacts' step, as it's no longer needed
after cache population.
- Added comments to clarify the purpose of the 'Populate cache' step and
its best-effort nature.

These changes enhance the CI workflow's performance and ensure that
dependencies are efficiently managed during the build process.
Copy link
Member

@joshlf joshlf left a comment

Choose a reason for hiding this comment

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

Okay, just looks like we need to remove -test-CI2- from the cache keys and then this should be good to go!

@joshlf joshlf merged commit 4df931d into google:main Sep 4, 2023
150 checks passed
joshlf added a commit that referenced this pull request Sep 4, 2023
The caching introduced in #302 fixes the issue that this override
was meant to address, so it's no longer necessary.
@joshlf
Copy link
Member

joshlf commented Sep 4, 2023

Awesome, thanks so much for all your work on this, @zoo868e! At least based on how the jobs ran on this PR, I expect this is going to almost entirely fix the issue (perhaps with the exception of cases where populating the cache itself fails, which should presumably be much less common than at least one of 149 jobs failing for the same reason).

joshlf added a commit that referenced this pull request Sep 4, 2023
The caching introduced in #302 fixes the issue that this override
was meant to address, so it's no longer necessary.
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.

CI step "Set toolchain version" is flaky due to network timeouts
2 participants