Skip to content

Commit dc93f45

Browse files
committed
Merge the microbuild branch from https://github.com/aarnott/Library.Template
Specifically, this merges [af0a762 from that repo](AArnott/Library.Template@af0a762).
2 parents c281ba3 + af0a762 commit dc93f45

19 files changed

+128
-125
lines changed

.config/dotnet-tools.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"isRoot": true,
44
"tools": {
55
"powershell": {
6-
"version": "7.5.3",
6+
"version": "7.5.4",
77
"commands": [
88
"pwsh"
99
],
@@ -17,14 +17,14 @@
1717
"rollForward": false
1818
},
1919
"nbgv": {
20-
"version": "3.8.118",
20+
"version": "3.9.50",
2121
"commands": [
2222
"nbgv"
2323
],
2424
"rollForward": false
2525
},
2626
"docfx": {
27-
"version": "2.78.3",
27+
"version": "2.78.4",
2828
"commands": [
2929
"docfx"
3030
],

.github/actions/publish-artifacts/action.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,46 +14,46 @@ runs:
1414

1515
- name: 📢 Upload project.assets.json files
1616
if: always()
17-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
17+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
1818
with:
1919
name: projectAssetsJson-${{ runner.os }}
2020
path: ${{ runner.temp }}/_artifacts/projectAssetsJson
2121
continue-on-error: true
2222
- name: 📢 Upload variables
23-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
23+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
2424
with:
2525
name: variables-${{ runner.os }}
2626
path: ${{ runner.temp }}/_artifacts/Variables
2727
continue-on-error: true
2828
- name: 📢 Upload build_logs
2929
if: always()
30-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
30+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
3131
with:
3232
name: build_logs-${{ runner.os }}
3333
path: ${{ runner.temp }}/_artifacts/build_logs
3434
continue-on-error: true
3535
- name: 📢 Upload testResults
3636
if: always()
37-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
37+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
3838
with:
3939
name: testResults-${{ runner.os }}
4040
path: ${{ runner.temp }}/_artifacts/testResults
4141
continue-on-error: true
4242
- name: 📢 Upload coverageResults
4343
if: always()
44-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
44+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
4545
with:
4646
name: coverageResults-${{ runner.os }}
4747
path: ${{ runner.temp }}/_artifacts/coverageResults
4848
continue-on-error: true
4949
- name: 📢 Upload symbols
50-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
50+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
5151
with:
5252
name: symbols-${{ runner.os }}
5353
path: ${{ runner.temp }}/_artifacts/symbols
5454
continue-on-error: true
5555
- name: 📢 Upload deployables
56-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
56+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
5757
with:
5858
name: deployables-${{ runner.os }}
5959
path: ${{ runner.temp }}/_artifacts/deployables

.github/workflows/docs_validate.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,3 @@ jobs:
2727
shell: pwsh
2828
- name: 📚 Verify docfx build
2929
run: dotnet docfx docfx/docfx.json --warningsAsErrors --disableGitFeatures
30-
if: runner.os == 'Linux'

Directory.Build.props

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
1616
<GenerateDocumentationFile>true</GenerateDocumentationFile>
1717
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
18+
<RestoreEnablePackagePruning>true</RestoreEnablePackagePruning>
1819

1920
<!-- https://learn.microsoft.com/en-us/dotnet/fundamentals/apicompat/package-validation/overview -->
2021
<EnablePackageValidation>true</EnablePackageValidation>
@@ -43,7 +44,7 @@
4344
</PropertyGroup>
4445

4546
<PropertyGroup>
46-
<LangVersion Condition="'$(MSBuildProjectExtension)'=='.csproj'">13</LangVersion>
47+
<LangVersion Condition="'$(MSBuildProjectExtension)'=='.csproj'">14</LangVersion>
4748
<LangVersion Condition="'$(MSBuildProjectExtension)'=='.vbproj'">16.9</LangVersion>
4849
</PropertyGroup>
4950

Directory.Packages.props

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@
55
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
66
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
77

8-
<MicroBuildVersion>2.0.201</MicroBuildVersion>
8+
<MicroBuildVersion>2.0.208</MicroBuildVersion>
99
</PropertyGroup>
1010
<ItemGroup>
1111
<PackageVersion Include="Microsoft.CodeAnalysis.ResxSourceGenerator" Version="3.11.0-beta1.25076.3" />
1212
<PackageVersion Include="Moq" Version="4.20.72" />
1313
</ItemGroup>
1414
<ItemGroup Label="Library.Template">
15-
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.0.0" />
15+
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
1616
<PackageVersion Include="Microsoft.VisualStudio.Internal.MicroBuild.NonShipping" Version="$(MicroBuildVersion)" />
1717
<PackageVersion Include="xunit.runner.visualstudio" Version="3.1.5" />
18-
<PackageVersion Include="xunit.v3" Version="3.1.0" />
18+
<PackageVersion Include="xunit.v3" Version="3.2.0" />
1919
</ItemGroup>
2020
<ItemGroup>
2121
<!-- Put repo-specific GlobalPackageReference items in this group. -->
@@ -25,7 +25,7 @@
2525
<GlobalPackageReference Include="DotNetAnalyzers.DocumentationAnalyzers" Version="1.0.0-beta.59" />
2626
<GlobalPackageReference Include="Microsoft.VisualStudio.Internal.MicroBuild.VisualStudio" Version="$(MicroBuildVersion)" />
2727
<!-- The condition works around https://github.com/dotnet/sdk/issues/44951 -->
28-
<GlobalPackageReference Include="Nerdbank.GitVersioning" Version="3.8.118" Condition="!('$(TF_BUILD)'=='true' and '$(dotnetformat)'=='true')" />
28+
<GlobalPackageReference Include="Nerdbank.GitVersioning" Version="3.9.50" Condition="!('$(TF_BUILD)'=='true' and '$(dotnetformat)'=='true')" />
2929
<GlobalPackageReference Include="PolySharp" Version="1.15.0" />
3030
<GlobalPackageReference Include="StyleCop.Analyzers.Unstable" Version="1.2.0.556" />
3131
</ItemGroup>

Microsoft.VisualStudio.Validation.sln

Lines changed: 0 additions & 62 deletions
This file was deleted.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<Solution>
2+
<Folder Name="/Solution Items/">
3+
<File Path=".config/dotnet-tools.json" />
4+
<File Path=".editorconfig" />
5+
<File Path="Directory.Build.props" />
6+
<File Path="Directory.Build.targets" />
7+
<File Path="Directory.Packages.props" />
8+
<File Path="global.json" />
9+
<File Path="nuget.config" />
10+
<File Path="stylecop.json" />
11+
<File Path="version.json" />
12+
</Folder>
13+
<Folder Name="/src/">
14+
<File Path="src/.editorconfig" />
15+
<File Path="src/Directory.Build.props" />
16+
<File Path="src/Directory.Build.targets" />
17+
<Project Path="src/Microsoft.VisualStudio.Validation/Microsoft.VisualStudio.Validation.csproj" />
18+
</Folder>
19+
<Folder Name="/test/">
20+
<File Path="test/.editorconfig" />
21+
<File Path="test/Directory.Build.props" />
22+
<File Path="test/Directory.Build.targets" />
23+
<Project Path="test/Microsoft.VisualStudio.Validation.Tests/Microsoft.VisualStudio.Validation.Tests.csproj" />
24+
</Folder>
25+
</Solution>

azure-pipelines/OptProf.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ stages:
9797
TeamEmail: $(TeamEmail)
9898
SkipCreatePR: true
9999
CustomScriptExecutionCommand: src\VSSDK\NuGet\AllowUnstablePackages.ps1
100+
${{ if eq(variables['system.collectionId'], '011b8bdf-6d56-4f87-be0d-0092136884d9') }}:
101+
ConnectedVSDropServiceName: 'VSEng-VSDrop-MI'
102+
env:
103+
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
100104
- task: benjhuser.tfs-extensions-build-tasks.trigger-build-task.TriggerBuild@3
101105
displayName: Trigger a new build of DD-CB-TestSignVS-devCI
102106
inputs:

azure-pipelines/build.yml

Lines changed: 58 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,17 @@ parameters:
2929
- name: artifact_names
3030
type: object
3131
default:
32-
- build_logs
33-
- coverageResults
34-
- deployables
35-
- projectAssetsJson
36-
- symbols
37-
- testResults
38-
- test_symbols
39-
- Variables
32+
- name: build_logs
33+
- name: coverageResults
34+
- name: deployables
35+
sbomEnabled: true
36+
- name: projectAssetsJson
37+
- name: symbols
38+
- name: testResults
39+
testOnly: true
40+
- name: test_symbols
41+
testOnly: true
42+
- name: Variables
4043
# The Enable*Build parameters turn non-Windows agents on or off.
4144
# Their default value should be based on whether the build and tests are expected/required to pass on that platform.
4245
# Callers (e.g. Official.yml) *may* expose these parameters at queue-time in order to turn OFF optional agents.
@@ -57,6 +60,11 @@ parameters:
5760
- name: Is1ESPT
5861
type: boolean
5962

63+
# Indicates whether the 'official' 1ES PT templates are being used (as opposed to the unofficial ones).
64+
- name: Is1ESPTOfficial
65+
type: boolean
66+
default: false
67+
6068
- name: RealSign
6169
type: boolean
6270
default: false
@@ -148,13 +156,21 @@ jobs:
148156

149157
outputParentDirectory: $(Build.ArtifactStagingDirectory)
150158
outputs:
151-
- ${{ each artifact_name in parameters.artifact_names }}:
152-
- ${{ if or(ne(artifact_name, 'testResults'), parameters.RunTests) }}:
159+
- ${{ each artifact in parameters.artifact_names }}:
160+
- ${{ if or(ne(artifact.testOnly, 'true'), parameters.RunTests) }}:
153161
- output: pipelineArtifact
154-
displayName: 📢 Publish ${{ artifact_name }}-Windows
155-
targetPath: $(Build.ArtifactStagingDirectory)/${{ artifact_name }}-Windows
156-
artifactName: ${{ artifact_name }}-Windows
157-
condition: succeededOrFailed()
162+
displayName: 📢 Publish ${{ artifact.name }}-Windows
163+
targetPath: $(Build.ArtifactStagingDirectory)/${{ artifact.name }}-Windows
164+
artifactName: ${{ artifact.name }}-Windows
165+
${{ if and(parameters.Is1ESPTOfficial, eq(artifact.sbomEnabled, 'true')) }}:
166+
sbomEnabled: true
167+
- output: pipelineArtifact
168+
displayName: 📢 Publish ${{ artifact.name }}-Windows (for failed attempts)
169+
targetPath: $(Build.ArtifactStagingDirectory)/${{ artifact.name }}-Windows
170+
artifactName: ${{ artifact.name }}-Windows-$(System.PhaseAttempt)
171+
${{ if and(parameters.Is1ESPTOfficial, eq(artifact.sbomEnabled, 'true')) }}:
172+
sbomEnabled: true
173+
condition: failed()
158174
- output: pipelineArtifact
159175
displayName: 📢 Publish VSInsertion-Windows
160176
targetPath: $(Build.ArtifactStagingDirectory)/VSInsertion-Windows
@@ -191,7 +207,6 @@ jobs:
191207
- template: microbuild.before.yml
192208
parameters:
193209
EnableLocalization: ${{ parameters.EnableLocalization }}
194-
EnableOptProf: ${{ parameters.EnableOptProf }}
195210
IsOptProf: ${{ parameters.IsOptProf }}
196211
ShouldSkipOptimize: ${{ parameters.ShouldSkipOptimize }}
197212
RealSign: ${{ parameters.RealSign }}
@@ -211,7 +226,6 @@ jobs:
211226
- ${{ if eq(variables['system.collectionId'], '011b8bdf-6d56-4f87-be0d-0092136884d9') }}:
212227
- template: microbuild.after.yml
213228
parameters:
214-
EnableOptProf: ${{ parameters.EnableOptProf }}
215229
IsOptProf: ${{ parameters.IsOptProf }}
216230
SkipCodesignVerify: ${{ parameters.SkipCodesignVerify }}
217231

@@ -229,13 +243,21 @@ jobs:
229243
signWithProd: true
230244
outputParentDirectory: $(Build.ArtifactStagingDirectory)
231245
outputs:
232-
- ${{ each artifact_name in parameters.artifact_names }}:
233-
- ${{ if or(ne(artifact_name, 'testResults'), parameters.RunTests) }}:
246+
- ${{ each artifact in parameters.artifact_names }}:
247+
- ${{ if or(ne(artifact.testOnly, 'true'), parameters.RunTests) }}:
248+
- output: pipelineArtifact
249+
displayName: 📢 Publish ${{ artifact.name }}-Linux
250+
targetPath: $(Build.ArtifactStagingDirectory)/${{ artifact.name }}-Linux
251+
artifactName: ${{ artifact.name }}-Linux
252+
${{ if and(parameters.Is1ESPTOfficial, eq(artifact.sbomEnabled, 'true')) }}:
253+
sbomEnabled: true
234254
- output: pipelineArtifact
235-
displayName: 📢 Publish ${{ artifact_name }}-Linux
236-
targetPath: $(Build.ArtifactStagingDirectory)/${{ artifact_name }}-Linux
237-
artifactName: ${{ artifact_name }}-Linux
238-
condition: succeededOrFailed()
255+
displayName: 📢 Publish ${{ artifact.name }}-Linux (for failed attempts)
256+
targetPath: $(Build.ArtifactStagingDirectory)/${{ artifact.name }}-Linux
257+
artifactName: ${{ artifact.name }}-Linux-$(System.PhaseAttempt)
258+
${{ if and(parameters.Is1ESPTOfficial, eq(artifact.sbomEnabled, 'true')) }}:
259+
sbomEnabled: true
260+
condition: failed()
239261
steps:
240262
- checkout: self
241263
fetchDepth: 0 # avoid shallow clone so nbgv can do its work.
@@ -265,13 +287,21 @@ jobs:
265287
signWithProd: true
266288
outputParentDirectory: $(Build.ArtifactStagingDirectory)
267289
outputs:
268-
- ${{ each artifact_name in parameters.artifact_names }}:
269-
- ${{ if or(ne(artifact_name, 'testResults'), parameters.RunTests) }}:
290+
- ${{ each artifact in parameters.artifact_names }}:
291+
- ${{ if or(ne(artifact.testOnly, 'true'), parameters.RunTests) }}:
292+
- output: pipelineArtifact
293+
displayName: 📢 Publish ${{ artifact.name }}-macOS
294+
targetPath: $(Build.ArtifactStagingDirectory)/${{ artifact.name }}-macOS
295+
artifactName: ${{ artifact.name }}-macOS
296+
${{ if and(parameters.Is1ESPTOfficial, eq(artifact.sbomEnabled, 'true')) }}:
297+
sbomEnabled: true
270298
- output: pipelineArtifact
271-
displayName: 📢 Publish ${{ artifact_name }}-macOS
272-
targetPath: $(Build.ArtifactStagingDirectory)/${{ artifact_name }}-macOS
273-
artifactName: ${{ artifact_name }}-macOS
274-
condition: succeededOrFailed()
299+
displayName: 📢 Publish ${{ artifact.name }}-macOS (for failed attempts)
300+
targetPath: $(Build.ArtifactStagingDirectory)/${{ artifact.name }}-macOS
301+
artifactName: ${{ artifact.name }}-macOS-$(System.PhaseAttempt)
302+
${{ if and(parameters.Is1ESPTOfficial, eq(artifact.sbomEnabled, 'true')) }}:
303+
sbomEnabled: true
304+
condition: failed()
275305
steps:
276306
- checkout: self
277307
fetchDepth: 0 # avoid shallow clone so nbgv can do its work.

azure-pipelines/microbuild.after.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
parameters:
2-
- name: EnableOptProf
3-
type: boolean
4-
default: false
52
- name: IsOptProf
63
type: boolean
74
default: false

0 commit comments

Comments
 (0)