Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,25 +95,25 @@
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.21254.3">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.21264.2">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>0cfaf935894a4c98ff7445c903f1b4c32990b127</Sha>
<Sha>42de78a825b575a1ddeb73020a01fb8cd9311d09</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.CodeAnalysis" Version="6.0.0-beta.21254.3">
<Dependency Name="Microsoft.DotNet.CodeAnalysis" Version="6.0.0-beta.21264.2">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>0cfaf935894a4c98ff7445c903f1b4c32990b127</Sha>
<Sha>42de78a825b575a1ddeb73020a01fb8cd9311d09</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="6.0.0-beta.21254.3">
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="6.0.0-beta.21264.2">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>0cfaf935894a4c98ff7445c903f1b4c32990b127</Sha>
<Sha>42de78a825b575a1ddeb73020a01fb8cd9311d09</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.ApiCompat" Version="6.0.0-beta.21254.3">
<Dependency Name="Microsoft.DotNet.ApiCompat" Version="6.0.0-beta.21264.2">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>0cfaf935894a4c98ff7445c903f1b4c32990b127</Sha>
<Sha>42de78a825b575a1ddeb73020a01fb8cd9311d09</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.GenAPI" Version="6.0.0-beta.21254.3">
<Dependency Name="Microsoft.DotNet.GenAPI" Version="6.0.0-beta.21264.2">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>0cfaf935894a4c98ff7445c903f1b4c32990b127</Sha>
<Sha>42de78a825b575a1ddeb73020a01fb8cd9311d09</Sha>
</Dependency>
</ToolsetDependencies>
</Dependencies>
6 changes: 3 additions & 3 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@
</PropertyGroup>
<!-- Packages that come from https://github.com/dotnet/arcade -->
<PropertyGroup>
<MicrosoftDotNetApiCompatVersion>6.0.0-beta.21254.3</MicrosoftDotNetApiCompatVersion>
<MicrosoftDotNetCodeAnalysisPackageVersion>6.0.0-beta.21254.3</MicrosoftDotNetCodeAnalysisPackageVersion>
<MicrosoftDotNetGenAPIVersion>6.0.0-beta.21254.3</MicrosoftDotNetGenAPIVersion>
<MicrosoftDotNetApiCompatVersion>6.0.0-beta.21264.2</MicrosoftDotNetApiCompatVersion>
<MicrosoftDotNetCodeAnalysisPackageVersion>6.0.0-beta.21264.2</MicrosoftDotNetCodeAnalysisPackageVersion>
<MicrosoftDotNetGenAPIVersion>6.0.0-beta.21264.2</MicrosoftDotNetGenAPIVersion>
</PropertyGroup>
<!-- Maintain System.CodeDom PackageVersion at 4.4.0. See https://github.com/Microsoft/msbuild/issues/3627 -->
<!-- Pin specific versions of S.Memory so that it would supply AssemblyVersion=4.0.1.0. See https://github.com/dotnet/runtime/issues/31672 -->
Expand Down
2 changes: 2 additions & 0 deletions eng/common/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Param(
[switch] $prepareMachine,
[string] $runtimeSourceFeed = '',
[string] $runtimeSourceFeedKey = '',
[switch] $excludePrereleaseVS,
[switch] $help,
[Parameter(ValueFromRemainingArguments=$true)][String[]]$properties
)
Expand Down Expand Up @@ -65,6 +66,7 @@ function Print-Usage() {
Write-Host " -prepareMachine Prepare machine for CI run, clean up processes after build"
Write-Host " -warnAsError <value> Sets warnaserror msbuild parameter ('true' or 'false')"
Write-Host " -msbuildEngine <value> Msbuild engine to use to run build ('dotnet', 'vs', or unspecified)."
Write-Host " -excludePrereleaseVS Set to exclude build engines in prerelease versions of Visual Studio"
Write-Host ""

Write-Host "Command line arguments not listed above are passed thru to msbuild."
Expand Down
1 change: 0 additions & 1 deletion eng/common/cross/build-android-rootfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ __AndroidPackages+=" libandroid-glob"
__AndroidPackages+=" liblzma"
__AndroidPackages+=" krb5"
__AndroidPackages+=" openssl"
__AndroidPackages+=" openldap"

for path in $(wget -qO- http://termux.net/dists/stable/main/binary-$__AndroidArch/Packages |\
grep -A15 "Package: \(${__AndroidPackages// /\\|}\)" | grep -v "static\|tool" | grep Filename); do
Expand Down
4 changes: 0 additions & 4 deletions eng/common/cross/build-rootfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,11 @@ __UbuntuPackages+=" libcurl4-openssl-dev"
__UbuntuPackages+=" libkrb5-dev"
__UbuntuPackages+=" libssl-dev"
__UbuntuPackages+=" zlib1g-dev"
__UbuntuPackages+=" libldap2-dev"

__AlpinePackages+=" curl-dev"
__AlpinePackages+=" krb5-dev"
__AlpinePackages+=" openssl-dev"
__AlpinePackages+=" zlib-dev"
__AlpinePackages+=" openldap-dev"

__FreeBSDBase="12.1-RELEASE"
__FreeBSDPkg="1.12.0"
Expand All @@ -70,13 +68,11 @@ __FreeBSDPackages+=" icu"
__FreeBSDPackages+=" libinotify"
__FreeBSDPackages+=" lttng-ust"
__FreeBSDPackages+=" krb5"
__FreeBSDPackages+=" libslapi-2.4"

__IllumosPackages="icu-64.2nb2"
__IllumosPackages+=" mit-krb5-1.16.2nb4"
__IllumosPackages+=" openssl-1.1.1e"
__IllumosPackages+=" zlib-1.2.11"
__IllumosPackages+=" openldap-client-2.4.49"

# ML.NET dependencies
__UbuntuPackages+=" libomp5"
Expand Down
1 change: 1 addition & 0 deletions eng/common/msbuild.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Param(
[bool] $nodeReuse = $true,
[switch] $ci,
[switch] $prepareMachine,
[switch] $excludePrereleaseVS,
[Parameter(ValueFromRemainingArguments=$true)][String[]]$extraArgs
)

Expand Down
78 changes: 52 additions & 26 deletions eng/common/post-build/sourcelink-validation.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ $global:RepoFiles = @{}
# Maximum number of jobs to run in parallel
$MaxParallelJobs = 16

$MaxRetries = 5

# Wait time between check for system load
$SecondsBetweenLoadChecks = 10

Expand All @@ -29,7 +31,10 @@ $ValidatePackage = {
# Ensure input file exist
if (!(Test-Path $PackagePath)) {
Write-Host "Input file does not exist: $PackagePath"
return 1
return [pscustomobject]@{
result = 1
packagePath = $PackagePath
}
}

# Extensions for which we'll look for SourceLink information
Expand Down Expand Up @@ -59,7 +64,10 @@ $ValidatePackage = {

# We ignore resource DLLs
if ($FileName.EndsWith('.resources.dll')) {
return
return [pscustomobject]@{
result = 0
packagePath = $PackagePath
}
}

[System.IO.Compression.ZipFileExtensions]::ExtractToFile($_, $TargetFile, $true)
Expand Down Expand Up @@ -91,36 +99,49 @@ $ValidatePackage = {
$Status = 200
$Cache = $using:RepoFiles

if ( !($Cache.ContainsKey($FilePath)) ) {
try {
$Uri = $Link -as [System.URI]

# Only GitHub links are valid
if ($Uri.AbsoluteURI -ne $null -and ($Uri.Host -match 'github' -or $Uri.Host -match 'githubusercontent')) {
$Status = (Invoke-WebRequest -Uri $Link -UseBasicParsing -Method HEAD -TimeoutSec 5).StatusCode
$totalRetries = 0

while ($totalRetries -lt $using:MaxRetries) {
if ( !($Cache.ContainsKey($FilePath)) ) {
try {
$Uri = $Link -as [System.URI]

# Only GitHub links are valid
if ($Uri.AbsoluteURI -ne $null -and ($Uri.Host -match 'github' -or $Uri.Host -match 'githubusercontent')) {
$Status = (Invoke-WebRequest -Uri $Link -UseBasicParsing -Method HEAD -TimeoutSec 5).StatusCode
}
else {
# If it's not a github link, we want to break out of the loop and not retry.
$Status = 0
$totalRetries = $using:MaxRetries
}
}
else {
catch {
Write-Host $_
$Status = 0
}
}
catch {
write-host $_
$Status = 0
}
}

if ($Status -ne 200) {
if ($NumFailedLinks -eq 0) {
if ($FailedFiles.Value -eq 0) {
Write-Host
if ($Status -ne 200) {
$totalRetries++

if ($totalRetries -ge $using:MaxRetries) {
if ($NumFailedLinks -eq 0) {
if ($FailedFiles.Value -eq 0) {
Write-Host
}

Write-Host "`tFile $RealPath has broken links:"
}

Write-Host "`t`tFailed to retrieve $Link"

$NumFailedLinks++
}

Write-Host "`tFile $RealPath has broken links:"
}

Write-Host "`t`tFailed to retrieve $Link"

$NumFailedLinks++
else {
break
}
}
}
}
Expand All @@ -136,7 +157,7 @@ $ValidatePackage = {
}
}
catch {

Write-Host $_
}
finally {
$zip.Dispose()
Expand Down Expand Up @@ -220,6 +241,7 @@ function ValidateSourceLinkLinks {
# Process each NuGet package in parallel
Get-ChildItem "$InputPath\*.symbols.nupkg" |
ForEach-Object {
Write-Host "Starting $($_.FullName)"
Start-Job -ScriptBlock $ValidatePackage -ArgumentList $_.FullName | Out-Null
$NumJobs = @(Get-Job -State 'Running').Count

Expand Down Expand Up @@ -267,6 +289,10 @@ function InstallSourcelinkCli {
try {
InstallSourcelinkCli

foreach ($Job in @(Get-Job)) {
Remove-Job -Id $Job.Id
}

ValidateSourceLinkLinks
}
catch {
Expand Down
30 changes: 21 additions & 9 deletions eng/common/post-build/symbols-validation.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ $CountMissingSymbols = {
$totalRetries = 0

while ($totalRetries -lt $using:MaxRetry) {

# Save the output and get diagnostic output
$output = & $dotnetSymbolExe --symbols --modules $WindowsPdbVerificationParam $TargetServerParam $FullPath -o $SymbolsPath --diagnostics | Out-String

Expand All @@ -132,20 +133,28 @@ $CountMissingSymbols = {
elseif (Test-Path $SymbolPath) {
return 'Module'
}
elseif ($output.Contains("503 Service Unavailable")) {
# If we got a 503 error, we should retry.
else
{
$totalRetries++
}
else {
return $null
}
}

return $null
}

$SymbolsOnMSDL = & $FirstMatchingSymbolDescriptionOrDefault $FileName '--microsoft-symbol-server' $SymbolsPath $WindowsPdbVerificationParam
$SymbolsOnSymWeb = & $FirstMatchingSymbolDescriptionOrDefault $FileName '--internal-server' $SymbolsPath $WindowsPdbVerificationParam
$FileGuid = New-Guid
$ExpandedSymbolsPath = Join-Path -Path $SymbolsPath -ChildPath $FileGuid

$SymbolsOnMSDL = & $FirstMatchingSymbolDescriptionOrDefault `
-FullPath $FileName `
-TargetServerParam '--microsoft-symbol-server' `
-SymbolsPath "$ExpandedSymbolsPath-msdl" `
-WindowsPdbVerificationParam $WindowsPdbVerificationParam
$SymbolsOnSymWeb = & $FirstMatchingSymbolDescriptionOrDefault `
-FullPath $FileName `
-TargetServerParam '--internal-server' `
-SymbolsPath "$ExpandedSymbolsPath-symweb" `
-WindowsPdbVerificationParam $WindowsPdbVerificationParam

Write-Host -NoNewLine "`t Checking file " $FileName "... "

Expand Down Expand Up @@ -208,6 +217,7 @@ function CheckSymbolsAvailable {
Remove-Item $ExtractPath -Force -Recurse -ErrorAction SilentlyContinue
}

$TotalPackages = 0
$TotalFailures = 0
$DupedSymbols = 0

Expand All @@ -230,6 +240,8 @@ function CheckSymbolsAvailable {
return
}

$TotalPackages++

Start-Job -ScriptBlock $CountMissingSymbols -ArgumentList @($FullName,$WindowsPdbVerificationParam) | Out-Null

$NumJobs = @(Get-Job -State 'Running').Count
Expand All @@ -255,11 +267,11 @@ function CheckSymbolsAvailable {

if ($TotalFailures -gt 0 -or $DupedSymbols -gt 0) {
if ($TotalFailures -gt 0) {
Write-PipelineTelemetryError -Category 'CheckSymbols' -Message "Symbols missing for $TotalFailures packages"
Write-PipelineTelemetryError -Category 'CheckSymbols' -Message "Symbols missing for $TotalFailures/$TotalPackages packages"
}

if ($DupedSymbols -gt 0) {
Write-PipelineTelemetryError -Category 'CheckSymbols' -Message "$DupedSymbols packages had duplicated symbol files"
Write-PipelineTelemetryError -Category 'CheckSymbols' -Message "$DupedSymbols/$TotalPackages packages had duplicated symbol files and could not be extracted"
}

ExitWithExitCode 1
Expand Down
19 changes: 16 additions & 3 deletions eng/common/tools.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@
# True to use global NuGet cache instead of restoring packages to repository-local directory.
[bool]$useGlobalNuGetCache = if (Test-Path variable:useGlobalNuGetCache) { $useGlobalNuGetCache } else { !$ci }

# True to exclude prerelease versions Visual Studio during build
[bool]$excludePrereleaseVS = if (Test-Path variable:excludePrereleaseVS) { $excludePrereleaseVS } else { $false }

# An array of names of processes to stop on script exit if prepareMachine is true.
$processesToStopOnExit = if (Test-Path variable:processesToStopOnExit) { $processesToStopOnExit } else { @('msbuild', 'dotnet', 'vbcscompiler') }

Expand Down Expand Up @@ -463,7 +466,11 @@ function LocateVisualStudio([object]$vsRequirements = $null){
}

if (!$vsRequirements) { $vsRequirements = $GlobalJson.tools.vs }
$args = @('-latest', '-prerelease', '-format', 'json', '-requires', 'Microsoft.Component.MSBuild', '-products', '*')
$args = @('-latest', '-format', 'json', '-requires', 'Microsoft.Component.MSBuild', '-products', '*')

if (!$excludePrereleaseVS) {
$args += '-prerelease'
}

if (Get-Member -InputObject $vsRequirements -Name 'version') {
$args += '-version'
Expand All @@ -489,7 +496,13 @@ function LocateVisualStudio([object]$vsRequirements = $null){

function InitializeBuildTool() {
if (Test-Path variable:global:_BuildTool) {
return $global:_BuildTool
# If the requested msbuild parameters do not match, clear the cached variables.
if($global:_BuildTool.Contains('ExcludePrereleaseVS') -and $global:_BuildTool.ExcludePrereleaseVS -ne $excludePrereleaseVS) {
Remove-Item variable:global:_BuildTool
Remove-Item variable:global:_MSBuildExe
} else {
return $global:_BuildTool
}
}

if (-not $msbuildEngine) {
Expand Down Expand Up @@ -517,7 +530,7 @@ function InitializeBuildTool() {
ExitWithExitCode 1
}

$buildTool = @{ Path = $msbuildPath; Command = ""; Tool = "vs"; Framework = "net472" }
$buildTool = @{ Path = $msbuildPath; Command = ""; Tool = "vs"; Framework = "net472"; ExcludePrereleaseVS = $excludePrereleaseVS }
} else {
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Unexpected value of -msbuildEngine: '$msbuildEngine'."
ExitWithExitCode 1
Expand Down
8 changes: 4 additions & 4 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"tools": {
"dotnet": "6.0.100-preview.1.21103.13",
"dotnet": "6.0.100-preview.3.21202.5",
"runtimes": {
"dotnet": [
"2.1.7",
Expand All @@ -12,11 +12,11 @@
}
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.21254.3",
"Microsoft.DotNet.Helix.Sdk": "6.0.0-beta.21254.3"
"Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.21264.2",
"Microsoft.DotNet.Helix.Sdk": "6.0.0-beta.21264.2"
},
"sdk": {
"version": "6.0.100-preview.1.21103.13"
"version": "6.0.100-preview.3.21202.5"
},
"native-tools": {
"strawberry-perl": "5.28.1.1-1",
Expand Down