Skip to content

Commit 2450cb2

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 45dad1e + af0a762 commit 2450cb2

18 files changed

+126
-67
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>
@@ -40,7 +41,7 @@
4041
</PropertyGroup>
4142

4243
<PropertyGroup>
43-
<LangVersion Condition="'$(MSBuildProjectExtension)'=='.csproj'">13</LangVersion>
44+
<LangVersion Condition="'$(MSBuildProjectExtension)'=='.csproj'">14</LangVersion>
4445
<LangVersion Condition="'$(MSBuildProjectExtension)'=='.vbproj'">16.9</LangVersion>
4546
</PropertyGroup>
4647

Directory.Packages.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<PropertyGroup>
55
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
66
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
7-
<MicroBuildVersion>2.0.201</MicroBuildVersion>
7+
<MicroBuildVersion>2.0.208</MicroBuildVersion>
88
<CodeAnalysisVersion>3.11.0</CodeAnalysisVersion>
99
<CodeAnalysisVersionForTests>4.13.0</CodeAnalysisVersionForTests>
1010
<CodefixTestingVersion>1.1.2</CodefixTestingVersion>
@@ -48,7 +48,7 @@
4848
<PackageVersion Update="Microsoft.CodeAnalysis.VisualBasic" Version="$(CodeAnalysisVersionForTests)" />
4949
</ItemGroup>
5050
<ItemGroup Label="Library.Template">
51-
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.0.0" />
51+
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
5252
<PackageVersion Include="Microsoft.VisualStudio.Internal.MicroBuild.NonShipping" Version="$(MicroBuildVersion)" />
5353
<PackageVersion Include="xunit.runner.visualstudio" Version="3.1.5" />
5454
<PackageVersion Include="xunit" Version="2.9.3" />
@@ -61,7 +61,7 @@
6161
<GlobalPackageReference Include="DotNetAnalyzers.DocumentationAnalyzers" Version="1.0.0-beta.59" />
6262
<GlobalPackageReference Include="Microsoft.VisualStudio.Internal.MicroBuild.VisualStudio" Version="$(MicroBuildVersion)" />
6363
<!-- The condition works around https://github.com/dotnet/sdk/issues/44951 -->
64-
<GlobalPackageReference Include="Nerdbank.GitVersioning" Version="3.8.118" Condition="!('$(TF_BUILD)'=='true' and '$(dotnetformat)'=='true')" />
64+
<GlobalPackageReference Include="Nerdbank.GitVersioning" Version="3.9.50" Condition="!('$(TF_BUILD)'=='true' and '$(dotnetformat)'=='true')" />
6565
<GlobalPackageReference Include="PolySharp" Version="1.15.0" />
6666
<GlobalPackageReference Include="StyleCop.Analyzers.Unstable" Version="1.2.0.556" />
6767
</ItemGroup>

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 }}
@@ -212,7 +227,6 @@ jobs:
212227
- ${{ if eq(variables['system.collectionId'], '011b8bdf-6d56-4f87-be0d-0092136884d9') }}:
213228
- template: microbuild.after.yml
214229
parameters:
215-
EnableOptProf: ${{ parameters.EnableOptProf }}
216230
IsOptProf: ${{ parameters.IsOptProf }}
217231
SkipCodesignVerify: ${{ parameters.SkipCodesignVerify }}
218232

@@ -230,13 +244,21 @@ jobs:
230244
signWithProd: true
231245
outputParentDirectory: $(Build.ArtifactStagingDirectory)
232246
outputs:
233-
- ${{ each artifact_name in parameters.artifact_names }}:
234-
- ${{ if or(ne(artifact_name, 'testResults'), parameters.RunTests) }}:
247+
- ${{ each artifact in parameters.artifact_names }}:
248+
- ${{ if or(ne(artifact.testOnly, 'true'), parameters.RunTests) }}:
249+
- output: pipelineArtifact
250+
displayName: 📢 Publish ${{ artifact.name }}-Linux
251+
targetPath: $(Build.ArtifactStagingDirectory)/${{ artifact.name }}-Linux
252+
artifactName: ${{ artifact.name }}-Linux
253+
${{ if and(parameters.Is1ESPTOfficial, eq(artifact.sbomEnabled, 'true')) }}:
254+
sbomEnabled: true
235255
- output: pipelineArtifact
236-
displayName: 📢 Publish ${{ artifact_name }}-Linux
237-
targetPath: $(Build.ArtifactStagingDirectory)/${{ artifact_name }}-Linux
238-
artifactName: ${{ artifact_name }}-Linux
239-
condition: succeededOrFailed()
256+
displayName: 📢 Publish ${{ artifact.name }}-Linux (for failed attempts)
257+
targetPath: $(Build.ArtifactStagingDirectory)/${{ artifact.name }}-Linux
258+
artifactName: ${{ artifact.name }}-Linux-$(System.PhaseAttempt)
259+
${{ if and(parameters.Is1ESPTOfficial, eq(artifact.sbomEnabled, 'true')) }}:
260+
sbomEnabled: true
261+
condition: failed()
240262
steps:
241263
- checkout: self
242264
fetchDepth: 0 # avoid shallow clone so nbgv can do its work.
@@ -267,13 +289,21 @@ jobs:
267289
signWithProd: true
268290
outputParentDirectory: $(Build.ArtifactStagingDirectory)
269291
outputs:
270-
- ${{ each artifact_name in parameters.artifact_names }}:
271-
- ${{ if or(ne(artifact_name, 'testResults'), parameters.RunTests) }}:
292+
- ${{ each artifact in parameters.artifact_names }}:
293+
- ${{ if or(ne(artifact.testOnly, 'true'), parameters.RunTests) }}:
294+
- output: pipelineArtifact
295+
displayName: 📢 Publish ${{ artifact.name }}-macOS
296+
targetPath: $(Build.ArtifactStagingDirectory)/${{ artifact.name }}-macOS
297+
artifactName: ${{ artifact.name }}-macOS
298+
${{ if and(parameters.Is1ESPTOfficial, eq(artifact.sbomEnabled, 'true')) }}:
299+
sbomEnabled: true
272300
- output: pipelineArtifact
273-
displayName: 📢 Publish ${{ artifact_name }}-macOS
274-
targetPath: $(Build.ArtifactStagingDirectory)/${{ artifact_name }}-macOS
275-
artifactName: ${{ artifact_name }}-macOS
276-
condition: succeededOrFailed()
301+
displayName: 📢 Publish ${{ artifact.name }}-macOS (for failed attempts)
302+
targetPath: $(Build.ArtifactStagingDirectory)/${{ artifact.name }}-macOS
303+
artifactName: ${{ artifact.name }}-macOS-$(System.PhaseAttempt)
304+
${{ if and(parameters.Is1ESPTOfficial, eq(artifact.sbomEnabled, 'true')) }}:
305+
sbomEnabled: true
306+
condition: failed()
277307
steps:
278308
- checkout: self
279309
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

azure-pipelines/microbuild.before.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ parameters:
22
- name: EnableLocalization
33
type: boolean
44
default: false
5-
- name: EnableOptProf
6-
type: boolean
7-
default: false
85
- name: IsOptProf
96
type: boolean
107
default: false
@@ -26,7 +23,7 @@ steps:
2623
inputs:
2724
outputfile: $(System.DefaultWorkingDirectory)/obj/NOTICE
2825
outputformat: text
29-
retryCountOnTaskFailure: 3 # fails when the cloud service is overloaded
26+
retryCountOnTaskFailure: 10 # fails when the cloud service is overloaded
3027
continueOnError: ${{ not(parameters.RealSign) }} # Tolerate failures when we're not building something that may ship.
3128

3229
- ${{ if parameters.IsOptProf }}:

azure-pipelines/official.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ extends:
6868
- template: /azure-pipelines/build.yml@self
6969
parameters:
7070
Is1ESPT: true
71+
Is1ESPTOfficial: true
7172
RealSign: true
7273
ShouldSkipOptimize: ${{ parameters.ShouldSkipOptimize }}
7374
EnableAPIScan: ${{ parameters.EnableAPIScan }}

0 commit comments

Comments
 (0)