|
1 | 1 | using System;
|
2 | 2 | using System.Collections.Generic;
|
3 |
| -using System.ComponentModel; |
4 |
| -using System.IO; |
5 | 3 | using System.Linq;
|
6 | 4 | using System.Text;
|
7 | 5 | using BenchmarkDotNet.Characteristics;
|
8 | 6 | using BenchmarkDotNet.Extensions;
|
9 |
| -using BenchmarkDotNet.Helpers; |
10 | 7 | using BenchmarkDotNet.Jobs;
|
11 | 8 | using BenchmarkDotNet.Loggers;
|
12 | 9 | using BenchmarkDotNet.Portability;
|
@@ -34,9 +31,6 @@ public class DotNetCliCommand
|
34 | 31 |
|
35 | 32 | [PublicAPI] public bool LogOutput { get; }
|
36 | 33 |
|
37 |
| - [Obsolete("Building with no dependencies is no longer supported.", false), EditorBrowsable(EditorBrowsableState.Never)] |
38 |
| - public bool RetryFailedBuildWithNoDeps => false; |
39 |
| - |
40 | 34 | public DotNetCliCommand(string cliPath, string arguments, GenerateResult generateResult, ILogger logger,
|
41 | 35 | BuildPartition buildPartition, IReadOnlyList<EnvironmentVariable> environmentVariables, TimeSpan timeout, bool logOutput = false)
|
42 | 36 | {
|
@@ -77,11 +71,11 @@ public BuildResult RestoreThenBuild()
|
77 | 71 |
|
78 | 72 | // On our CI, Integration tests take too much time, because each benchmark run rebuilds BenchmarkDotNet itself.
|
79 | 73 | // To reduce the total duration of the CI workflows, we build all the projects without dependencies
|
80 |
| - if (XUnitHelper.ForceNoDependenciesForCore) |
| 74 | + if (BuildPartition.ForcedNoDependenciesForIntegrationTests) |
81 | 75 | {
|
82 |
| -#pragma warning disable CS0618 // Type or member is obsolete |
83 |
| - return BuildNoRestoreNoDependencies().ToBuildResult(GenerateResult); |
84 |
| -#pragma warning restore CS0618 // Type or member is obsolete |
| 76 | + return DotNetCliCommandExecutor.Execute(WithArguments( |
| 77 | + GetBuildCommand(GenerateResult.ArtifactsPaths, BuildPartition, $"{Arguments} --no-restore --no-dependencies", "build-no-restore-no-deps", excludeOutput: true))) |
| 78 | + .ToBuildResult(GenerateResult); |
85 | 79 | }
|
86 | 80 |
|
87 | 81 | // We no longer retry with --no-dependencies, because it fails with --output set at the same time,
|
@@ -138,11 +132,6 @@ public DotNetCliCommandResult BuildNoRestore()
|
138 | 132 | => DotNetCliCommandExecutor.Execute(WithArguments(
|
139 | 133 | GetBuildCommand(GenerateResult.ArtifactsPaths, BuildPartition, $"{Arguments} --no-restore", "build-no-restore")));
|
140 | 134 |
|
141 |
| - [Obsolete("Building with no dependencies is no longer supported, and will probably fail.", false), EditorBrowsable(EditorBrowsableState.Never)] |
142 |
| - public DotNetCliCommandResult BuildNoRestoreNoDependencies() |
143 |
| - => DotNetCliCommandExecutor.Execute(WithArguments( |
144 |
| - GetBuildCommand(GenerateResult.ArtifactsPaths, BuildPartition, $"{Arguments} --no-restore --no-dependencies", "build-no-restore-no-deps", excludeOutput: true))); |
145 |
| - |
146 | 135 | public DotNetCliCommandResult Publish()
|
147 | 136 | => DotNetCliCommandExecutor.Execute(WithArguments(
|
148 | 137 | GetPublishCommand(GenerateResult.ArtifactsPaths, BuildPartition, Arguments, "publish")));
|
|
0 commit comments