Skip to content

Commit ba18036

Browse files
authored
Merge branch 'microsoft:main' into master
2 parents eaa1edf + 24e1fed commit ba18036

File tree

597 files changed

+462087
-59709
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

597 files changed

+462087
-59709
lines changed

.ado.yml

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
trigger:
2+
- main
3+
4+
pr:
5+
- main
6+
7+
jobs:
8+
- job: PerfView_Debug
9+
pool:
10+
vmImage: 'windows-2022'
11+
name: Azure Pipelines
12+
demands:
13+
- msbuild
14+
- vstest
15+
16+
steps:
17+
- template: /.pipelines/perfview-job.yml
18+
parameters:
19+
flavor: 'Debug'
20+
21+
- task: PublishBuildArtifacts@1
22+
displayName: 'Publish Artifacts'
23+
inputs:
24+
PathtoPublish: '$(build.artifactstagingdirectory)'
25+
ArtifactName: 'PerfViewBinaries-Debug'
26+
condition: succeededOrFailed()
27+
28+
- job: PerfView_Release
29+
pool:
30+
vmImage: 'windows-2022'
31+
name: Azure Pipelines
32+
demands:
33+
- msbuild
34+
- vstest
35+
36+
steps:
37+
- template: /.pipelines/perfview-job.yml
38+
parameters:
39+
flavor: 'Release'
40+
41+
- task: PublishBuildArtifacts@1
42+
displayName: 'Publish Artifact'
43+
inputs:
44+
PathtoPublish: '$(build.artifactstagingdirectory)'
45+
ArtifactName: 'PerfViewBinaries-Release'
46+
47+
- job: PerfCollect
48+
pool:
49+
vmImage: 'ubuntu-latest'
50+
name: Azure Pipelines
51+
52+
steps:
53+
- template: /.pipelines/perfcollect-job.yml

.codecov.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ flags:
3232
- src/VS/
3333
test:
3434
paths:
35-
- src/LinuxEvent.Tests/
35+
- src/LinuxTracing.Tests/
3636
- src/PerfView.Tests/
3737
- src/PerfView.TestUtilities/
3838
- src/TraceEvent/Ctf/CtfTracing.Tests/

.editorconfig

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
root=true
22

3+
[*.{csproj,props,targets,nuspec}]
4+
indent_style = space
5+
indent_size = 2
6+
37
[*.cs]
48
indent_style = space
59
indent_size = 4

.github/CODEOWNERS

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Users referenced in this file will automatically be requested as reviewers for PRs that modify the given paths.
2+
# See https://help.github.com/articles/about-code-owners/
3+
4+
* @brianrob @cincuranet

.github/workflows/stale.yml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: 'Stale: Label and Close Issues'
2+
on:
3+
schedule:
4+
- cron: '23 2,14 * * *' # Twice daily at 19 minutes after the hour (random/uncommon time)
5+
6+
workflow_dispatch:
7+
# Manual triggering through the GitHub UI, API, or CLI
8+
inputs:
9+
daysBeforeStale:
10+
required: true
11+
default: "365"
12+
daysBeforeClose:
13+
required: true
14+
default: "30"
15+
operationsPerRun:
16+
required: true
17+
default: "4000"
18+
19+
permissions:
20+
actions: write # For managing the operation state cache
21+
issues: write
22+
23+
jobs:
24+
stale:
25+
if: github.repository_owner == 'microsoft' # Do not run on forks
26+
27+
runs-on: ubuntu-latest
28+
steps:
29+
- uses: actions/stale@v9 # https://github.com/actions/stale/blob/v9/README.md
30+
with:
31+
ascending: true # Process the oldest issues first
32+
stale-issue-label: 'stale'
33+
stale-issue-message: "Due to lack of recent activity, this issue has been labeled as 'stale'. It will be closed if no further activity occurs within 30 more days. Any new comment will remove the label."
34+
close-issue-message: "This issue will now be closed since it has been labeled 'stale' without activity for 30 days."
35+
days-before-stale: ${{ fromJson(inputs.daysBeforeStale || 2192) }} # Default to 6 years if not specified as input
36+
days-before-close: ${{ fromJson(inputs.daysBeforeClose || 30 ) }} # Default to 30 days if not specified as input
37+
days-before-pr-stale: -1 # Do not label PRs as 'stale'
38+
days-before-pr-close: -1 # Do not close PRs labeled as 'stale'
39+
operations-per-run: ${{ fromJson(inputs.operationsPerRun || 4000 )}}

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -204,3 +204,7 @@ src/TraceEvent/EventCounterHandler.cs
204204
OSExtensions.cs
205205
password.txt
206206
documentation/internal/
207+
*.userosscache
208+
209+
# Rider
210+
.idea/

.nuget/packages.config

-5
This file was deleted.

.pipelines/mirror.yml

+142
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
trigger:
2+
- main
3+
4+
variables:
5+
- group: 'DotNet-VSTS-Infra-Access'
6+
7+
resources:
8+
repositories:
9+
- repository: 1esPipelines
10+
type: git
11+
name: 1ESPipelineTemplates/1ESPipelineTemplates
12+
ref: refs/tags/release
13+
14+
extends:
15+
template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines
16+
parameters:
17+
sdl:
18+
codeql:
19+
compiled:
20+
enabled: false
21+
justificationForDisabling: 'This is a mirror pipeline that does not build any code.'
22+
pool:
23+
name: AzurePipelines-EO
24+
image: 1ESPT-Windows2022
25+
os: windows
26+
27+
stages:
28+
- stage: Mirror
29+
jobs:
30+
- job: Mirror
31+
steps:
32+
- task: PowerShell@1
33+
displayName: 'Set SourceBranch Variable'
34+
inputs:
35+
scriptType: inlineScript
36+
arguments: '$(Build.SourceBranch)'
37+
inlineScript: |
38+
param(
39+
[string]$SourceBranch
40+
)
41+
if ($SourceBranch.StartsWith("refs/heads/"))
42+
{
43+
# strip off the refs/heads/ prefix
44+
$SourceBranch=$SourceBranch.Substring(11)
45+
}
46+
$env:SourceBranch=$SourceBranch
47+
Write-Host ("##vso[task.setvariable variable=SourceBranch;]$env:SourceBranch")
48+
49+
- task: PowerShell@1
50+
displayName: 'Set MirrorBranch Variable'
51+
inputs:
52+
scriptType: inlineScript
53+
inlineScript: |
54+
$env:MirrorBranch='mirror/'+[Guid]::NewGuid().ToString()
55+
Write-Host ("##vso[task.setvariable variable=MirrorBranch;]$env:MirrorBranch")
56+
57+
- task: PipAuthenticate@1
58+
displayName: 'Pip Authenticate'
59+
inputs:
60+
artifactFeeds: 'DevDiv/PerfView-Mirror'
61+
62+
- task: UsePythonVersion@0
63+
displayName: 'Use Python 3.11.x'
64+
inputs:
65+
versionSpec: 3.11.x
66+
67+
- task: CmdLine@1
68+
displayName: 'Update pip to latest'
69+
inputs:
70+
filename: python
71+
arguments: '-m pip install --upgrade pip'
72+
73+
- task: CmdLine@1
74+
displayName: 'Install Azure CLI'
75+
inputs:
76+
filename: pip
77+
arguments: 'install --pre azure-cli'
78+
79+
- task: CmdLine@1
80+
displayName: 'Install Azure DevOps Extension'
81+
inputs:
82+
filename: az
83+
arguments: 'extension add -n azure-devops'
84+
85+
- task: CmdLine@1
86+
displayName: 'Configure Git user.email'
87+
inputs:
88+
filename: git
89+
arguments: 'config user.email "[email protected]"'
90+
91+
- task: CmdLine@1
92+
displayName: 'Configure git user.name'
93+
inputs:
94+
filename: git
95+
arguments: 'config user.name "dotnet-bot"'
96+
97+
- task: CmdLine@1
98+
displayName: 'Checkout GitHub main Branch'
99+
inputs:
100+
filename: git
101+
arguments: 'checkout $(SourceBranch)'
102+
103+
- task: CmdLine@1
104+
displayName: 'Create Mirror Branch'
105+
inputs:
106+
filename: git
107+
arguments: 'checkout -b $(MirrorBranch)'
108+
109+
- task: CmdLine@1
110+
displayName: 'Run git reset'
111+
inputs:
112+
filename: git
113+
arguments: 'reset --hard origin/$(SourceBranch)'
114+
enabled: false
115+
116+
- task: CmdLine@1
117+
displayName: 'Pull AzDO SourceBranch'
118+
inputs:
119+
filename: 'git '
120+
arguments: 'pull --strategy=recursive --strategy-option no-renames https://dn-bot:$(dn-bot-devdiv-build-rw-code-rw)@devdiv.visualstudio.com/DevDiv/_git/perfView $(SourceBranch)'
121+
122+
- task: CmdLine@1
123+
displayName: 'Run git push '
124+
inputs:
125+
filename: 'git '
126+
arguments: 'push https://dn-bot:$(dn-bot-devdiv-build-rw-code-rw)@devdiv.visualstudio.com/DevDiv/_git/perfView $(MirrorBranch)'
127+
128+
- task: PowerShell@1
129+
displayName: 'Create Pull Request'
130+
inputs:
131+
scriptType: inlineScript
132+
arguments: '$(dn-bot-devdiv-build-rw-code-rw)'
133+
inlineScript: |
134+
param(
135+
[string]$AccessToken
136+
)
137+
$env:AZURE_DEVOPS_EXT_PAT=$AccessToken
138+
$Organization="https://devdiv.visualstudio.com"
139+
$Project="DevDiv"
140+
$Repository="PerfView"
141+
az devops configure --defaults organization=$Organization project=$Project
142+
az repos pr create --repository $Repository --auto-complete true --delete-source-branch true --title "Mirror Changes from GitHub" --source-branch $(MirrorBranch) --target-branch $(SourceBranch)

.pipelines/perfcollect-job.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
steps:
2+
- task: DockerInstaller@0
3+
displayName: 'Install Docker'
4+
5+
- task: Bash@3
6+
displayName: 'Build Containers'
7+
inputs:
8+
targetType: filePath
9+
filePath: './src/perfcollect/tests/build-containers.sh'
10+
workingDirectory: src/perfcollect/tests
11+
12+
- task: Bash@3
13+
displayName: 'Run Tests'
14+
inputs:
15+
targetType: filePath
16+
filePath: './src/perfcollect/tests/run-containers.sh'
17+
workingDirectory: src/perfcollect/tests

.pipelines/perfview-job.yml

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
parameters:
2+
flavor: 'Debug'
3+
4+
steps:
5+
- task: UseDotNet@2
6+
displayName: 'Use .NET SDK'
7+
inputs:
8+
version: 8.0.x
9+
10+
- task: NuGetToolInstaller@1
11+
displayName: 'Install NuGet.exe'
12+
inputs:
13+
versionSpec: 6.3.0
14+
15+
- task: NuGetCommand@2
16+
displayName: 'NuGet Restore PerfView.sln'
17+
inputs:
18+
restoreSolution: PerfView.sln
19+
feedsToUse: config
20+
includeNuGetOrg: false
21+
nugetConfigPath: '.\NuGet.config'
22+
23+
- task: MSBuild@1
24+
displayName: 'Build PerfView.sln'
25+
inputs:
26+
solution: PerfView.sln
27+
configuration: ${{ parameters.flavor }}
28+
29+
- task: VSTest@2
30+
displayName: 'Run Tests'
31+
inputs:
32+
testAssemblyVer2: |
33+
**\bin\**\LinuxTracingTests.dll
34+
**\bin\**\CtfTracingTests.dll
35+
**\bin\**\SymbolsAuthTests.dll
36+
**\bin\**\TraceEventTests.dll
37+
**\bin\**\PerfViewTests.dll
38+
testRunTitle: 'PerfView - ${{ parameters.flavor }}'
39+
runTestsInIsolation: true
40+
otherConsoleOptions: '--blame'
41+
42+
- task: CopyFiles@2
43+
displayName: 'Copy Files to Artifacts Staging'
44+
inputs:
45+
SourceFolder: '$(system.defaultworkingdirectory)'
46+
Contents: '**\bin\${{ parameters.flavor }}\**'
47+
TargetFolder: '$(build.artifactstagingdirectory)'
48+
condition: succeededOrFailed()

.vsconfig

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"version": "1.0",
3+
"components": [
4+
"Microsoft.Net.Component.4.6.2.SDK",
5+
"Microsoft.Net.Component.4.6.2.TargetingPack",
6+
"Microsoft.VisualStudio.Component.VC.Tools.x86.x64",
7+
"Microsoft.VisualStudio.Component.VC.Runtimes.x86.x64.Spectre",
8+
"Microsoft.VisualStudio.Component.Windows10SDK.20348",
9+
"Microsoft.VisualStudio.Component.Windows11SDK.22621",
10+
"Microsoft.VisualStudio.Workload.CoreEditor",
11+
"Microsoft.VisualStudio.Workload.ManagedDesktop",
12+
"Microsoft.VisualStudio.Workload.NativeDesktop"
13+
],
14+
"extensions": []
15+
}

Nuget.config

+9-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
3+
<fallbackPackageFolders>
4+
<clear />
5+
</fallbackPackageFolders>
36
<packageSources>
4-
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
5-
<add key="Local" value=".\src\NugetSupportFiles" />
7+
<clear/>
8+
<add key="dotnet-public" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json" />
9+
<add key="perfview-build" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/perfview-build/nuget/v3/index.json" />
610
</packageSources>
11+
<disabledPackageSources>
12+
<clear />
13+
</disabledPackageSources>
714
</configuration>

0 commit comments

Comments
 (0)