Parallelize the steps of the create_nuget CI job

Merged
ME
2mo ago
+22-14

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.