Use --disable-parallel during xplat restores.
Works around NuGet parallel restore timeouts becoming build failures when the machine has a slow connection, for example in our Docker Fedora containers.
This commit is contained in:
parent
1dc0c57885
commit
59a6c72be7
5 changed files with 21 additions and 4 deletions
|
@ -1,2 +1,2 @@
|
|||
microsoft.dotnet.buildtools=1.0.26-prerelease-00802-01
|
||||
microsoft.dotnet.buildtools=1.0.26-prerelease-00926-02
|
||||
microsoft.dotnet.buildtools.run=1.0.0-prerelease-00807-04
|
|
@ -68,7 +68,11 @@
|
|||
Inputs="$(DotnetCliBuildDirectory)/dotnet-cli-build.csproj"
|
||||
Outputs="@(RestoreDotnetCliBuildFrameworkOutputs)">
|
||||
|
||||
<Exec Command="$(DotnetStage0) restore3" WorkingDirectory="$(DotnetCliBuildDirectory)"/>
|
||||
<PropertyGroup>
|
||||
<ExtraRestoreArgs Condition="'$(OS)' != 'Windows_NT'">$(ExtraRestoreArgs) --disable-parallel</ExtraRestoreArgs>
|
||||
</PropertyGroup>
|
||||
|
||||
<Exec Command="$(DotnetStage0) restore3 $(ExtraRestoreArgs)" WorkingDirectory="$(DotnetCliBuildDirectory)"/>
|
||||
</Target>
|
||||
|
||||
<Target DependsOnTargets="$(CLITargets)" Name="BuildTheWholeCli"></Target>
|
||||
|
|
|
@ -12,7 +12,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
|
||||
protected override string Args
|
||||
{
|
||||
get { return $"{GetSource()} {GetPackages()} {GetSkipInvalidConfigurations()}"; }
|
||||
get { return $"{GetSource()} {GetPackages()} {GetSkipInvalidConfigurations()} {GetDisableParallel()}"; }
|
||||
}
|
||||
|
||||
public string Source { get; set; }
|
||||
|
@ -50,5 +50,10 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
|
||||
return null;
|
||||
}
|
||||
|
||||
private string GetDisableParallel()
|
||||
{
|
||||
return "--disable-parallel";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
|
||||
protected override string Args
|
||||
{
|
||||
get { return $"{GetVerbosity()} {GetFallbackSource()} {GetPackages()}"; }
|
||||
get { return $"{GetVerbosity()} {GetFallbackSource()} {GetPackages()} {GetDisableParallel()}"; }
|
||||
}
|
||||
|
||||
public string FallbackSource { get; set; }
|
||||
|
@ -50,5 +50,10 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
|
||||
return null;
|
||||
}
|
||||
|
||||
private string GetDisableParallel()
|
||||
{
|
||||
return "--disable-parallel";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -132,6 +132,9 @@ done < "$REPOROOT/branchinfo.txt"
|
|||
[ -z "$DOTNET_INSTALL_DIR" ] && export DOTNET_INSTALL_DIR=$REPOROOT/.dotnet_stage0/$ARCHITECTURE
|
||||
[ -d "$DOTNET_INSTALL_DIR" ] || mkdir -p $DOTNET_INSTALL_DIR
|
||||
|
||||
# During xplat bootstrapping, disable HTTP parallelism to avoid fatal restore timeouts.
|
||||
export __INIT_TOOLS_RESTORE_ARGS="$__INIT_TOOLS_RESTORE_ARGS --disable-parallel"
|
||||
|
||||
DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
|
||||
toolsLocalPath="$REPOROOT/build_tools"
|
||||
bootStrapperPath="$toolsLocalPath/bootstrap.sh"
|
||||
|
|
Loading…
Reference in a new issue