-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't overwrite binary logs #66559
Merged
Merged
Don't overwrite binary logs #66559
Changes from 6 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
07f21b7
Don't overwrite binary logs
jaredpar 43b4571
enable trace for diff issue
jaredpar 9a6689e
Work around NuGet static graph restore bug
jaredpar 59a537a
limit to CI only
jaredpar 0fe1e9f
copy / paste bug
jaredpar 8966289
it's your fault for letting me code
jaredpar b6887e9
why why why
jaredpar 7991567
yml owns me
jaredpar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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 |
---|---|---|
|
@@ -34,6 +34,7 @@ param ( | |
[switch]$bootstrap, | ||
[string]$bootstrapConfiguration = "Release", | ||
[switch][Alias('bl')]$binaryLog, | ||
[string]$binaryLogName = "", | ||
[switch]$buildServerLog, | ||
[switch]$ci, | ||
[switch]$collectDumps, | ||
|
@@ -79,6 +80,7 @@ function Print-Usage() { | |
Write-Host " -verbosity <value> Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic]" | ||
Write-Host " -deployExtensions Deploy built vsixes (short: -d)" | ||
Write-Host " -binaryLog Create MSBuild binary log (short: -bl)" | ||
Write-Host " -binaryLogName Name of the binary log (default Build.binlog)" | ||
Write-Host " -buildServerLog Create Roslyn build server log" | ||
Write-Host "" | ||
Write-Host "Actions:" | ||
|
@@ -166,13 +168,21 @@ function Process-Arguments() { | |
$script:applyOptimizationData = $false | ||
} | ||
|
||
if ($binaryLogName -ne "") { | ||
$script:binaryLog = $true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Initially I required specifying both options so |
||
} | ||
|
||
if ($ci) { | ||
$script:binaryLog = $true | ||
if ($bootstrap) { | ||
$script:buildServerLog = $true | ||
} | ||
} | ||
|
||
if ($binaryLog -and ($binaryLogName -eq "")) { | ||
$binaryLogName = "Build.binlog" | ||
} | ||
|
||
$anyUnit = $testDesktop -or $testCoreClr | ||
if ($anyUnit -and $testVsi) { | ||
Write-Host "Cannot combine unit and VSI testing" | ||
|
@@ -213,7 +223,14 @@ function BuildSolution() { | |
|
||
Write-Host "$($solution):" | ||
|
||
$bl = if ($binaryLog) { "/bl:" + (Join-Path $LogDir "Build.binlog") } else { "" } | ||
$bl = "" | ||
if ($binaryLog) { | ||
$binaryLogPath = Join-Path $LogDir $binaryLogName | ||
$bl = "/bl:" + $binaryLogPath | ||
if ($ci -and (Test-Path $binaryLogPath)) { | ||
Write-LogIssue -Type "warning" -Message "Overwriting binary log file $($binaryLogPath)" | ||
} | ||
} | ||
|
||
if ($buildServerLog) { | ||
${env:ROSLYNCOMMANDLINELOGFILE} = Join-Path $LogDir "Build.Server.log" | ||
|
@@ -240,6 +257,11 @@ function BuildSolution() { | |
$generateDocumentationFile = if ($skipDocumentation) { "/p:GenerateDocumentationFile=false" } else { "" } | ||
$roslynUseHardLinks = if ($ci) { "/p:ROSLYNUSEHARDLINKS=true" } else { "" } | ||
|
||
# Temporarily disable RestoreUseStaticGraphEvaluation to work around this NuGet issue | ||
# in our CI builds | ||
# https://github.com/NuGet/Home/issues/12373 | ||
$restoreUseStaticGraphEvaluation = if ($ci) { $false } else { $true } | ||
|
||
try { | ||
MSBuild $toolsetBuildProj ` | ||
$bl ` | ||
|
@@ -259,7 +281,7 @@ function BuildSolution() { | |
/p:TreatWarningsAsErrors=$warnAsError ` | ||
/p:EnableNgenOptimization=$applyOptimizationData ` | ||
/p:IbcOptimizationDataDir=$ibcDir ` | ||
/p:RestoreUseStaticGraphEvaluation=true ` | ||
/p:RestoreUseStaticGraphEvaluation=$restoreUseStaticGraphEvaluation ` | ||
/p:VisualStudioIbcDrop=$ibcDropName ` | ||
/p:VisualStudioDropAccessToken=$officialVisualStudioDropAccessToken ` | ||
$suppressExtensionDeployment ` | ||
|
@@ -734,7 +756,7 @@ try { | |
catch | ||
{ | ||
if ($ci) { | ||
echo "##vso[task.logissue type=error](NETCORE_ENGINEERING_TELEMETRY=Build) Build failed" | ||
Write-LogIssue -Type "error" -Message "(NETCORE_ENGINEERING_TELEMETRY=Build) Build failed" | ||
} | ||
throw $_ | ||
} | ||
|
@@ -752,7 +774,7 @@ try { | |
catch | ||
{ | ||
if ($ci) { | ||
echo "##vso[task.logissue type=error](NETCORE_ENGINEERING_TELEMETRY=Test) Tests failed" | ||
Write-LogIssue -Type "error" -Message "(NETCORE_ENGINEERING_TELEMETRY=Test) Tests failed" | ||
} | ||
throw $_ | ||
} | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well that's why the job hasn't started yet ... invalid YML