зеркало из https://github.com/aspnet/KoreBuild.git
Revert "Build everything with single dotnet build run, skip incremental checks for pack and test"
This reverts commit 3760389907
.
This commit is contained in:
Родитель
5ec21515c4
Коммит
05a0d33997
|
@ -15,7 +15,6 @@ configuration=''
|
|||
*/}
|
||||
|
||||
default configuration = 'Debug'
|
||||
default test_options=' ${E("KOREBUILD_DOTNET_TEST_OPTIONS")}'
|
||||
|
||||
@{
|
||||
var content = File.ReadAllText(projectFile);
|
||||
|
@ -31,7 +30,7 @@ default test_options=' ${E("KOREBUILD_DOTNET_TEST_OPTIONS")}'
|
|||
noParallelTestProjects.UnionWith(NO_PARALLEL_TEST_PROJECTS.Split((char)','));
|
||||
}
|
||||
|
||||
var testArgs = test_options + " --configuration " + configuration;
|
||||
var testArgs = " --configuration " + configuration;
|
||||
if (IsLinux)
|
||||
{
|
||||
testArgs += " -f netcoreapp1.0";
|
||||
|
|
|
@ -16,9 +16,6 @@ default BUILD_DIR='${Path.Combine(TARGET_DIR, "build")}'
|
|||
default TEST_DIR='${Path.Combine(TARGET_DIR, "test")}'
|
||||
default Configuration='${E("Configuration")}'
|
||||
default PACKAGELIST_JSON_FILENAME = 'NuGetPackageVerifier.json'
|
||||
default SRC_PROJECT_GLOB = "src/*/project.json"
|
||||
default TEST_PROJECT_GLOB = "test/*/project.json"
|
||||
default SAMPLES_PROJECT_GLOB = "samples/*/project.json"
|
||||
|
||||
@{
|
||||
if (string.IsNullOrEmpty(E("DOTNET_BUILD_VERSION")))
|
||||
|
@ -98,13 +95,9 @@ default SAMPLES_PROJECT_GLOB = "samples/*/project.json"
|
|||
|
||||
#ci-deep-clean .deep-clean target='clean' if='IsTeamCity'
|
||||
|
||||
#build-compile target='compile'
|
||||
#build-compile target='compile' if='Directory.Exists("src")'
|
||||
@{
|
||||
var projectGlobs = new List<string>();
|
||||
List<string> srcProjects = null;
|
||||
|
||||
if (Directory.Exists("src"))
|
||||
{
|
||||
Directory.CreateDirectory(TARGET_DIR);
|
||||
|
||||
string commitHash = null;
|
||||
|
@ -115,8 +108,8 @@ default SAMPLES_PROJECT_GLOB = "samples/*/project.json"
|
|||
commitHash = File.ReadAllLines(commitHashFile)[0];
|
||||
}
|
||||
|
||||
srcProjects = Files.Include(SRC_PROJECT_GLOB).ToList();
|
||||
srcProjects.ForEach(projectFile =>
|
||||
var projectFiles = Files.Include("src/*/project.json").ToList();
|
||||
projectFiles.ForEach(projectFile =>
|
||||
{
|
||||
if (AddAssemblyInfo)
|
||||
{
|
||||
|
@ -136,26 +129,8 @@ default SAMPLES_PROJECT_GLOB = "samples/*/project.json"
|
|||
File.WriteAllText(buildInfoFile, commitHashAttribute);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
projectGlobs.Add(SRC_PROJECT_GLOB);
|
||||
}
|
||||
if (!BuildSrcOnly && Directory.Exists("test"))
|
||||
{
|
||||
projectGlobs.Add(TEST_PROJECT_GLOB);
|
||||
}
|
||||
if (!BuildSrcOnly && Directory.Exists("samples"))
|
||||
{
|
||||
projectGlobs.Add(SAMPLES_PROJECT_GLOB);
|
||||
}
|
||||
|
||||
DotnetBuild(string.Join(" ", projectGlobs.ToArray()), Configuration, BuildFramework);
|
||||
|
||||
if (srcProjects != null)
|
||||
{
|
||||
srcProjects.ForEach(projectFile =>
|
||||
{
|
||||
DotnetPack(projectFile, BUILD_DIR, Configuration, " --no-build");
|
||||
DotnetPack(projectFile, BUILD_DIR, Configuration);
|
||||
});
|
||||
|
||||
foreach (var nupkg in Files.Include(Path.Combine(BUILD_DIR, "*/" + Configuration + "/*.nupkg")))
|
||||
|
@ -163,6 +138,15 @@ default SAMPLES_PROJECT_GLOB = "samples/*/project.json"
|
|||
File.Copy(nupkg, Path.Combine(BUILD_DIR, Path.GetFileName(nupkg)), true);
|
||||
}
|
||||
}
|
||||
|
||||
#build-test target='compile' if='Directory.Exists("test") && !BuildSrcOnly'
|
||||
@{
|
||||
DotnetBuild("test/*/project.json", Configuration, BuildFramework);
|
||||
}
|
||||
|
||||
#build-samples target='compile' if='Directory.Exists("samples") && !BuildSrcOnly'
|
||||
@{
|
||||
DotnetBuild("samples/*/project.json", Configuration, BuildFramework);
|
||||
}
|
||||
|
||||
#native-compile target='compile' if='!IsLinux && Directory.Exists(Path.Combine(BASE_DIR, "src"))'
|
||||
|
@ -221,13 +205,14 @@ default SAMPLES_PROJECT_GLOB = "samples/*/project.json"
|
|||
|
||||
#xunit-test target='test' if='Directory.Exists("test")'
|
||||
@{
|
||||
var projectFiles = Files.Include(TEST_PROJECT_GLOB);
|
||||
var projectFiles = Files.Include("test/*/project.json");
|
||||
foreach (var projectFile in projectFiles)
|
||||
{
|
||||
DotnetTest(projectFile, Configuration, " --no-build");
|
||||
DotnetTest(projectFile, Configuration);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#make-roslyn-fast
|
||||
ngen-roslyn
|
||||
|
||||
|
@ -400,13 +385,13 @@ macro name='Dotnet' command='string' dotnetDir='string'
|
|||
macro name="DotnetBuild" projectFile='string' configuration='string' framework='string'
|
||||
dotnet-build
|
||||
|
||||
macro name="DotnetPack" projectFile='string' dotnetPackOutputDir='string' configuration='string' pack_options='string'
|
||||
macro name="DotnetPack" projectFile='string' dotnetPackOutputDir='string' configuration='string'
|
||||
dotnet-pack
|
||||
|
||||
macro name="DotnetPublish" projectFile='string' outputFolder='string' framework='string' configuration='string'
|
||||
dotnet-publish
|
||||
|
||||
macro name="DotnetTest" projectFile='string' configuration='string' test_options='string'
|
||||
macro name="DotnetTest" projectFile='string' configuration='string'
|
||||
dotnet-test
|
||||
|
||||
macro name='Npm' npmCommand='string' npmDir='string'
|
||||
|
|
Загрузка…
Ссылка в новой задаче