Enable sccache for linux-musl-x64 coreclr builds#128050
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the CoreCLR CI pipeline templates so sccache is enabled not only for linux-x64 (glibc) but also for linux-musl-x64, while keeping cache keys isolated between musl and glibc builds.
Changes:
- Expand the sccache enablement condition to include
osSubgroup == '_musl'(still Linux + x64 only). - Add
osSubgroupinto the Azure Pipelines Cache key segment (linuxvslinux_musl) so caches don’t cross-contaminate. - Emit
SCCACHE_CACHE_SIZE=3.5Gas a pipeline variable in the sccache setup step.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| eng/pipelines/coreclr/templates/setup-sccache.yml | Enables sccache for linux x64 glibc and musl, and separates cache keys by ${osGroup}${osSubgroup}; sets SCCACHE cache size. |
| eng/pipelines/coreclr/templates/sccache-stats.yml | Matches the expanded enablement condition so stats are collected for linux x64 glibc and musl legs. |
steveisok
approved these changes
May 11, 2026
Open
3 tasks
Widen the sccache condition from osSubgroup=='' to also include osSubgroup=='_musl'. The sccache NuGet package (0.15.0) is a statically-linked binary that works on both glibc and musl. The cache key now includes osSubgroup to keep musl and glibc caches separate (different system headers/compiler flags produce different object files). For non-musl builds, osSubgroup is empty so the key is unchanged — existing caches remain valid. Also includes the SCCACHE_CACHE_SIZE=3.5G limit from PR dotnet#128048 to prevent unbounded cache growth. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Member
Author
|
/ba-g timeouts in unrelated legs |
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.
Note
This PR was generated with the assistance of GitHub Copilot.
Summary
Extends sccache caching from linux-x64 to also cover linux-musl-x64 coreclr build legs. Based on the linux-x64 results (~9 min/leg gross savings, 97.59% hit rate at steady state), this should provide similar speedups for the musl legs.
Changes
osSubgroup == '_musl'; addosSubgroupto cache key to keep musl/glibc caches separateWhy this works
fileshowingstatic-pie linked. Works on both glibc and musl.runtime-prereqs.projon all Linux CI builds (line 13-14, condition:IsOsPlatform(Linux)).osSubgroupso musl builds getsccache|linux_musl|x64|...vssccache|linux|x64|...for glibc — no cross-contamination.osSubgroupis empty, so the key is unchanged — existing caches remain valid.Also included
SCCACHE_CACHE_SIZE=3.5Glimit (from #128048) to prevent unbounded cache growth.