Skip to content

Parallelize the steps of the create_nuget CI job - #1532

Merged
meziantou merged 5 commits into
mainfrom
feature/parallelize-create-nuget-ci-f77522
Sep 18, 2026
Merged

meziantou merged 5 commits into
mainfrom
feature/parallelize-create-nuget-ci-f77522

Conversation

@meziantou

@meziantou meziantou commented Sep 18, 2026 •

Copy link
Copy Markdown
Owner

What changed

  • Meziantou.Analyzer.Annotations is packed in a background step, using the parallel steps feature of GitHub Actions. It does not depend on the analyzer, so it runs while ListDotNetTypes and the pack of Meziantou.Analyzer.Pack run sequentially.
  • A wait-all: true step waits for the background step before the artifacts are uploaded.
  • The dotnet build step of Meziantou.Analyzer.Pack is removed, as dotnet pack builds the projects. --no-build is removed accordingly.
  • The analyzers are skipped when packing Meziantou.Analyzer.Pack (/p:RunAnalyzers=false). The binlog shows the pack step (~2m13s) is spent in Csc (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.
  • A new build_with_analyzers job builds Meziantou.Analyzer.Pack (all Roslyn versions) with the analyzers, in parallel of the other jobs, as dotnet test in build_and_test does not run them. deploy depends on it.

Why

Speed up the create_nuget job.

Notes for reviewers

  • Meziantou.Analyzer.Pack.build.binlog is no longer produced: the build is now part of Meziantou.Analyzer.Pack.pack.binlog (still uploaded by the **/*.binlog pattern).
  • The documentation examples found for wait-all don't show its value; true is assumed. This CI run validates the syntax.

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
meziantou enabled auto-merge (squash) September 18, 2026 22:16
@meziantou
meziantou merged commit 4508200 into main Sep 18, 2026
14 checks passed
@meziantou
meziantou deleted the feature/parallelize-create-nuget-ci-f77522 branch September 18, 2026 22:18
This was referenced Sep 18, 2026
This was referenced Sep 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant