Skip to content

Commit

Permalink
Enable PR build to run on new winuibuildagents build pool (#3095)
Browse files Browse the repository at this point in the history
  • Loading branch information
kmahone authored Aug 11, 2020
1 parent fb87bec commit 955b74e
Show file tree
Hide file tree
Showing 8 changed files with 75 additions and 15 deletions.
49 changes: 49 additions & 0 deletions .vsconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"version": "1.0",
"components": [
"Microsoft.VisualStudio.Component.CoreEditor",
"Microsoft.VisualStudio.Workload.CoreEditor",
"Microsoft.NetCore.Component.Runtime.3.1",
"Microsoft.NetCore.Component.SDK",
"Microsoft.VisualStudio.Component.NuGet",
"Microsoft.Net.Component.4.6.1.TargetingPack",
"Microsoft.VisualStudio.Component.Roslyn.Compiler",
"Microsoft.VisualStudio.Component.Roslyn.LanguageServices",
"Microsoft.NetCore.Component.DevelopmentTools",
"Microsoft.Net.Component.4.8.SDK",
"Microsoft.Net.Component.4.7.2.TargetingPack",
"Microsoft.Net.ComponentGroup.DevelopmentPrerequisites",
"Microsoft.Component.MSBuild",
"Microsoft.VisualStudio.Component.TextTemplating",
"Microsoft.VisualStudio.Component.ManagedDesktop.Core",
"Microsoft.Net.Component.4.5.2.TargetingPack",
"Microsoft.Net.Component.4.5.TargetingPack",
"Microsoft.Net.Component.4.TargetingPack",
"Microsoft.Net.Component.4.5.1.TargetingPack",
"Microsoft.Net.Component.4.6.TargetingPack",
"Microsoft.Net.ComponentGroup.TargetingPacks.Common",
"Microsoft.Net.Core.Component.SDK.2.1",
"Microsoft.VisualStudio.Component.DiagnosticTools",
"Microsoft.Net.Component.4.7.TargetingPack",
"Microsoft.VisualStudio.Component.VC.CoreIde",
"Microsoft.VisualStudio.Component.VC.Tools.x86.x64",
"Microsoft.VisualStudio.Component.VC.DiagnosticTools",
"Microsoft.VisualStudio.Component.Windows10SDK.18362",
"Microsoft.VisualStudio.Component.ManagedDesktop.Prerequisites",
"Microsoft.VisualStudio.ComponentGroup.MSIX.Packaging",
"Microsoft.VisualStudio.Workload.ManagedDesktop",
"Microsoft.VisualStudio.Component.VC.Redist.14.Latest",
"Microsoft.VisualStudio.ComponentGroup.ArchitectureTools.Native",
"Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core",
"Microsoft.VisualStudio.Component.Windows10SDK.17763",
"Microsoft.VisualStudio.Workload.NativeDesktop",
"Microsoft.Component.NetFX.Native",
"Microsoft.VisualStudio.ComponentGroup.UWP.NetCoreAndStandard",
"Microsoft.VisualStudio.ComponentGroup.UWP.Support",
"Microsoft.VisualStudio.Component.VC.Tools.ARM64",
"Microsoft.VisualStudio.Component.UWP.VC.ARM64",
"Microsoft.VisualStudio.Component.VC.Tools.ARM",
"Microsoft.VisualStudio.ComponentGroup.UWP.VC",
"Microsoft.VisualStudio.Workload.Universal"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ steps:
targetType: filePath
filePath: build\Install-WindowsSdkISO.ps1
arguments: ${{ parameters.sdkVersion }}
displayName: 'Install Insider SDK (${{ parameters.sdkVersion }})'
displayName: 'Install Windows SDK (${{ parameters.sdkVersion }})'
25 changes: 18 additions & 7 deletions build/Install-WindowsSdkISO.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ param([Parameter(Mandatory=$true, Position=0)]
$ErrorActionPreference = 'Stop'

# Constants
$WindowsSDKOptions = @("OptionId.UWPCpp", "OptionId.DesktopCPPx64", "OptionId.DesktopCPPx86", "OptionId.DesktopCPPARM64", "OptionId.DesktopCPPARM")
$WindowsSDKRegPath = "HKLM:\Software\Microsoft\Windows Kits\Installed Roots"
$WindowsSDKOptions = @("OptionId.UWPCpp", "OptionId.DesktopCPPx64", "OptionId.DesktopCPPx86", "OptionId.DesktopCPPARM64", "OptionId.DesktopCPPARM", "OptionId.WindowsDesktopDebuggers")
$WindowsSDKRegPath = "HKLM:\Software\WOW6432Node\Microsoft\Windows Kits\Installed Roots"
$WindowsSDKRegRootKey = "KitsRoot10"
$WindowsSDKVersion = "10.0.$buildNumber.0"
$WindowsSDKInstalledRegPath = "$WindowsSDKRegPath\$WindowsSDKVersion\Installed Options"
Expand Down Expand Up @@ -72,9 +72,11 @@ function Download-File
$downloadDestTemp = $downloadPath;

# Delete and rename to final dest
if (Test-Path -PathType Container $downloadDest)
Write-Host "testing $downloadDest"
if (Test-Path $downloadDest)
{
[System.IO.Directory]::Delete($downloadDest, $true)
Write-Host "Deleting: $downloadDest"
Remove-Item $downloadDest -Force
}

Move-Item -Force $downloadDestTemp $downloadDest
Expand Down Expand Up @@ -186,7 +188,16 @@ function Test-InstallWindowsSDK
{
# A Windows SDK is installed
# Is an SDK of our version installed with the options we need?
if (Test-RegistryPathAndValue -Path $WindowsSDKInstalledRegPath -Value "$WindowsSDKOptions")
$allRequiredSdkOptionsInstalled = $true
foreach($sdkOption in $WindowsSDKOptions)
{
if (!(Test-RegistryPathAndValue -Path $WindowsSDKInstalledRegPath -Value $sdkOption))
{
$allRequiredSdkOptionsInstalled = $false
}
}

if($allRequiredSdkOptionsInstalled)
{
# It appears we have what we need. Double check the disk
$sdkRoot = Get-ItemProperty -Path $WindowsSDKRegPath | Select-Object -ExpandProperty $WindowsSDKRegRootKey
Expand Down Expand Up @@ -269,7 +280,7 @@ if ($InstallWindowsSDK)
$env:TEMP = Join-Path $env:SystemDrive 'temp'
}

$winsdkTempDir = Join-Path $env:TEMP "WindowsSDK"
$winsdkTempDir = Join-Path (Join-Path $env:TEMP ([System.IO.Path]::GetRandomFileName())) "WindowsSDK"

if (![System.IO.Directory]::Exists($winsdkTempDir))
{
Expand Down Expand Up @@ -317,7 +328,7 @@ if ($InstallWindowsSDK)
finally
{
Write-Host -NoNewline "Dismounting ISO $file..."
#Dismount-ISO $downloadFile
Dismount-ISO $downloadFile
Write-Host "Done"
}
}
Expand Down
2 changes: 1 addition & 1 deletion build/MUX-PR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
ne(dependencies.Setup.outputs['checkPayload.shouldSkipPRBuild'],'True')
)
pool:
vmImage: 'windows-2019'
name: 'winuibuildagents'
timeoutInMinutes: 120
strategy:
maxParallel: 10
Expand Down
2 changes: 1 addition & 1 deletion build/MUX-SimpleBuildAndTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
condition:
eq(variables['useBuildOutputFromBuildId'],'')
pool:
vmImage: 'windows-2019'
name: 'winuibuildagents'
timeoutInMinutes: 120
variables:
appxPackageDir : $(build.artifactStagingDirectory)\$(buildConfiguration)\$(buildPlatform)\AppxPackages
Expand Down
2 changes: 1 addition & 1 deletion dev/dll/Microsoft.UI.Xaml.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@
<Optimization Condition="'$(Configuration)'=='Release'">MinSpace</Optimization>
<ConformanceMode>true</ConformanceMode>
<!-- Disable multi-proc building on low powered machines, such as the lab machines -->
<MultiProcessorCompilation Condition="'$(TF_BUILD)'=='True'">false</MultiProcessorCompilation>
<MultiProcessorCompilation Condition="'$(TF_BUILD)'=='True' AND $(NUMBER_OF_PROCESSORS) &lt;= 4">false</MultiProcessorCompilation>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion tools/MUXPGODatabase/restore-pgodb.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ $currentVersion = MakeVersion $releaseVersionMajor $releaseVersionMinor ( GetDat

Write-Host ( "PGO OPTIMIZE: requesting {0} version {1}" -f $packageId, ( FormatVersion $currentVersion ) )

$packageSource = Register-PackageSource -Name MUX_Dependencies -Location $feedUri -ProviderName NuGet -Trusted
$packageSource = Register-PackageSource -ForceBootstrap -Name MUX_Dependencies -Location $feedUri -ProviderName NuGet -Trusted
$packages = ( Find-Package $packageId -Source MUX_Dependencies -AllowPrereleaseVersions -AllVersions ) | Sort-Object -Property Version -Descending

$best = $null
Expand Down
6 changes: 3 additions & 3 deletions tools/NugetWrapper.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ if "%VisualStudioVersion%" == "" set VisualStudioVersion=15.0

if defined NUGETEXETOOLPATH goto :AzurePipelines

if not exist %TEMP%\nuget.4.9.2.exe (
if not exist %TEMP%\nuget.5.2.0.exe (
echo Nuget.exe not found in the temp dir, downloading.
powershell -Command "& { Invoke-WebRequest https://dist.nuget.org/win-x86-commandline/v4.9.2/nuget.exe -outfile $env:TEMP\nuget.4.9.2.exe }"
powershell -Command "& { Invoke-WebRequest https://dist.nuget.org/win-x86-commandline/v5.2.0/nuget.exe -outfile $env:TEMP\nuget.5.2.0.exe }"
)

%TEMP%\nuget.4.9.2.exe %*
%TEMP%\nuget.5.2.0.exe %*

exit /B %ERRORLEVEL%

Expand Down

0 comments on commit 955b74e

Please sign in to comment.