Parallelize the steps of the create_nuget CI job - #1532
Merged
Merged
Conversation
Pack Meziantou.Analyzer.Annotations in a background step while the analyzer is built and packed, as it does not depend on the analyzer. Remove the explicit build step as dotnet pack builds the projects.
The binlog of the create_nuget job shows that the pack is spent compiling the 10 analyzer and code fixer projects, and the analyzers account for about 70% of the CPU time of the compiler. The build_and_test job already runs them on the same projects.
dotnet test does not run the analyzers, and create_nuget now skips them, so a dedicated job builds the analyzer and code fixer projects of every Roslyn version with the analyzers, in parallel of the other jobs.
meziantou.validate-nuget-package accepts several packages.
…yzers Meziantou.Analyzer.Annotations is now built with the analyzers in build_with_analyzers, in parallel of Meziantou.Analyzer.Pack, and create_nuget skips the analyzers for both packages.
meziantou
enabled auto-merge (squash)
September 18, 2026 22:16
This was referenced Sep 18, 2026
Closed
This was referenced Sep 24, 2026
Open
Open
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.
What changed
Meziantou.Analyzer.Annotationsis packed in abackgroundstep, using the parallel steps feature of GitHub Actions. It does not depend on the analyzer, so it runs whileListDotNetTypesand the pack ofMeziantou.Analyzer.Packrun sequentially.wait-all: truestep waits for the background step before the artifacts are uploaded.dotnet buildstep ofMeziantou.Analyzer.Packis removed, asdotnet packbuilds the projects.--no-buildis removed accordingly.Meziantou.Analyzer.Pack(/p:RunAnalyzers=false). The binlog shows the pack step (~2m13s) is spent inCsc(303s of cumulative compile time for the 10 analyzer/code fixer projects), and locally the analyzers account for ~70% of the compiler CPU time (17-18s vs 5-6s of CPU per project). Source generators (Meziantou.Polyfill) still run.build_with_analyzersjob buildsMeziantou.Analyzer.Pack(all Roslyn versions) with the analyzers, in parallel of the other jobs, asdotnet testinbuild_and_testdoes not run them.deploydepends on it.Why
Speed up the
create_nugetjob.Notes for reviewers
Meziantou.Analyzer.Pack.build.binlogis no longer produced: the build is now part ofMeziantou.Analyzer.Pack.pack.binlog(still uploaded by the**/*.binlogpattern).wait-alldon't show its value;trueis assumed. This CI run validates the syntax.