Skip to content

Commit 94fcedf

Browse files
authored
Merge pull request #8264 from AR-May/exp/AR-May/opt-prof-fix-vs17.0-to-vs17.2
Backport opt-prof v2 vs17.2 Brings the following changes from the 17.0 branch into 17.2: - [vs16.11] Update dependencies from dotnet/arcade (#7332) - Update dependencies from https://github.com/dotnet/arcade build 20220309.5 - Update dependencies from https://github.com/dotnet/arcade build 20220526.2 - Bump CLI version to match global.json - Bump NuGet version to match - Avoid AssemblyName.KeyPair on .NET (#7660) - Merge remote-tracking branch 'upstream/vs16.9' into backport-keypair-elision-16.11 - Merge pull request #7663 from rainersigwald/backport-keypair-elision-16.11 - Configure OptProf v2 pipeline 16.11 (#8189) - Updating 'Microsoft.DotNet.Arcade.Sdk': '5.0.0-beta.22276.2' => '5.0.0-beta.22526.12' - Move BAR publish to windows-latest - Merge pull request #8210 from rainersigwald/exp/16.11-build - Merge remote-tracking branch 'upstream/vs16.11' into exp/AR-May/opt-prof-fix-vs16.11-to-vs17.0-2 - Merge pull request #8260 from dotnet/exp/AR-May/opt-prof-fix-vs16.11-to-vs17.0-2 ### Testing CI
2 parents 7e54ae0 + 4b9fc9e commit 94fcedf

File tree

3 files changed

+177
-0
lines changed

3 files changed

+177
-0
lines changed

.opt-prof.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# Runs OptProf for MSBuild binaries based on an insertion build
2+
3+
trigger: none # Prevents this pipeline from triggering on check-ins
4+
pr: none # don't run this on PR as well, this should only trigger off on MSBuild runs
5+
schedules:
6+
- cron: "0 9 * * Wed,Sat"
7+
displayName: Weekly OptProf Run
8+
branches:
9+
include:
10+
- main
11+
always: true
12+
13+
resources:
14+
pipelines:
15+
- pipeline: ComponentBuildUnderTest
16+
source: MSBuild\MSBuild # The name of the pipeline that produces the artifact
17+
trigger:
18+
branches:
19+
- vs*
20+
- pipeline: DartLab
21+
project: DevDiv
22+
source: DartLab
23+
branch: main
24+
- pipeline: DartLab.OptProf
25+
source: DartLab.OptProf
26+
branch: main
27+
repositories:
28+
- repository: DartLabTemplates
29+
type: git
30+
name: DartLab.Templates
31+
ref: refs/heads/main
32+
- repository: DartLabOptProfTemplates
33+
type: git
34+
name: DartLab.OptProf
35+
ref: refs/heads/main
36+
37+
stages:
38+
- template: \templates\stages\visual-studio\single-runsettings.yml@DartLabOptProfTemplates
39+
parameters:
40+
##### Required #####
41+
runSettingsURI: $(Pipeline.Workspace)\ComponentBuildUnderTest\VSSetup\Insertion\OptProf\Training.runsettings
42+
visualStudioBootstrapperURI: $(VisualStudio.InstallationUnderTest.BootstrapperURL)
43+
##### Optional #####
44+
name: OptProfProfilingWorkflow
45+
displayName: OptProf Profiling Workflow
46+
optOptimizationInputsDropName: $(OptimizationInputsDropName)
47+
testLabPoolName: VS-Platform # The test lab pool to run your tests in
48+
testMachineImageName: Windows-10-Enterprise-20H2
49+
visualStudioSigning: Test
50+
variables:
51+
- name: branchName # The branch in the VS repo the bootstrapper was based on
52+
value: $[replace(variables['resources.pipeline.ComponentBuildUnderTest.sourceBranch'],'refs/heads/','')]
53+
- name: OptimizationInputsDropName # The naming convention of the OptimizationInputsDrop
54+
value: OptimizationData/DotNet-msbuild-Trusted/$(branchName)/$(resources.pipeline.ComponentBuildUnderTest.runName)/$(Build.BuildId)/$(System.StageAttempt)
55+
##### Step Hooks #####
56+
preTestMachineConfigurationStepList:
57+
- download: ComponentBuildUnderTest
58+
artifact: MicroBuildOutputs
59+
patterns: '**\BootstrapperInfo.json'
60+
displayName: Download Bootstrapper Information
61+
- download: ComponentBuildUnderTest
62+
artifact: VSSetup
63+
patterns: '**\*.runsettings'
64+
displayName: Download OptProf Information
65+
- powershell: |
66+
try {
67+
$bootstrapperInfoJson = Get-Content -Raw -Path '$(Pipeline.Workspace)\ComponentBuildUnderTest\MicroBuildOutputs\BootstrapperInfo.json' | ConvertFrom-Json
68+
$vsBranch = $bootstrapperInfoJson[0].VSBranch
69+
Write-Host "VSBootstrapperBranch: $vsBranch"
70+
Set-AzurePipelinesVariable 'VSBootstrapperBranch' $vsBranch
71+
}
72+
catch {
73+
Write-Host $_
74+
Write-Error "Failed to set VSBootstrapperBranch pipeline variable"
75+
throw
76+
}
77+
displayName: Set 'VSBootstrapperBranch' variable
78+
- task: PowerShell@2
79+
displayName: Set 'VisualStudio.InstallationUnderTest.BootstrapperURL' variable
80+
inputs:
81+
filePath: $(DartLab.Path)\Scripts\VisualStudio\Bootstrapper\Get-BootstrapperURL.ps1
82+
arguments: -BootstrapperInfoJsonURI '$(Pipeline.Workspace)\ComponentBuildUnderTest\MicroBuildOutputs\BootstrapperInfo.json' -VSBranch '$(VSBootstrapperBranch)' -OutVariableName 'VisualStudio.InstallationUnderTest.BootstrapperURL'
83+
preDeployAndRunTestsStepList:
84+
- download: ComponentBuildUnderTest

.vsts-dotnet.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ stages:
158158
-task VisualStudio.BuildIbcTrainingSettings
159159
/p:VisualStudioDropName=$(VisualStudio.DropName)
160160
/p:BootstrapperInfoPath=$(Build.StagingDirectory)\MicroBuild\Output\BootstrapperInfo.json
161+
/p:VisualStudioIbcTrainingSettingsPath=$(Build.SourcesDirectory)\eng\config\OptProf.runsettings
161162
displayName: 'OptProf - Build IBC training settings'
162163
condition: succeeded()
163164

eng/config/OptProf.runsettings

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<RunSettings>
3+
<RunConfiguration>
4+
<ResultsDirectory>C:\Test\Results</ResultsDirectory>
5+
<TargetPlatform>X86</TargetPlatform>
6+
<MaxCpuCount>1</MaxCpuCount>
7+
<BatchSize>10</BatchSize>
8+
<TestSessionTimeout>21600000</TestSessionTimeout>
9+
<DesignMode>False</DesignMode>
10+
<InIsolation>False</InIsolation>
11+
<CollectSourceInformation>False</CollectSourceInformation>
12+
<DisableAppDomain>False</DisableAppDomain>
13+
<DisableParallelization>False</DisableParallelization>
14+
<TargetFrameworkVersion>.NETFramework,Version=v4.0</TargetFrameworkVersion>
15+
<ExecutionThreadApartmentState>STA</ExecutionThreadApartmentState>
16+
<TestAdaptersPaths>%SystemDrive%\Test</TestAdaptersPaths>
17+
<TreatTestAdapterErrorsAsWarnings>False</TreatTestAdapterErrorsAsWarnings>
18+
</RunConfiguration>
19+
<SessionConfiguration>
20+
<!-- Generated -->
21+
</SessionConfiguration>
22+
<DataCollectionRunSettings>
23+
<DataCollectors>
24+
<DataCollector uri="datacollector://microsoft/DevDiv/TestExtensions/ProcDumpCollector/v1" friendlyName="ProcDump Collector" enabled="True">
25+
<Configuration>
26+
<RootDumpDirectory>C:\Test\Dumps</RootDumpDirectory>
27+
<Deployment PackageName = "Microsoft.DevDiv.TestExtensions.ProcDumpCollector" />
28+
</Configuration>
29+
</DataCollector>
30+
<DataCollector uri="datacollector://microsoft/DevDiv/TestExtensions/LingeringProcessCollector/v1" friendlyName="Lingering Process Collector" enabled="True">
31+
<Configuration>
32+
<KillLingeringProcesses>true</KillLingeringProcesses>
33+
<ShutdownCommands>
34+
<ShutdownCommand Process="VBCSCompiler" Command="%ProcessPath%" Arguments="-shutdown" Timeout="60000" />
35+
</ShutdownCommands>
36+
<LoggingBehavior>Warning</LoggingBehavior>
37+
<Deployment PackageName = "Microsoft.DevDiv.TestExtensions.LingeringProcessCollector" />
38+
</Configuration>
39+
</DataCollector>
40+
<DataCollector uri="datacollector://microsoft/DevDiv/VideoRecorder/2.0" friendlyName="Screen and Voice Recorder" enabled="True">
41+
<Configuration>
42+
<Deployment PackageName = "Microsoft.DevDiv.Validation.MediaRecorder" />
43+
</Configuration>
44+
</DataCollector>
45+
</DataCollectors>
46+
</DataCollectionRunSettings>
47+
<InProcDataCollectionRunSettings>
48+
<InProcDataCollectors>
49+
<InProcDataCollector uri="datacollector://microsoft/DevDiv/TestExtensions/OptProfDataCollector/v2" assemblyQualifiedName="Microsoft.DevDiv.TestExtensions.OptProfDataCollector, Microsoft.DevDiv.TestExtensions.OptProfDataCollector, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null" friendlyName="OptProf Data Collector" enabled="True" codebase="C:\Test\Extensions\Microsoft.DevDiv.TestExtensions.OptProfDataCollector\lib\net461\Microsoft.DevDiv.TestExtensions.OptProfDataCollector.dll">
50+
<Configuration>
51+
<WorkingDirectory>C:\OptProf</WorkingDirectory>
52+
<ProfilesDirectory>C:\Profiles</ProfilesDirectory>
53+
<IgnoreProfileNotGeneratedExceptions>true</IgnoreProfileNotGeneratedExceptions>
54+
<Deployment PackageName="Microsoft.DevDiv.TestExtensions.OptProfDataCollector" />
55+
</Configuration>
56+
</InProcDataCollector>
57+
</InProcDataCollectors>
58+
</InProcDataCollectionRunSettings>
59+
<TestRunParameters />
60+
<LoggerRunSettings>
61+
<Loggers />
62+
</LoggerRunSettings>
63+
<VisualStudioConfiguration>
64+
<!-- MSBuild-OptProf specific VS configuration element -->
65+
<InstallationUnderTest>
66+
<Components All="false">
67+
<Include ID="Microsoft.VisualStudio.Component.VC.CLI.Support" />
68+
<Include ID="Microsoft.VisualStudio.Component.Windows81SDK" />
69+
<Include ID="Microsoft.VisualStudio.ComponentGroup.UWP.VC" />
70+
<Include ID="Microsoft.VisualStudio.Component.VC.ATLMFC" />
71+
<Include ID="Microsoft.VisualStudio.Component.Windows10SDK.15063.Desktop" />
72+
<Include ID="Microsoft.VisualStudio.Component.Windows10SDK.16299" />
73+
<Include ID="Microsoft.VisualStudio.Component.Windows10SDK.16299.UWP" />
74+
<Include ID="Microsoft.Net.ComponentGroup.4.7.2.DeveloperTools" />
75+
<Exclude ID="Component.Incredibuild" />
76+
<Exclude ID="Component.JavaJDK" />
77+
<Exclude ID="Microsoft.VisualStudio.Component.AspNet45" />
78+
</Components>
79+
<Workloads All="false" IncludeComponents="Required,Recommended">
80+
<Include ID="Microsoft.VisualStudio.Workload.CoreEditor" IncludeComponents="Required" />
81+
<Include ID="Microsoft.VisualStudio.Workload.ManagedDesktop" IncludeComponents="Required" />
82+
<Include ID="Microsoft.VisualStudio.Workload.NativeCrossPlat" IncludeComponents="Required" />
83+
<Include ID="Microsoft.VisualStudio.Workload.NativeDesktop" IncludeComponents="Required" />
84+
<Include ID="Microsoft.VisualStudio.Workload.NetWeb" IncludeComponents="Required" />
85+
<Include ID="Microsoft.VisualStudio.Workload.Office" IncludeComponents="Required" />
86+
<Include ID="Microsoft.VisualStudio.Workload.Universal" IncludeComponents="Required" />
87+
<Include ID="Microsoft.VisualStudio.Workload.VisualStudioExtension" IncludeComponents="Required" />
88+
<Include ID="Microsoft.VisualStudio.Workload.Webcrossplat" IncludeComponents="Required" />
89+
</Workloads>
90+
</InstallationUnderTest>
91+
</VisualStudioConfiguration>
92+
</RunSettings>

0 commit comments

Comments
 (0)