-
-
Notifications
You must be signed in to change notification settings - Fork 860
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
Add cache for Nuget packages #1439
Add cache for Nuget packages #1439
Conversation
@antonfirsov current summary restoring time for all projects is about ~1 minutes. With cache (next time, when you will build with enabled cache action) summary restore time should be ~5-10 seconds. |
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.
haven't captured all the files that could end up changing the packages
.github/workflows/build-and-test.yml
Outdated
id: nuget-cache | ||
with: | ||
path: ~/.nuget | ||
key: ${{ runner.os }}-nuget-${{ hashFiles('**/ImageSharp*.csproj') }} |
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.
you will need to add the *.props
/*.targets
too as we define most of our package versions in those shared locations i.e.
ImageSharp/Directory.Build.targets
Lines 19 to 37 in 0e0dc2a
<ItemGroup> | |
<!--Global Dependencies--> | |
<PackageReference Update="Microsoft.Net.Compilers.Toolset" PrivateAssets="All" Version="3.7.0" /> | |
<PackageReference Update="Microsoft.NETFramework.ReferenceAssemblies" PrivateAssets="All" Version="1.0.0" /> | |
<PackageReference Update="StyleCop.Analyzers" PrivateAssets="All" Version="1.1.118" /> | |
<!--Src Dependencies--> | |
<PackageReference Update="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/> | |
<PackageReference Update="MinVer" PrivateAssets="All" Version="2.3.1" /> | |
<PackageReference Update="System.Buffers" Version="4.5.1" /> | |
<PackageReference Update="System.IO.Compression" Version="4.3.0" /> | |
<PackageReference Update="System.IO.UnmanagedMemoryStream" Version="4.3.0" /> | |
<PackageReference Update="System.Numerics.Vectors" Version="4.5.0" /> | |
<PackageReference Update="System.Memory" Version="4.5.4" /> | |
<PackageReference Update="System.Runtime.CompilerServices.Unsafe" Version="4.7.1" /> | |
<PackageReference Update="System.Threading.Tasks.Parallel" Version="4.3.0" /> | |
<PackageReference Update="System.ValueTuple" Version="4.5.0" /> | |
</ItemGroup> |
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.
Thanks. Added with next commit.
Codecov Report
@@ Coverage Diff @@
## master #1439 +/- ##
=======================================
Coverage 83.68% 83.68%
=======================================
Files 734 734
Lines 31990 31990
Branches 3605 3605
=======================================
Hits 26772 26772
Misses 4505 4505
Partials 713 713
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
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.
Ok. Looks like everything is covered here now. Let's give it a whirl!
Add cache for Nuget packages
Prerequisites
Description