Add GH Action: Cache #11072

Closed
opened 2026-01-31 02:37:55 +00:00 by claunia · 3 comments
Owner

Originally created by @WSLUser on GitHub (Oct 19, 2020).

Description of the new feature/enhancement

Use GH Action Cache to speed up builds by caching the Nuget dependencies.

Proposed technical implementation details (optional)

Add a yaml config for testing this. https://github.com/actions/cache/blob/main/examples.md#c---nuget was the guidance I received to add it for this project.

Originally created by @WSLUser on GitHub (Oct 19, 2020). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> # Description of the new feature/enhancement <!-- A clear and concise description of what the problem is that the new feature would solve. Describe why and how a user would use this new functionality (if applicable). --> Use GH Action Cache to speed up builds by caching the Nuget dependencies. # Proposed technical implementation details (optional) Add a yaml config for testing this. https://github.com/actions/cache/blob/main/examples.md#c---nuget was the guidance I received to add it for this project. <!-- A clear and concise description of what you want to happen. -->
claunia added the Help WantedIssue-TaskResolution-Won't-FixProduct-MetaArea-Build labels 2026-01-31 02:37:56 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Oct 19, 2020):

Sure, though I doubt this will really result in a noticeable build time improvement, since like 45 seconds is spent restoring packages, and 30 minutes is spent building the code and running the tests

@zadjii-msft commented on GitHub (Oct 19, 2020): Sure, though I doubt this will really result in a noticeable build time improvement, since like 45 seconds is spent restoring packages, and 30 minutes is spent building the code and running the tests
Author
Owner

@WSLUser commented on GitHub (Oct 19, 2020):

Right now still testing how to keep linter happy and have it read correctly.

So it should download the deps to the repo wherever we tell it. The test will be when I submit the PR as I don't have Azure Pipeline setup for my fork. If build speeds don't go down by much we can ignore it. It's also set to trigger on push not pull request as that's what is shown in the example, probably switch that temporarily for test purposes.

@WSLUser commented on GitHub (Oct 19, 2020): Right now still testing how to keep linter happy and have it read correctly. So it should download the deps to the repo wherever we tell it. The test will be when I submit the PR as I don't have Azure Pipeline setup for my fork. If build speeds don't go down by much we can ignore it. It's also set to trigger on push not pull request as that's what is shown in the example, probably switch that temporarily for test purposes.
Author
Owner

@DHowett commented on GitHub (Oct 19, 2020):

Thanks for the suggestion! We evaluated build caching[1] and found it to not amount to a reasonable time savings. Turns out that downloading and extracting the cache archive takes just as long on our build agents as downloading and extracting the original packages. This is no surprise: they're just static files.

If we were caching the output of some slow process (npm comes to mind) or something that is compiled, it would be more worth our while.

Right now, it's not.

[1] Additionally: Using a github caching action in our azure devops pipeline will almost certainly help nothing. What we tested was actual caching in the azure devops pipeline.

@DHowett commented on GitHub (Oct 19, 2020): Thanks for the suggestion! We evaluated build caching[1] and found it to not amount to a reasonable time savings. Turns out that _downloading and extracting the cache archive_ takes just as long on our build agents as _downloading and extracting the original packages_. This is no surprise: they're just static files. If we were caching the output of some slow process (`npm` comes to mind) or something that is compiled, it would be more worth our while. Right now, it's not. [1] _Additionally_: Using a github caching action in our _azure devops pipeline_ will almost certainly help nothing. What we tested was actual caching in the azure devops pipeline.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#11072