-
Notifications
You must be signed in to change notification settings - Fork 227
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update build scripts to support netcoreapp1.1
- Loading branch information
Showing
12 changed files
with
105 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
powershell build\build.ps1 -Script build\build.cake -Target Pack | ||
pause |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
powershell build\build.ps1 -Script build\build.cake -Target Build-Perf | ||
|
||
output\perf\Disruptor.PerfTests.exe Disruptor.PerfTests.Raw.OneToOneRawBatchThroughputTest | ||
output\perf\Disruptor.PerfTests.exe Disruptor.PerfTests.Raw.OneToOneRawThroughputTest | ||
output\perf\Disruptor.PerfTests.exe Disruptor.PerfTests.Sequenced.OneToOneSequencedBatchThroughputTest | ||
output\perf\Disruptor.PerfTests.exe Disruptor.PerfTests.Sequenced.OneToOneSequencedLongArrayThroughputTest | ||
output\perf\Disruptor.PerfTests.exe Disruptor.PerfTests.Sequenced.OneToOneSequencedPollerThroughputTest | ||
output\perf\Disruptor.PerfTests.exe Disruptor.PerfTests.Sequenced.OneToOneSequencedThroughputTest | ||
output\perf\Disruptor.PerfTests.exe Disruptor.PerfTests.Translator.OneToOneTranslatorThroughputTest | ||
output\perf\Disruptor.PerfTests.exe Disruptor.PerfTests.Sequenced.OneToThreeDiamondSequencedThroughputTest | ||
output\perf\Disruptor.PerfTests.exe Disruptor.PerfTests.Sequenced.OneToThreePipelineSequencedThroughputTest | ||
output\perf\Disruptor.PerfTests.exe Disruptor.PerfTests.WorkHandler.OneToThreeReleasingWorkerPoolThroughputTest | ||
output\perf\Disruptor.PerfTests.exe Disruptor.PerfTests.Sequenced.OneToThreeSequencedThroughputTest | ||
output\perf\Disruptor.PerfTests.exe Disruptor.PerfTests.WorkHandler.OneToThreeWorkerPoolThroughputTest | ||
output\perf\Disruptor.PerfTests.exe Disruptor.PerfTests.Sequenced.ThreeToOneSequencedBatchThroughputTest | ||
output\perf\Disruptor.PerfTests.exe Disruptor.PerfTests.Sequenced.ThreeToOneSequencedThroughputTest | ||
output\perf\Disruptor.PerfTests.exe Disruptor.PerfTests.Sequenced.ThreeToThreeSequencedThroughputTest | ||
output\perf\Disruptor.PerfTests.exe Disruptor.PerfTests.WorkHandler.TwoToTwoWorkProcessorThroughputTest | ||
|
||
pause |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
version: 3.3.4.{build} | ||
version: 3.3.6.{build} | ||
build: off | ||
test_script: | ||
- ps: build\build.ps1 -Script build\build.cake |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,93 +1,91 @@ | ||
#tool "nuget:?package=NUnit.Runners.Net4&version=2.6.4" | ||
#addin "Cake.Json" | ||
|
||
var target = Argument("target", "Default"); | ||
var target = Argument("target", "Run-Tests"); | ||
var configuration = Argument("configuration", "Release"); | ||
|
||
var paths = new | ||
{ | ||
output = MakeAbsolute(Directory("./../output")), | ||
nugetOutput = MakeAbsolute(Directory("./../output/nuget")), | ||
solution = MakeAbsolute(File("./../src/Disruptor-net.sln")), | ||
nuspec = MakeAbsolute(File("./Disruptor-net.nuspec")), | ||
assemblyInfo = MakeAbsolute(File("./../src/Version.cs")), | ||
versions = MakeAbsolute(File("./../versions.json")) | ||
AssemblyOutput = MakeAbsolute(Directory("../output/assembly")), | ||
TestsOutput = MakeAbsolute(Directory("../output/tests")), | ||
PerfOutput = MakeAbsolute(Directory("../output/perf")), | ||
NugetOutput = MakeAbsolute(Directory("../output/nuget")), | ||
AssemblyProject = MakeAbsolute(File("../src/Disruptor/Disruptor.csproj")), | ||
TestsProject = MakeAbsolute(File("../src/Disruptor.Tests/Disruptor.Tests.csproj")), | ||
PerfProject = MakeAbsolute(File("../src/Disruptor.PerfTests/Disruptor.PerfTests.csproj")), | ||
Nuspec = MakeAbsolute(File("Disruptor-net.nuspec")), | ||
Projects = GetFiles("../src/**/*.csproj").Select(MakeAbsolute), | ||
}; | ||
|
||
Task("Clean") | ||
.Does(() =>{ | ||
CleanDirectory(paths.output); | ||
CleanDirectory(paths.nugetOutput); | ||
} ); | ||
var nugetVersion = XmlPeek(paths.AssemblyProject, "//InformationalVersion/text()"); | ||
var targetFrameworks = XmlPeek(paths.AssemblyProject, "//TargetFrameworks/text()").Split(';'); | ||
|
||
Task("Restore-NuGet-Packages") | ||
.IsDependentOn("Clean") | ||
.Does(() => NuGetRestore(paths.solution)); | ||
.Does(() => | ||
{ | ||
foreach (var project in paths.Projects) | ||
{ | ||
Information("Restoring {0}", project.FullPath); | ||
NuGetRestore(project); | ||
} | ||
}); | ||
|
||
/// Build tasks | ||
Task("Clean-Tests") | ||
.Does(() => CleanDirectory(paths.TestsOutput)); | ||
|
||
Task("Create-AssemblyInfo") | ||
.Does(()=>{ | ||
var versionDetails = DeserializeJsonFromFile<VersionDetails>(paths.versions.FullPath); | ||
CreateAssemblyInfo(paths.assemblyInfo, new AssemblyInfoSettings { | ||
Company = "https://github.com/disruptor-net/Disruptor-net", | ||
Product = "Disruptor", | ||
Copyright = "Copyright © disruptor-net", | ||
Version = versionDetails.AssemblyVersion, | ||
FileVersion = versionDetails.AssemblyVersion, | ||
InformationalVersion = versionDetails.NugetVersion + " (from java commit: " + versionDetails.LastJavaRevisionPortedVersion +")" | ||
}); | ||
Task("Build-Tests") | ||
.IsDependentOn("Clean-Tests") | ||
.IsDependentOn("Restore-NuGet-Packages") | ||
.Does(() => | ||
{ | ||
var settings = new DotNetCoreBuildSettings { Configuration = configuration, OutputDirectory = paths.TestsOutput.FullPath }; | ||
DotNetCoreBuild(paths.TestsProject.FullPath, settings); | ||
}); | ||
|
||
Task("MSBuild") | ||
.Does(() => MSBuild(paths.solution, settings => settings | ||
.SetConfiguration(configuration) | ||
.SetPlatformTarget(PlatformTarget.MSIL) | ||
.WithProperty("OutDir", paths.output.FullPath + "/build"))); | ||
Task("Run-Tests") | ||
.IsDependentOn("Build-Tests") | ||
.Does(() => NUnit(paths.TestsOutput.FullPath + "/*.Tests.dll", new NUnitSettings { Framework = "net-4.6.1", NoResults = true })); | ||
|
||
Task("Clean-AssemblyInfo") | ||
.Does(()=>{ | ||
DeleteFile(paths.assemblyInfo); | ||
System.IO.File.Create(paths.assemblyInfo.FullPath); | ||
}); | ||
Task("Clean-Perf") | ||
.Does(() => CleanDirectory(paths.PerfOutput)); | ||
|
||
Task("Build") | ||
Task("Build-Perf") | ||
.IsDependentOn("Clean-Perf") | ||
.IsDependentOn("Restore-NuGet-Packages") | ||
.IsDependentOn("Create-AssemblyInfo") | ||
.IsDependentOn("MSBuild") | ||
.IsDependentOn("Clean-AssemblyInfo"); | ||
|
||
/// Unit test tasks | ||
.Does(() => | ||
{ | ||
var settings = new DotNetCoreBuildSettings { Configuration = configuration, OutputDirectory = paths.TestsOutput.FullPath }; | ||
DotNetCoreBuild(paths.PerfProject.FullPath, settings); | ||
}); | ||
|
||
Task("Run-Unit-Tests") | ||
.IsDependentOn("Build") | ||
.Does(() => NUnit(paths.output.FullPath + "/build/*.Tests.dll", new NUnitSettings { | ||
Framework = "net-4.6.1", | ||
NoResults = true | ||
})); | ||
Task("Clean-Assembly") | ||
.Does(() => CleanDirectory(paths.AssemblyOutput)); | ||
|
||
/// Package tasks | ||
Task("Build-Assembly") | ||
.IsDependentOn("Clean-Assembly") | ||
.IsDependentOn("Restore-NuGet-Packages") | ||
.Does(() => | ||
{ | ||
foreach (var targetFramework in targetFrameworks) | ||
{ | ||
Information("Building {0}", targetFramework); | ||
var settings = new DotNetCoreBuildSettings | ||
{ | ||
Framework = targetFramework, | ||
Configuration = configuration, | ||
OutputDirectory = paths.AssemblyOutput.FullPath + "/" + targetFramework, | ||
}; | ||
DotNetCoreBuild(paths.AssemblyProject.FullPath, settings); | ||
} | ||
}); | ||
|
||
Task("Nuget-Pack") | ||
.IsDependentOn("Run-Unit-Tests") | ||
Task("Pack") | ||
.IsDependentOn("Build-Assembly") | ||
.Does(() => | ||
{ | ||
var versionDetails = DeserializeJsonFromFile<VersionDetails>(paths.versions.FullPath); | ||
NuGetPack(paths.nuspec, new NuGetPackSettings { | ||
Version = versionDetails.NugetVersion, | ||
BasePath = paths.output.FullPath + "/build", | ||
OutputDirectory = paths.nugetOutput | ||
Information("Packing {0}", nugetVersion); | ||
NuGetPack(paths.Nuspec, new NuGetPackSettings | ||
{ | ||
Version = nugetVersion, | ||
BasePath = paths.AssemblyOutput.FullPath, | ||
OutputDirectory = paths.NugetOutput | ||
}); | ||
}); | ||
|
||
Task("Default") | ||
.IsDependentOn("Run-Unit-Tests"); | ||
|
||
RunTarget(target); | ||
|
||
private class VersionDetails | ||
{ | ||
public string LastJavaRevisionPortedVersion { get; set; } | ||
public string AssemblyVersion { get; set; } | ||
public string NugetVersion { get; set; } | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.