Skip to content

Commit

Permalink
Parallel compatibility checks
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolayPianikov committed Aug 30, 2024
1 parent 1f810e5 commit d94c290
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions build/CompatibilityCheckTarget.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,20 +56,18 @@ public async Task<IReadOnlyCollection<Package>> RunAsync(CancellationToken cance
"net20"
];

foreach (var framework in frameworks.Reverse())
{
await CompatibilityCheckAsync(generatorPackage.Path, framework, cancellationToken);
}

var packages = new List<Package> { generatorPackage };

var tasks = new List<Task>();
tasks.AddRange(frameworks.Reverse().Select(framework => CompatibilityCheckAsync(generatorPackage.Path, framework, cancellationToken)));

// Libraries
var packages = new List<Package> { generatorPackage };
foreach (var library in libraries)
{
await CompatibilityCheckAsync(generatorPackage.Path, library, cancellationToken);
tasks.Add(CompatibilityCheckAsync(generatorPackage.Path, library, cancellationToken));
packages.Add(library.Package);
}

await Task.WhenAll(tasks);
return packages;
}

Expand Down

0 comments on commit d94c290

Please sign in to comment.