[Repo Assist] [Eng] Add NuGet and npm package caching to CI workflow#4525
Draft
[Repo Assist] [Eng] Add NuGet and npm package caching to CI workflow#4525
Conversation
Add cache: true + cache-dependency-path to all setup-dotnet steps to cache ~/.nuget/packages across job runs. Add cache: npm to all setup-node steps to cache the npm download cache. This eliminates redundant package downloads on every CI run. The NuGet cache key is keyed on the hash of all .fsproj files, so it invalidates automatically when dependencies change. Closes #4486 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…-de479ba7cc732133
Collaborator
Author
Note on NuGet caching correctnessThe For correct caching, the intended setup is:
Reference: https://www.damirscorner.com/blog/posts/20240726-CachingNuGetPackagesInGitHubActions.html This also has the benefit of reproducible builds beyond just caching. Worth considering whether we want to adopt lock files across the repo before merging this. |
93 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add cache: true + cache-dependency-path to all setup-dotnet steps to
cache ~/.nuget/packages across job runs. Add cache: npm to all
setup-node steps to cache the npm download cache.
This eliminates redundant package downloads on every CI run. The NuGet
cache key is keyed on the hash of all .fsproj files, so it invalidates
automatically when dependencies change.
Closes #4486
Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com