Skip to content

Merge latest Library.Template #316

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 29 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
5724fef
Update Dockerfile and global.json updates to v9.0.200
renovate[bot] Feb 12, 2025
c24a8f0
Update dependency dotnet-coverage to 17.14.1
renovate[bot] Feb 19, 2025
0527720
Update dependency docfx to 2.78.3 (#351)
renovate[bot] Feb 20, 2025
e98ff17
Merge remote-tracking branch 'origin/main' into microbuild
AArnott Feb 21, 2025
077bfc3
Do not verify signed binaries in LocBin artifact
AArnott Feb 26, 2025
81ff341
Add placeholder option for vs-validation to skip optimization
AArnott Feb 26, 2025
0fb1dde
Update dependency dotnet-coverage to 17.14.2 (#352)
renovate[bot] Feb 27, 2025
161bac9
Fix GitHub release workflow in dispatched runs
AArnott Mar 3, 2025
17a708e
Merge remote-tracking branch 'origin/main' into microbuild
AArnott Mar 3, 2025
1e00ddc
Drop semanticCommits setting from renovate.json
AArnott Mar 4, 2025
67128e5
Merge branch 'main' into microbuild
AArnott Mar 4, 2025
1cc3b97
Switch to renovate rules from Microsoft presets
AArnott Mar 4, 2025
164ff31
Do not fail on missing LCL files in official builds
AArnott Mar 8, 2025
46e768b
Revert "Avoid `dotnet format` hang"
AArnott Mar 10, 2025
6ed2f36
Consolidate SDL tasks for insertion job
AArnott Mar 10, 2025
65f8440
Disable redundant 1ES SBOM task
AArnott Mar 10, 2025
039ac0b
Put publishing code coverage under a switch
AArnott Mar 10, 2025
845a785
Merge pull request #354 from AArnott/optimizations
AArnott Mar 10, 2025
e1e35f1
Merge remote-tracking branch 'origin/main' into microbuild
AArnott Mar 10, 2025
dcc2963
Drop github release workflow
AArnott Mar 12, 2025
e5d6527
Merge pull request #355 from AArnott/renovate/dockerfile-and-global.j…
renovate[bot] Mar 12, 2025
6307413
Merge remote-tracking branch 'origin/main' into microbuild
AArnott Mar 14, 2025
24a6e2b
Build renovate settings on the best-practices preset (#357)
AArnott Mar 19, 2025
408618f
Update Dockerfile and global.json updates to v9.0.202 (#356)
renovate[bot] Mar 19, 2025
8d800dc
Merge remote-tracking branch 'origin/main' into microbuild
AArnott Mar 19, 2025
b8573cf
Pin dependencies (#358)
renovate[bot] Mar 19, 2025
4569224
Pin mcr.microsoft.com/dotnet/sdk Docker tag to 332e036 (#359)
renovate[bot] Mar 19, 2025
c90816a
Merge remote-tracking branch 'origin/main' into microbuild
AArnott Mar 19, 2025
c256f07
Merge the microbuild branch from https://github.com/aarnott/Library.T…
AArnott Mar 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"rollForward": false
},
"dotnet-coverage": {
"version": "17.13.1",
"version": "17.14.2",
"commands": [
"dotnet-coverage"
],
Expand All @@ -24,7 +24,7 @@
"rollForward": false
},
"docfx": {
"version": "2.78.2",
"version": "2.78.3",
"commands": [
"docfx"
],
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Refer to https://hub.docker.com/_/microsoft-dotnet-sdk for available versions
FROM mcr.microsoft.com/dotnet/sdk:9.0.102-noble
FROM mcr.microsoft.com/dotnet/sdk:9.0.202-noble@sha256:332e0362dd210a10348d436a5fb7f87aeec28c2c53ac2c3c2659e57c22294d0e

# Installing mono makes `dotnet test` work without errors even for net472.
# But installing it takes a long time, so it's excluded by default.
Expand Down
14 changes: 7 additions & 7 deletions .github/actions/publish-artifacts/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,46 +14,46 @@ runs:

- name: 📢 Upload project.assets.json files
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: projectAssetsJson-${{ runner.os }}
path: ${{ runner.temp }}/_artifacts/projectAssetsJson
continue-on-error: true
- name: 📢 Upload variables
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: variables-${{ runner.os }}
path: ${{ runner.temp }}/_artifacts/Variables
continue-on-error: true
- name: 📢 Upload build_logs
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: build_logs-${{ runner.os }}
path: ${{ runner.temp }}/_artifacts/build_logs
continue-on-error: true
- name: 📢 Upload testResults
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: testResults-${{ runner.os }}
path: ${{ runner.temp }}/_artifacts/testResults
continue-on-error: true
- name: 📢 Upload coverageResults
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: coverageResults-${{ runner.os }}
path: ${{ runner.temp }}/_artifacts/coverageResults
continue-on-error: true
- name: 📢 Upload symbols
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: symbols-${{ runner.os }}
path: ${{ runner.temp }}/_artifacts/symbols
continue-on-error: true
- name: 📢 Upload deployables
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: deployables-${{ runner.os }}
path: ${{ runner.temp }}/_artifacts/deployables
Expand Down
54 changes: 5 additions & 49 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -1,52 +1,8 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:recommended"],
"semanticCommits": "disabled",
"labels": ["dependencies"],
"packageRules": [
{
"matchPackageNames": ["nbgv", "nerdbank.gitversioning"],
"groupName": "nbgv and nerdbank.gitversioning updates"
},
{
"matchPackageNames": ["xunit*"],
"groupName": "xunit"
},
{
"matchDatasources": ["dotnet-version", "docker"],
"matchDepNames": ["dotnet-sdk", "mcr.microsoft.com/dotnet/sdk"],
"groupName": "Dockerfile and global.json updates"
},
{
"matchPackageNames": ["*"],
"allowedVersions": "!/-g[a-f0-9]+$/"
},
{
"matchPackageNames": [
"System.Collections.Immutable",
"System.Composition*",
"System.Diagnostics.DiagnosticSource",
"System.IO.Pipelines",
"System.Reflection.Metadata",
"System.Text.Json",
"System.Threading.Tasks.Dataflow",
"Microsoft.Bcl.AsyncInterfaces"
],
"allowedVersions": "<9.0",
"groupName": "Included in .NET runtime"
},
{
"matchPackageNames": ["Microsoft.VisualStudio.Internal.MicroBuild*"],
"groupName": "microbuild"
},
{
"matchPackageNames": ["Microsoft.VisualStudio.*"],
"groupName": "Visual Studio SDK"
},
{
"matchPackageNames": ["Microsoft.VisualStudio.*"],
"matchUpdateTypes": ["patch"],
"enabled": false
}
]
"extends": [
"github>microsoft/vs-renovate-presets:microbuild",
"github>microsoft/vs-renovate-presets:vs_main_dependencies"
],
"packageRules": []
}
6 changes: 3 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
- name: ⚙ Install prerequisites
Expand All @@ -35,10 +35,10 @@ jobs:
name: 📚 Generate documentation

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3
with:
path: docfx/_site

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4
2 changes: 1 addition & 1 deletion .github/workflows/libtemplate-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.

Expand Down
88 changes: 0 additions & 88 deletions .github/workflows/release.yml

This file was deleted.

3 changes: 1 addition & 2 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@
<GlobalPackageReference Include="CSharpIsNullAnalyzer" Version="0.1.593" />
<GlobalPackageReference Include="DotNetAnalyzers.DocumentationAnalyzers" Version="1.0.0-beta.59" />
<GlobalPackageReference Include="Microsoft.VisualStudio.Internal.MicroBuild.VisualStudio" Version="$(MicroBuildVersion)" />
<!-- The condition works around https://github.com/dotnet/sdk/issues/44951 -->
<GlobalPackageReference Include="Nerdbank.GitVersioning" Version="3.7.115" Condition="!('$(TF_BUILD)'=='true' and '$(dotnetformat)'=='true')" />
<GlobalPackageReference Include="Nerdbank.GitVersioning" Version="3.7.115" />
<GlobalPackageReference Include="PolySharp" Version="1.15.0" />
<GlobalPackageReference Include="StyleCop.Analyzers.Unstable" Version="1.2.0.556" />
</ItemGroup>
Expand Down
10 changes: 7 additions & 3 deletions azure-pipelines/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ parameters:
type: boolean
default: true

- name: PublishCodeCoverage
type: boolean
default: true

# Whether this is a special one-off build for inserting into VS for a validation insertion PR (that will never be merged).
- name: SkipCodesignVerify
type: boolean
Expand Down Expand Up @@ -194,7 +198,7 @@ jobs:
IsOptProf: ${{ parameters.IsOptProf }}

- ${{ if and(parameters.EnableDotNetFormatCheck, not(parameters.EnableLinuxBuild)) }}:
- script: dotnet format --verify-no-changes
- script: dotnet format --verify-no-changes --no-restore
displayName: 💅 Verify formatted code
env:
dotnetformat: true # part of a workaround for https://github.com/dotnet/sdk/issues/44951
Expand Down Expand Up @@ -236,7 +240,7 @@ jobs:
Is1ESPT: ${{ parameters.Is1ESPT }}
RunTests: ${{ parameters.RunTests }}
- ${{ if parameters.EnableDotNetFormatCheck }}:
- script: dotnet format --verify-no-changes
- script: dotnet format --verify-no-changes --no-restore
displayName: 💅 Verify formatted code
env:
dotnetformat: true # part of a workaround for https://github.com/dotnet/sdk/issues/44951
Expand Down Expand Up @@ -299,7 +303,7 @@ jobs:
parameters:
EnableLinuxBuild: ${{ parameters.EnableLinuxBuild }}
EnableMacOSBuild: ${{ parameters.EnableMacOSBuild }}
- ${{ if parameters.RunTests }}:
- ${{ if and(parameters.RunTests, parameters.PublishCodeCoverage) }}:
- template: publish-codecoverage.yml
parameters:
EnableLinuxBuild: ${{ parameters.EnableLinuxBuild }}
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ parameters:

steps:

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

- ${{ if not(parameters.IsOptProf) }}:
Expand Down
9 changes: 7 additions & 2 deletions azure-pipelines/official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ parameters:
displayName: Include APIScan with compliance tools
type: boolean
default: true
- name: PublishCodeCoverage
displayName: Publish code coverage
type: boolean
default: true

resources:
repositories:
Expand All @@ -47,14 +51,14 @@ extends:
codeSignValidation:
enabled: true
break: true
additionalTargetsGlobPattern: -|Variables-*\*.ps1;-|APIScanInputs-*\**;-|test_symbols-*\**;-|MicroBuild\**
additionalTargetsGlobPattern: -|Variables-*\*.ps1;-|LocBin-*\**;-|APIScanInputs-*\**;-|test_symbols-*\**;-|MicroBuild\**
policheck:
enabled: true
exclusionsFile: $(System.DefaultWorkingDirectory)\azure-pipelines\PoliCheckExclusions.xml
suppression:
suppressionFile: $(System.DefaultWorkingDirectory)\azure-pipelines\falsepositives.gdnsuppress
sbom:
enabled: true
enabled: false # Skip 1ES SBOM because microbuild has our own sbom system
stages:
- stage: Build
variables:
Expand All @@ -78,6 +82,7 @@ extends:
os: macOS
EnableMacOSBuild: ${{ parameters.EnableMacOSBuild }}
RunTests: ${{ parameters.RunTests }}
PublishCodeCoverage: ${{ parameters.PublishCodeCoverage }}
- template: /azure-pipelines/prepare-insertion-stages.yml@self
parameters:
RealSign: true
7 changes: 6 additions & 1 deletion azure-pipelines/unofficial.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ parameters:
displayName: Enable Production SDL
type: boolean
default: false
- name: PublishCodeCoverage
displayName: Publish code coverage
type: boolean
default: true

resources:
repositories:
Expand Down Expand Up @@ -64,7 +68,7 @@ extends:
enabled: ${{ parameters.EnableProductionSDL }}
exclusionsFile: $(System.DefaultWorkingDirectory)\azure-pipelines\PoliCheckExclusions.xml
sbom:
enabled: ${{ parameters.EnableProductionSDL }}
enabled: false # Skip 1ES SBOM because microbuild has our own sbom system
stages:
- stage: Build
variables:
Expand All @@ -88,3 +92,4 @@ extends:
os: macOS
EnableMacOSBuild: ${{ parameters.EnableMacOSBuild }}
RunTests: ${{ parameters.RunTests }}
PublishCodeCoverage: ${{ parameters.PublishCodeCoverage }}
2 changes: 2 additions & 0 deletions azure-pipelines/vs-insertion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ extends:
- job: insertion
displayName: VS insertion
pool: VSEngSS-MicroBuild2022-1ES
templateContext:
outputParentDirectory: $(Pipeline.Workspace)/CI
steps:
- checkout: none
- powershell: Write-Host "##vso[build.updatebuildnumber]$(resources.pipeline.CI.runName)"
Expand Down
Loading