Skip to content

Commit b60e14a

Browse files
authored
Seed Debug Roslyn compiler caches from rolling builds (#135130)
## Summary - Add rolling-only Debug `CoreCLR_AllSubsets` builds for Linux x64, Linux musl x64, and macOS arm64, matching the corresponding PR build arguments. - Separate Debug and Release Roslyn cache entries so both rolling configurations can seed immutable caches independently. Existing v1 entries remain a restore fallback. ## Measurements The earlier Roslyn cache validation in #133748 measured `libs.tests` at 4m53s with the cache versus 6m32s without it (25.25% faster). Debug-specific hit rates cannot be measured until the first rolling Debug build seeds its cache. > [!NOTE] > This pull request description was generated with GitHub Copilot. Copilot-Session: 6b47078d-4fe1-4db0-93fd-264f9a651be7
1 parent b3a05c6 commit b60e14a

2 files changed

Lines changed: 25 additions & 4 deletions

File tree

‎eng/pipelines/coreclr/templates/setup-roslyn-cache.yml‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,18 @@ steps:
99
# request itself or its target branch. This lets rolling builds seed the
1010
# cache without allowing pull requests to modify caches used by main.
1111
#
12-
# The managed configuration is intentionally excluded. Roslyn's
13-
# deterministic key includes the compilation options, and some pipeline
14-
# legs override the matrix configuration in their build arguments.
12+
# Keep Debug and Release entries separate so rolling builds can seed both
13+
# configurations without competing for the same immutable cache key.
14+
# Roslyn's own deterministic key accounts for legs that override the
15+
# matrix configuration in their build arguments.
1516
- task: Cache@2
1617
displayName: Roslyn compiler cache
1718
continueOnError: true
1819
inputs:
19-
key: roslyn | v1 | ${{ parameters.osGroup }}${{ parameters.osSubgroup }} | ${{ parameters.archType }} | ${{ parameters.nameSuffix }} | "$(Build.BuildId)"
20+
key: roslyn | v2 | ${{ parameters.osGroup }}${{ parameters.osSubgroup }} | ${{ parameters.archType }} | ${{ parameters.nameSuffix }} | "$(buildConfigUpper)" | "$(Build.BuildId)"
2021
path: $(Pipeline.Workspace)/.roslyn-cache
2122
restoreKeys: |
23+
roslyn | v2 | ${{ parameters.osGroup }}${{ parameters.osSubgroup }} | ${{ parameters.archType }} | ${{ parameters.nameSuffix }} | "$(buildConfigUpper)"
2224
roslyn | v1 | ${{ parameters.osGroup }}${{ parameters.osSubgroup }} | ${{ parameters.archType }} | ${{ parameters.nameSuffix }}
2325
2426
- script: |

‎eng/pipelines/runtime.yml‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,25 @@ extends:
351351
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true),
352352
eq(variables['isRollingBuild'], true))
353353
354+
# Seed the Debug compiler cache used by the CoreCLR_AllSubsets PR builds.
355+
- ${{ if eq(variables.isRollingBuild, true) }}:
356+
- template: /eng/pipelines/common/platform-matrix.yml
357+
parameters:
358+
jobTemplate: /eng/pipelines/common/global-build-job.yml
359+
buildConfig: debug
360+
platforms:
361+
- linux_x64
362+
- linux_musl_x64
363+
- osx_arm64
364+
jobParameters:
365+
nameSuffix: CoreCLR_AllSubsets
366+
buildArgs: -s clr+libs+libs.tests+host+packs -rc Release -c $(_BuildConfig) /p:ArchiveTests=true
367+
timeoutInMinutes: 180
368+
preBuildSteps:
369+
- template: /eng/pipelines/coreclr/templates/setup-sccache.yml
370+
postBuildSteps:
371+
- template: /eng/pipelines/coreclr/templates/sccache-stats.yml
372+
354373
- template: /eng/pipelines/common/platform-matrix.yml
355374
parameters:
356375
jobTemplate: /eng/pipelines/common/global-build-job.yml

0 commit comments

Comments
 (0)