Skip to content

Commit 0f6ccd4

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

File tree

9 files changed

+25
-98
lines changed

9 files changed

+25
-98
lines changed

.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Refer to https://hub.docker.com/_/microsoft-dotnet-sdk for available versions
2-
FROM mcr.microsoft.com/dotnet/sdk:9.0.200-noble
2+
FROM mcr.microsoft.com/dotnet/sdk:9.0.201-noble
33

44
# Installing mono makes `dotnet test` work without errors even for net472.
55
# But installing it takes a long time, so it's excluded by default.

.github/workflows/release.yml

Lines changed: 0 additions & 88 deletions
This file was deleted.

Directory.Packages.props

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@
5050
<GlobalPackageReference Include="CSharpIsNullAnalyzer" Version="0.1.593" />
5151
<GlobalPackageReference Include="DotNetAnalyzers.DocumentationAnalyzers" Version="1.0.0-beta.59" />
5252
<GlobalPackageReference Include="Microsoft.VisualStudio.Internal.MicroBuild.VisualStudio" Version="$(MicroBuildVersion)" />
53-
<!-- The condition works around https://github.com/dotnet/sdk/issues/44951 -->
54-
<GlobalPackageReference Include="Nerdbank.GitVersioning" Version="3.7.115" Condition="!('$(TF_BUILD)'=='true' and '$(dotnetformat)'=='true')" />
53+
<GlobalPackageReference Include="Nerdbank.GitVersioning" Version="3.7.115" />
5554
<GlobalPackageReference Include="PolySharp" Version="1.15.0" Condition="'$(DisablePolyfills)'!='true'" />
5655
<GlobalPackageReference Include="StyleCop.Analyzers.Unstable" Version="1.2.0.556" />
5756
</ItemGroup>

azure-pipelines/build.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ parameters:
7171
type: boolean
7272
default: true
7373

74+
- name: PublishCodeCoverage
75+
type: boolean
76+
default: true
77+
7478
# Whether this is a special one-off build for inserting into VS for a validation insertion PR (that will never be merged).
7579
- name: SkipCodesignVerify
7680
type: boolean
@@ -198,7 +202,7 @@ jobs:
198202
IsOptProf: ${{ parameters.IsOptProf }}
199203

200204
- ${{ if and(parameters.EnableDotNetFormatCheck, not(parameters.EnableLinuxBuild)) }}:
201-
- script: dotnet format --verify-no-changes
205+
- script: dotnet format --verify-no-changes --no-restore
202206
displayName: 💅 Verify formatted code
203207
env:
204208
dotnetformat: true # part of a workaround for https://github.com/dotnet/sdk/issues/44951
@@ -240,7 +244,7 @@ jobs:
240244
Is1ESPT: ${{ parameters.Is1ESPT }}
241245
RunTests: ${{ parameters.RunTests }}
242246
- ${{ if parameters.EnableDotNetFormatCheck }}:
243-
- script: dotnet format --verify-no-changes
247+
- script: dotnet format --verify-no-changes --no-restore
244248
displayName: 💅 Verify formatted code
245249
env:
246250
dotnetformat: true # part of a workaround for https://github.com/dotnet/sdk/issues/44951
@@ -303,7 +307,7 @@ jobs:
303307
parameters:
304308
EnableLinuxBuild: ${{ parameters.EnableLinuxBuild }}
305309
EnableMacOSBuild: ${{ parameters.EnableMacOSBuild }}
306-
- ${{ if parameters.RunTests }}:
310+
- ${{ if and(parameters.RunTests, parameters.PublishCodeCoverage) }}:
307311
- template: publish-codecoverage.yml
308312
parameters:
309313
EnableLinuxBuild: ${{ parameters.EnableLinuxBuild }}

azure-pipelines/dotnet.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ parameters:
88

99
steps:
1010

11-
- script: dotnet build -t:build,pack --no-restore -c $(BuildConfiguration) -warnAsError -warnNotAsError:NU1901,NU1902,NU1903,NU1904 /bl:"$(Build.ArtifactStagingDirectory)/build_logs/build.binlog"
11+
- script: dotnet build -t:build,pack --no-restore -c $(BuildConfiguration) -warnAsError -warnNotAsError:NU1901,NU1902,NU1903,NU1904,LOCTASK002 /bl:"$(Build.ArtifactStagingDirectory)/build_logs/build.binlog"
1212
displayName: 🛠 dotnet build
1313

1414
- ${{ if not(parameters.IsOptProf) }}:

azure-pipelines/official.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ parameters:
2727
displayName: Include APIScan with compliance tools
2828
type: boolean
2929
default: true # enable in individual repos only AFTER updating TSAOptions.json with your own values
30+
- name: PublishCodeCoverage
31+
displayName: Publish code coverage
32+
type: boolean
33+
default: true
3034

3135
resources:
3236
repositories:
@@ -53,7 +57,7 @@ extends:
5357
suppression:
5458
suppressionFile: $(System.DefaultWorkingDirectory)\azure-pipelines\falsepositives.gdnsuppress
5559
sbom:
56-
enabled: true
60+
enabled: false # Skip 1ES SBOM because microbuild has our own sbom system
5761
stages:
5862
- stage: Build
5963
variables:
@@ -77,6 +81,7 @@ extends:
7781
os: macOS
7882
EnableMacOSBuild: ${{ parameters.EnableMacOSBuild }}
7983
RunTests: ${{ parameters.RunTests }}
84+
PublishCodeCoverage: ${{ parameters.PublishCodeCoverage }}
8085
- template: /azure-pipelines/prepare-insertion-stages.yml@self
8186
parameters:
8287
RealSign: true

azure-pipelines/unofficial.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ parameters:
3838
displayName: Enable Production SDL
3939
type: boolean
4040
default: false
41+
- name: PublishCodeCoverage
42+
displayName: Publish code coverage
43+
type: boolean
44+
default: true
4145

4246
resources:
4347
repositories:
@@ -66,7 +70,7 @@ extends:
6670
enabled: ${{ parameters.EnableProductionSDL }}
6771
exclusionsFile: $(System.DefaultWorkingDirectory)\azure-pipelines\PoliCheckExclusions.xml
6872
sbom:
69-
enabled: ${{ parameters.EnableProductionSDL }}
73+
enabled: false # Skip 1ES SBOM because microbuild has our own sbom system
7074
stages:
7175
- stage: Build
7276
variables:
@@ -90,3 +94,4 @@ extends:
9094
os: macOS
9195
EnableMacOSBuild: ${{ parameters.EnableMacOSBuild }}
9296
RunTests: ${{ parameters.RunTests }}
97+
PublishCodeCoverage: ${{ parameters.PublishCodeCoverage }}

azure-pipelines/vs-insertion.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ extends:
3232
- job: insertion
3333
displayName: VS insertion
3434
pool: VSEngSS-MicroBuild2022-1ES
35+
templateContext:
36+
outputParentDirectory: $(Pipeline.Workspace)/CI
3537
steps:
3638
- checkout: none
3739
- powershell: Write-Host "##vso[build.updatebuildnumber]$(resources.pipeline.CI.runName)"

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"sdk": {
3-
"version": "9.0.200",
3+
"version": "9.0.201",
44
"rollForward": "patch",
55
"allowPrerelease": false
66
},

0 commit comments

Comments
 (0)