Speed up CI with NuGet cache + solution-wide build#317
Merged
erikdarlingdata merged 1 commit intodevfrom May 9, 2026
Merged
Conversation
- setup-dotnet@v5 with cache: true persists ~/.nuget/packages between runs, keyed on **/*.csproj. Cold restore (~90s) becomes a tar extract on cache hit. - Replace five sequential dotnet restore + five sequential dotnet build invocations with one each against PlanViewer.sln. MSBuild builds the dependency graph in parallel internally, and we save four MSBuild startup cycles. - Tests still build via the solution build, then run with --no-build. PlanViewer.Ssms and PlanViewer.Ssms.Installer are intentionally not in PlanViewer.sln, so they remain excluded from CI as before. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
3 tasks
erikdarlingdata
added a commit
that referenced
this pull request
May 9, 2026
Linux runners are ~2x faster than windows-latest on GitHub-hosted. None of the projects in PlanViewer.sln are Windows-only: - PlanViewer.Core, .App, .Cli are net8.0 cross-platform - PlanViewer.Web is Blazor WASM, builds on Linux with wasm-tools - PlanViewer.Core.Tests is xunit on net8.0 - PlanViewer.App already references SkiaSharp.NativeAssets.Linux PlanViewer.Ssms (legacy net472 + VSSDK) is not in the solution and is not built in CI; it stays Windows-only via its own workflow if one exists. If anything fails on Linux that's not flaggable as a small fix, revert this PR and we keep the cache + solution-build wins from #317. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
Two changes to
.github/workflows/ci.yml:NuGet cache via setup-dotnet:
cache: truewithcache-dependency-path: '**/*.csproj'persists~/.nuget/packagesacross runs. Cold restore (~90s onwindows-latest) becomes a tar extract on cache hit. Cache invalidates whenever any.csprojchanges.Solution-wide build: replaced five sequential
dotnet restore+ five sequentialdotnet buildinvocations with one each againstPlanViewer.sln. MSBuild builds the dependency graph in parallel internally, and we save four MSBuild startup cycles.PlanViewer.SsmsandPlanViewer.Ssms.Installerare intentionally excluded fromPlanViewer.sln, so they remain out of CI as before.Expected impact
PS CI was ~7 min cold. Estimate after merge:
Test plan
Followups
@erikdarlingdata previously called out path filters and
ubuntu-latestmigration as further wins. Both are out of scope here — this PR is the low-risk pair.🤖 Generated with Claude Code