Repository navigation
Make analyzers and ILLink trimming opt-in via MSBuild properties - #123292
Conversation
|
@copilot we should still run the full checks on every pr, just not in the inner loop of the product build. |
|
We should also have a leg that triggers the "all configurations build" for libraries. I believe the way to do that nowadays is to pass |
|
Also, maybe we want to add this into the global-build.yml pipeline? I know it's not really a dev innerloop scenario but that pipeline already has these "build the whole repo with a slightly different than default configuration" style jobs |
|
@copilot please move this job into the global-build pipeline |
Added in 1970403. Created a new leg "Libraries_AllConfigurations" that uses
Done in 1970403. Moved all analyzer and linker jobs into global-build.yml and deleted the standalone pipeline. |
- Add RunAnalyzersInBuild property to control analyzer execution - Add RunILLinkInBuild property to control ILLink trimming - Default both to disabled for faster local builds and CI - Projects can still explicitly override via ILLinkTrimAssembly or RunAnalyzers Co-authored-by: agocke <515774+agocke@users.noreply.github.com>
- Create runtime-analyzers-linker.yml pipeline for scheduled runs - Add documentation for RunAnalyzersInBuild and RunILLinkInBuild properties - Pipeline runs on main branch scheduled at 9:00 and 21:00 UTC Co-authored-by: agocke <515774+agocke@users.noreply.github.com>
- Changed pr trigger from 'none' to run on main and release branches - Pipeline now runs on PRs to ensure code quality checks - Updated documentation to reflect PR runs - Keeps inner loop builds fast by using opt-in properties Co-authored-by: agocke <515774+agocke@users.noreply.github.com>
- Move analyzer and linker jobs from standalone pipeline to global-build.yml - Add "all configurations" library build leg with -restore -build -pack - Delete runtime-analyzers-linker.yml standalone pipeline - Update documentation to reference global-build pipeline - Add path-based conditions for better PR filtering Co-authored-by: agocke <515774+agocke@users.noreply.github.com>
- Combine all-configurations build with analyzer and linker checks - Run on linux_x64_dev_innerloop, linux_x64, windows_x64, osx_arm64 - Remove separate platform-specific analyzer jobs and Mono job - Build args: -subset libs -restore -build -pack with /p:RunAnalyzersInBuild=true /p:RunILLinkInBuild=true
1970403 to
1ab89f4
Compare
- Libraries_AllConfigurations supersedes Libraries_WithPackages - AllConfigurations includes -restore -build -pack (more comprehensive than just -pack) - Runs on multiple platforms including linux_x64_dev_innerloop - Includes analyzer and linker checks - Addresses feedback to combine the jobs Co-authored-by: agocke <515774+agocke@users.noreply.github.com>
|
Draft Pull Request was automatically closed for 30 days of inactivity. Please let us know if you'd like to reopen it. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: f1dc4389-ac26-41b4-aec5-7cfc073a6b0e
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: f1dc4389-ac26-41b4-aec5-7cfc073a6b0e
|
This PR appears to be effective. Windows numbers for example: • Windows x64 CoreCLR: 53.6m → 41.3m (−23%) |
|
@jkoritzinsky for re-review |
|
As we have moved build error diagnostics for We need to have at least one build that builds everything in the product (all configurations build) with analyzers enabled in CI to ensure we don't have a bunch of avoidable breaks in |
|
Isn't that what the new job is supposed to do? |
|
I missed that we still have the all-configurations leg. That combined with the new tools leg helps, but we still don't get validation of CoreLib on all OS builds. I think we need to also have a job (could be part of one of the existing ones) that builds CoreLib for all OSes to make sure we don't have an easy category of breaks that only show up in CI. |
Fold CoreLib into the existing Linux, Windows, and macOS analyzer matrix and leave the Linux-only job focused on tools. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Fixed -- the libraries legs now also include the coreclr build so we are getting full OS coverage |
Description
Analyzers and ILLink trimming now run only when explicitly enabled, reducing local build times and inner loop overhead. Comprehensive jobs in the global-build pipeline ensure code quality checks run on every PR.
Changes
MSBuild properties: Added
RunAnalyzersInBuildandRunILLinkInBuildproperties (default: disabled)eng/Analyzers.targets: DefaultsRunAnalyzers=falseunlessRunAnalyzersInBuild=truesrc/libraries/Directory.Build.targets: RequiresRunILLinkInBuild=truefor trimming in NetCoreApp source projectsRunAnalyzersorILLinkTrimAssemblystill respectedCI pipeline: Integrated into
eng/pipelines/global-build.ymlLibraries_AnalyzersLinkerjob with-restore -build -packplus analyzer/linker checks covering platforms: linux_x64_dev_innerloop, windows_x64, osx_arm64CoreClr_Tools_AnalyzersLinkerjob for CoreLib and tools with analyzer/linker checks on linux_x64_dev_innerloopLibraries_WithPackagesjob (superseded by new analyzer/linker jobs)Documentation: Added build examples in
docs/workflow/building/libraries/README.mdUsage
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.