public BuildContext(ICakeContext context) : base(context) { BuildConfiguration = context.Argument("Configuration", "Release"); SkipTests = context.Argument("SkipTests", false); SkipSlowTests = context.Argument("SkipSlowTests", false); RootDirectory = new DirectoryPath(new DirectoryInfo(Directory.GetCurrentDirectory()).Parent.FullName); ArtifactsDirectory = RootDirectory.Combine("artifacts"); ToolsDirectory = RootDirectory.Combine("tools"); DocsDirectory = RootDirectory.Combine("docs"); DocfxDirectory = ToolsDirectory.Combine("docfx"); DocfxExeFile = DocfxDirectory.CombineWithFilePath("docfx.exe"); DocfxJsonFile = DocsDirectory.CombineWithFilePath("docfx.json"); TestOutputDirectory = RootDirectory.Combine("TestResults"); ChangeLogDirectory = RootDirectory.Combine("docs").Combine("changelog"); ChangeLogGenDirectory = RootDirectory.Combine("docs").Combine("_changelog"); SolutionFile = RootDirectory.CombineWithFilePath("BenchmarkDotNet.sln"); UnitTestsProjectFile = RootDirectory.Combine("tests").Combine("BenchmarkDotNet.Tests") .CombineWithFilePath("BenchmarkDotNet.Tests.csproj"); IntegrationTestsProjectFile = RootDirectory.Combine("tests").Combine("BenchmarkDotNet.IntegrationTests") .CombineWithFilePath("BenchmarkDotNet.IntegrationTests.csproj"); TemplatesTestsProjectFile = RootDirectory.Combine("templates") .CombineWithFilePath("BenchmarkDotNet.Templates.csproj"); AllPackableSrcProjects = new FilePathCollection(context.GetFiles(RootDirectory.FullPath + "/src/**/*.csproj") .Where(p => !p.FullPath.Contains("Disassembler"))); MsBuildSettings = new DotNetCoreMSBuildSettings { MaxCpuCount = 1 }; MsBuildSettings.WithProperty("UseSharedCompilation", "false"); }
public BuildContext(ICakeContext context) : base(context) { BuildConfiguration = context.Argument("Configuration", "Release"); SkipTests = context.Argument("SkipTests", false); SkipSlowTests = context.Argument("SkipSlowTests", false); RootDirectory = new DirectoryPath(new DirectoryInfo(Directory.GetCurrentDirectory()).Parent.FullName); ArtifactsDirectory = RootDirectory.Combine("artifacts"); ToolsDirectory = RootDirectory.Combine("tools"); DocsDirectory = RootDirectory.Combine("docs"); DocfxDirectory = ToolsDirectory.Combine("docfx"); DocfxExeFile = DocfxDirectory.CombineWithFilePath("docfx.exe"); DocfxJsonFile = DocsDirectory.CombineWithFilePath("docfx.json"); TestOutputDirectory = RootDirectory.Combine("TestResults"); ChangeLogDirectory = RootDirectory.Combine("docs").Combine("changelog"); ChangeLogGenDirectory = RootDirectory.Combine("docs").Combine("_changelog"); SolutionFile = RootDirectory.CombineWithFilePath("BenchmarkDotNet.sln"); UnitTestsProjectFile = RootDirectory.Combine("tests").Combine("BenchmarkDotNet.Tests") .CombineWithFilePath("BenchmarkDotNet.Tests.csproj"); IntegrationTestsProjectFile = RootDirectory.Combine("tests").Combine("BenchmarkDotNet.IntegrationTests") .CombineWithFilePath("BenchmarkDotNet.IntegrationTests.csproj"); TemplatesTestsProjectFile = RootDirectory.Combine("templates") .CombineWithFilePath("BenchmarkDotNet.Templates.csproj"); AllPackableSrcProjects = new FilePathCollection(context.GetFiles(RootDirectory.FullPath + "/src/**/*.csproj") .Where(p => !p.FullPath.Contains("Disassembler"))); MsBuildSettings = new DotNetCoreMSBuildSettings { MaxCpuCount = 1 }; MsBuildSettings.WithProperty("UseSharedCompilation", "false"); // NativeAOT build requires VS C++ tools to be added to $path via vcvars64.bat // but once we do that, dotnet restore fails with: // "Please specify a valid solution configuration using the Configuration and Platform properties" if (context.IsRunningOnWindows()) { MsBuildSettings.WithProperty("Platform", "Any CPU"); } }