Skip to content

Enable Roslyn compiler caching on Windows - #135248

Merged
agocke merged 3 commits into
dotnet:mainfrom
agocke:windows-roslyn-cache
Oct 6, 2026
Merged

agocke merged 3 commits into
dotnet:mainfrom
agocke:windows-roslyn-cache

Conversation

@agocke

@agocke agocke commented Oct 5, 2026

Copy link
Copy Markdown
Member

Summary

  • Consolidate Roslyn and sccache setup and statistics into shared build-cache templates.
  • Enable Roslyn compiler output caching for Windows build legs while keeping sccache Unix-only.
  • Add windows_x64 to the rolling Debug CoreCLR_AllSubsets cache seed and cache the separate Windows x86 leg.

Measurements

The controlled validation from #133748 measured libs.tests at 4m53s with the Roslyn cache versus 6m32s without it, a 25.25% reduction. Recent rolling builds reused 21,130 compiler outputs with 352 new stores (98.4% hit rate) across 23 cache-enabled Unix jobs. Windows-specific hit rates will be measurable after the first rolling build seeds the new entries.

Validation

  • Parsed the modified Azure Pipelines YAML and verified all template references.
  • Exercised the Windows PowerShell cache setup and statistics paths locally.
  • Verified the existing Unix cache behavior and sccache platform condition remain unchanged.

Note

This pull request description was generated with GitHub Copilot.

agocke added 2 commits October 5, 2026 14:29
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: ed7d94f-dc25-46f7-955a-ee0f685b10e0
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: ed7d94f-dc25-46f7-955a-ee0f685b10e0
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 6 pipeline(s).
10 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@agocke
agocke requested review from sbomer and a balanced review from Copilot October 5, 2026 21:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The consolidation preserves existing Unix conditions while coherently enabling isolated Windows Roslyn caching and statistics.

Review effort: Balanced
Findings: None

What changed in this PR

Centralizes compiler-cache setup and enables Roslyn output caching for Windows CI jobs while preserving Unix-only sccache behavior.

Changes:

  • Consolidates cache setup and statistics templates.
  • Enables Windows x64/x86/Arm64 Roslyn caching.
  • Adds Windows cache-seeding jobs.
File Description
eng/​pipelines/​runtime.yml Uses shared cache templates and adds Windows cache seeds.
eng/​pipelines/​global-build.yml Switches to shared cache templates.
eng/​pipelines/​coreclr/​templates/​setup-roslyn-cache.yml Removes superseded Roslyn-only setup.
eng/​pipelines/​coreclr/​templates/​setup-build-caches.yml Adds cross-platform Roslyn cache setup.
eng/​pipelines/​coreclr/​templates/​sccache-stats.yml Removes superseded statistics template.
eng/​pipelines/​coreclr/​templates/​roslyn-cache-stats.yml Removes superseded Roslyn-only statistics.
eng/​pipelines/​coreclr/​templates/​jit-hardware-intrinsics-common.yml Adopts shared cache templates.
eng/​pipelines/​coreclr/​templates/​build-cache-stats.yml Adds consolidated Windows/Unix cache reporting.

@agocke

agocke commented Oct 6, 2026

Copy link
Copy Markdown
Member Author

/ba-g unrelated failures in diagnostics (caching isn't enabled for those runs)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-Infrastructure-coreclr Only use for closed issues

Projects

Status: Done
Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants