Stop downloading core setup dependencies in every build, when we already have them.
This commit is contained in:
parent
a365414f01
commit
7909c6a3d5
2 changed files with 62 additions and 34 deletions
|
@ -148,27 +148,36 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
var sharedFrameworkVersion = DependencyVersions.SharedFrameworkVersion;
|
var sharedFrameworkVersion = DependencyVersions.SharedFrameworkVersion;
|
||||||
var sharedFrameworkChannel = DependencyVersions.SharedFrameworkChannel;
|
var sharedFrameworkChannel = DependencyVersions.SharedFrameworkChannel;
|
||||||
|
|
||||||
var combinedSharedHostAndFrameworkArchiveFile = c.BuildContext.Get<string>("CombinedFrameworkHostCompressedFile");
|
var combinedSharedHostAndFrameworkArchiveDownloadFile =
|
||||||
|
Path.Combine(Dirs.CoreSetupDownload, "combinedSharedHostAndFrameworkArchive");
|
||||||
|
|
||||||
Mkdirp(Path.GetDirectoryName(combinedSharedHostAndFrameworkArchiveFile));
|
Mkdirp(Path.GetDirectoryName(combinedSharedHostAndFrameworkArchiveDownloadFile));
|
||||||
|
|
||||||
AzurePublisher.DownloadFile(
|
if ( ! File.Exists(combinedSharedHostAndFrameworkArchiveDownloadFile))
|
||||||
AzurePublisher.CalculateArchiveBlob(
|
|
||||||
combinedSharedHostAndFrameworkArchiveFile,
|
|
||||||
sharedFrameworkChannel,
|
|
||||||
sharedFrameworkVersion),
|
|
||||||
combinedSharedHostAndFrameworkArchiveFile).Wait();
|
|
||||||
|
|
||||||
// Unpack the combined archive to shared framework publish directory
|
|
||||||
Rmdir(Dirs.SharedFrameworkPublish);
|
|
||||||
Mkdirp(Dirs.SharedFrameworkPublish);
|
|
||||||
if(CurrentPlatform.IsWindows)
|
|
||||||
{
|
{
|
||||||
ZipFile.ExtractToDirectory(combinedSharedHostAndFrameworkArchiveFile, Dirs.SharedFrameworkPublish);
|
// Needed for computing the blob path
|
||||||
}
|
var combinedSharedHostAndFrameworkArchiveBuildContextFile =
|
||||||
else
|
c.BuildContext.Get<string>("CombinedFrameworkHostCompressedFile");
|
||||||
{
|
|
||||||
Exec("tar", "xf", combinedSharedHostAndFrameworkArchiveFile, "-C", Dirs.SharedFrameworkPublish);
|
AzurePublisher.DownloadFile(
|
||||||
|
AzurePublisher.CalculateArchiveBlob(
|
||||||
|
combinedSharedHostAndFrameworkArchiveBuildContextFile,
|
||||||
|
sharedFrameworkChannel,
|
||||||
|
sharedFrameworkVersion),
|
||||||
|
combinedSharedHostAndFrameworkArchiveDownloadFile).Wait();
|
||||||
|
|
||||||
|
|
||||||
|
// Unpack the combined archive to shared framework publish directory
|
||||||
|
Rmdir(Dirs.SharedFrameworkPublish);
|
||||||
|
Mkdirp(Dirs.SharedFrameworkPublish);
|
||||||
|
if (CurrentPlatform.IsWindows)
|
||||||
|
{
|
||||||
|
ZipFile.ExtractToDirectory(combinedSharedHostAndFrameworkArchiveDownloadFile, Dirs.SharedFrameworkPublish);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Exec("tar", "xf", combinedSharedHostAndFrameworkArchiveDownloadFile, "-C", Dirs.SharedFrameworkPublish);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return c.Success();
|
return c.Success();
|
||||||
|
@ -184,25 +193,42 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
var sharedFrameworkChannel = DependencyVersions.SharedFrameworkChannel;
|
var sharedFrameworkChannel = DependencyVersions.SharedFrameworkChannel;
|
||||||
var sharedHostChannel = DependencyVersions.SharedHostChannel;
|
var sharedHostChannel = DependencyVersions.SharedHostChannel;
|
||||||
|
|
||||||
var sharedFrameworkInstallerFile = c.BuildContext.Get<string>("SharedFrameworkInstallerFile");
|
var sharedFrameworkInstallerDownloadFile = Path.Combine(Dirs.CoreSetupDownload, "sharedFrameworkInstaller");
|
||||||
var sharedHostInstallerFile = c.BuildContext.Get<string>("SharedHostInstallerFile");
|
var sharedHostInstallerDownloadFile = Path.Combine(Dirs.CoreSetupDownload, "sharedHostInstaller");
|
||||||
|
|
||||||
Mkdirp(Path.GetDirectoryName(sharedFrameworkInstallerFile));
|
Mkdirp(Path.GetDirectoryName(sharedFrameworkInstallerDownloadFile));
|
||||||
Mkdirp(Path.GetDirectoryName(sharedHostInstallerFile));
|
Mkdirp(Path.GetDirectoryName(sharedHostInstallerDownloadFile));
|
||||||
|
|
||||||
|
if ( ! File.Exists(sharedFrameworkInstallerDownloadFile))
|
||||||
|
{
|
||||||
|
var sharedFrameworkInstallerDestinationFile = c.BuildContext.Get<string>("SharedFrameworkInstallerFile");
|
||||||
|
Mkdirp(Path.GetDirectoryName(sharedFrameworkInstallerDestinationFile));
|
||||||
|
|
||||||
|
AzurePublisher.DownloadFile(
|
||||||
|
AzurePublisher.CalculateInstallerBlob(
|
||||||
|
sharedFrameworkInstallerDestinationFile,
|
||||||
|
sharedFrameworkChannel,
|
||||||
|
sharedFrameworkVersion),
|
||||||
|
sharedFrameworkInstallerDownloadFile).Wait();
|
||||||
|
|
||||||
AzurePublisher.DownloadFile(
|
File.Copy(sharedFrameworkInstallerDownloadFile, sharedFrameworkInstallerDestinationFile, true);
|
||||||
AzurePublisher.CalculateInstallerBlob(
|
}
|
||||||
sharedFrameworkInstallerFile,
|
|
||||||
sharedFrameworkChannel,
|
if ( ! File.Exists(sharedHostInstallerDownloadFile))
|
||||||
sharedFrameworkVersion),
|
{
|
||||||
sharedFrameworkInstallerFile).Wait();
|
var sharedHostInstallerDestinationFile = c.BuildContext.Get<string>("SharedHostInstallerFile");
|
||||||
|
Mkdirp(Path.GetDirectoryName(sharedHostInstallerDestinationFile));
|
||||||
|
|
||||||
AzurePublisher.DownloadFile(
|
AzurePublisher.DownloadFile(
|
||||||
AzurePublisher.CalculateInstallerBlob(
|
AzurePublisher.CalculateInstallerBlob(
|
||||||
sharedHostInstallerFile,
|
sharedHostInstallerDestinationFile,
|
||||||
sharedHostChannel,
|
sharedHostChannel,
|
||||||
hostVersion),
|
hostVersion),
|
||||||
sharedHostInstallerFile).Wait();
|
sharedHostInstallerDownloadFile).Wait();
|
||||||
|
|
||||||
|
File.Copy(sharedHostInstallerDownloadFile, sharedHostInstallerDestinationFile, true);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
return c.Success();
|
return c.Success();
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,6 +27,8 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
public static readonly string CorehostLocked = Path.Combine(Output, "corehost", "locked");
|
public static readonly string CorehostLocked = Path.Combine(Output, "corehost", "locked");
|
||||||
public static readonly string CorehostLocalPackages = Path.Combine(Output, "corehost");
|
public static readonly string CorehostLocalPackages = Path.Combine(Output, "corehost");
|
||||||
public static readonly string CorehostDummyPackages = Path.Combine(Output, "corehostdummypackages");
|
public static readonly string CorehostDummyPackages = Path.Combine(Output, "corehostdummypackages");
|
||||||
|
|
||||||
|
public static readonly string CoreSetupDownload = Path.Combine(Intermediate, "coreSetupDownload", DependencyVersions.SharedFrameworkVersion);
|
||||||
public static readonly string SharedFrameworkPublish = Path.Combine(Intermediate, "sharedFrameworkPublish");
|
public static readonly string SharedFrameworkPublish = Path.Combine(Intermediate, "sharedFrameworkPublish");
|
||||||
public static readonly string TestOutput = Path.Combine(Output, "tests");
|
public static readonly string TestOutput = Path.Combine(Output, "tests");
|
||||||
public static readonly string TestArtifacts = Path.Combine(TestOutput, "artifacts");
|
public static readonly string TestArtifacts = Path.Combine(TestOutput, "artifacts");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue