From 7f14687b14264f5919b03676b7937546f4b5a6cf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Nov 2024 07:53:33 -0700 Subject: [PATCH 001/110] Bump docfx from 2.77.0 to 2.78.0 (#311) Bumps [docfx](https://github.com/dotnet/docfx) from 2.77.0 to 2.78.0. - [Release notes](https://github.com/dotnet/docfx/releases) - [Changelog](https://github.com/dotnet/docfx/blob/main/RELEASENOTE.md) - [Commits](https://github.com/dotnet/docfx/compare/v2.77.0...v2.78.0) --- updated-dependencies: - dependency-name: docfx dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .config/dotnet-tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index a333e70b..85b44b22 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -24,7 +24,7 @@ "rollForward": false }, "docfx": { - "version": "2.77.0", + "version": "2.78.0", "commands": [ "docfx" ], From 64483bf071f2691dcd96a7c691dfe0ddfc8f44c0 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Mon, 18 Nov 2024 13:59:43 -0700 Subject: [PATCH 002/110] Fix libtemplate update workflow It had a quote in the wrong place. --- .github/workflows/libtemplate-update.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/libtemplate-update.yml b/.github/workflows/libtemplate-update.yml index 0831ced6..0501d5ee 100644 --- a/.github/workflows/libtemplate-update.yml +++ b/.github/workflows/libtemplate-update.yml @@ -77,7 +77,7 @@ jobs: $prTitle = "Merge latest Library.Template" $prBody = "This merges the latest features and fixes from [Library.Template's branch](https://github.com/AArnott/Library.Template/tree/). - โš ๏ธ Do **not** squash this pull request when completing it. You must *merge* it." + โš ๏ธ Do **not** squash this pull request when completing it. You must *merge* it.
Merge conflicts? @@ -91,7 +91,7 @@ jobs: git commit git push ``` -
+ " gh pr create -H auto/libtemplateUpdate -b $prBody -t $prTitle env: From 20e285c4d956424d2686261faa32f8721d5a7acf Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Tue, 19 Nov 2024 07:35:32 -0700 Subject: [PATCH 003/110] Avoid `dotnet format` hang Workaround https://github.com/dotnet/sdk/issues/44951 --- Directory.Packages.props | 3 ++- azure-pipelines/build.yml | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 4baf6ece..aa1a719d 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -13,7 +13,8 @@ - + + diff --git a/azure-pipelines/build.yml b/azure-pipelines/build.yml index 10825828..5c106ade 100644 --- a/azure-pipelines/build.yml +++ b/azure-pipelines/build.yml @@ -37,8 +37,10 @@ jobs: - template: dotnet.yml parameters: RunTests: ${{ parameters.RunTests }} - - script: dotnet format --verify-no-changes --no-restore + - script: dotnet format --verify-no-changes displayName: ๐Ÿ’… Verify formatted code + env: + dotnetformat: true # part of a workaround for https://github.com/dotnet/sdk/issues/44951 - template: expand-template.yml - job: macOS From 6775c31bac407a3dbb392d37861e3ec01b2d8214 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Tue, 19 Nov 2024 13:01:49 -0700 Subject: [PATCH 004/110] Update devcontainer for latest SDK and extension --- .devcontainer/Dockerfile | 2 +- .devcontainer/devcontainer.json | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 9626b31b..42fd12a7 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,5 +1,5 @@ # Refer to https://hub.docker.com/_/microsoft-dotnet-sdk for available versions -FROM mcr.microsoft.com/dotnet/sdk:8.0.402-jammy +FROM mcr.microsoft.com/dotnet/sdk:9.0.100-noble # Installing mono makes `dotnet test` work without errors even for net472. # But installing it takes a long time, so it's excluded by default. diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index f4e3b31a..01a087c7 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -10,11 +10,12 @@ "ms-dotnettools.csharp", "k--kato.docomment", "editorconfig.editorconfig", + "esbenp.prettier-vscode", "pflannery.vscode-versionlens", "davidanson.vscode-markdownlint", "dotjoshjohnson.xml", "ms-vscode-remote.remote-containers", "ms-azuretools.vscode-docker", - "ms-vscode.powershell" + "tintoy.msbuild-project-tools" ] } From 5bd86bbe7bca8843b2f0f0b9ea79d60892d0845e Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Tue, 19 Nov 2024 17:45:09 -0700 Subject: [PATCH 005/110] Get dependabot to help us keep the .NET SDK current https://github.blog/changelog/2024-11-19-dependabot-can-now-perform-version-updates-for-the-net-sdk/ --- .github/dependabot.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 63e3e890..b168ac6d 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -7,3 +7,7 @@ updates: directory: / schedule: interval: weekly +- package-ecosystem: dotnet-sdk + directory: / + schedule: + interval: monthly From 325831ec518b94a4fe7f0622bccf50d93817ce90 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Nov 2024 10:24:33 -0700 Subject: [PATCH 006/110] Bump docfx from 2.78.0 to 2.78.1 (#313) Bumps [docfx](https://github.com/dotnet/docfx) from 2.78.0 to 2.78.1. - [Release notes](https://github.com/dotnet/docfx/releases) - [Changelog](https://github.com/dotnet/docfx/blob/main/RELEASENOTE.md) - [Commits](https://github.com/dotnet/docfx/compare/v2.78.0...2.78.1) --- updated-dependencies: - dependency-name: docfx dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .config/dotnet-tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 85b44b22..1c5d6944 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -24,7 +24,7 @@ "rollForward": false }, "docfx": { - "version": "2.78.0", + "version": "2.78.1", "commands": [ "docfx" ], From 2d80693eb0017d6a7cd9bf83d8e19417452bbb11 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Nov 2024 10:24:58 -0700 Subject: [PATCH 007/110] Bump Microsoft.NET.Test.Sdk from 17.11.1 to 17.12.0 (#312) Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 17.11.1 to 17.12.0. - [Release notes](https://github.com/microsoft/vstest/releases) - [Changelog](https://github.com/microsoft/vstest/blob/main/docs/releases.md) - [Commits](https://github.com/microsoft/vstest/compare/v17.11.1...v17.12.0) --- updated-dependencies: - dependency-name: Microsoft.NET.Test.Sdk dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index aa1a719d..1a464d15 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -6,7 +6,7 @@ true - + From 49241ecb5b85fc42897ae0ec0457d572eff630f7 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Fri, 22 Nov 2024 18:49:08 -0700 Subject: [PATCH 008/110] Use `-LiteralPath` instead of `-Path` in ps1 scripts Fixes #314 --- Expand-Template.ps1 | 4 ++-- azure-pipelines/Get-CodeCovTool.ps1 | 2 +- azure-pipelines/Merge-CodeCoverage.ps1 | 2 +- azure-pipelines/artifacts/Variables.ps1 | 4 ++-- azure-pipelines/artifacts/_pipelines.ps1 | 2 +- azure-pipelines/artifacts/_stage_all.ps1 | 2 +- azure-pipelines/artifacts/coverageResults.ps1 | 4 ++-- azure-pipelines/dotnet-test-cloud.ps1 | 2 +- azure-pipelines/publish-CodeCov.ps1 | 2 +- azure-pipelines/variables/DotNetSdkVersion.ps1 | 2 +- azure-pipelines/variables/_pipelines.ps1 | 4 ++-- tools/Install-DotNetSdk.ps1 | 4 ++-- tools/Install-NuGetCredProvider.ps1 | 2 +- tools/Set-EnvVars.ps1 | 12 ++++++------ 14 files changed, 24 insertions(+), 24 deletions(-) diff --git a/Expand-Template.ps1 b/Expand-Template.ps1 index 44ef6826..9f9db676 100755 --- a/Expand-Template.ps1 +++ b/Expand-Template.ps1 @@ -40,7 +40,7 @@ function Replace-Placeholders { $Path = Resolve-Path $Path Write-Host "Replacing tokens in `"$Path`"" - $content = Get-Content -Path $Path | Out-String + $content = Get-Content -LiteralPath $Path | Out-String $Replacements.GetEnumerator() |% { $modifiedContent = $content -replace $_.Key,$_.Value if ($modifiedContent -eq $content) { @@ -199,7 +199,7 @@ try { # Self-integrity check Get-ChildItem -Recurse -File -Exclude bin,obj,README.md,Expand-Template.* |? { -not $_.FullName.Contains("obj") } |% { - $PLACEHOLDERS = Get-Content -Path $_.FullName |? { $_.Contains('PLACEHOLDER') } + $PLACEHOLDERS = Get-Content -LiteralPath $_.FullName |? { $_.Contains('PLACEHOLDER') } if ($PLACEHOLDERS) { Write-Error "PLACEHOLDER discovered in $($_.FullName)" } diff --git a/azure-pipelines/Get-CodeCovTool.ps1 b/azure-pipelines/Get-CodeCovTool.ps1 index ca580b4d..734ee607 100644 --- a/azure-pipelines/Get-CodeCovTool.ps1 +++ b/azure-pipelines/Get-CodeCovTool.ps1 @@ -68,7 +68,7 @@ if (!(Test-Path $finalToolPath)) { } Write-Host "Verifying hash on downloaded tool" -ForegroundColor Yellow - $actualHash = (Get-FileHash -Path $tool -Algorithm SHA256).Hash + $actualHash = (Get-FileHash -LiteralPath $tool -Algorithm SHA256).Hash $expectedHash = (Get-Content $sha).Split()[0] if ($actualHash -ne $expectedHash) { # Validation failed. Delete the tool so we can't execute it. diff --git a/azure-pipelines/Merge-CodeCoverage.ps1 b/azure-pipelines/Merge-CodeCoverage.ps1 index 5ecabbc9..308f5754 100644 --- a/azure-pipelines/Merge-CodeCoverage.ps1 +++ b/azure-pipelines/Merge-CodeCoverage.ps1 @@ -28,7 +28,7 @@ try { if ($reports) { $reports |% { $_.FullName } |% { # In addition to replacing {reporoot}, we also normalize on one kind of slash so that the report aggregates data for a file whether data was collected on Windows or not. - $xml = [xml](Get-Content -Path $_) + $xml = [xml](Get-Content -LiteralPath $_) $xml.coverage.packages.package.classes.class |? { $_.filename} |% { $_.filename = $_.filename.Replace('{reporoot}', $RepoRoot).Replace([IO.Path]::AltDirectorySeparatorChar, [IO.Path]::DirectorySeparatorChar) } diff --git a/azure-pipelines/artifacts/Variables.ps1 b/azure-pipelines/artifacts/Variables.ps1 index 4bc6d216..7a320c7e 100644 --- a/azure-pipelines/artifacts/Variables.ps1 +++ b/azure-pipelines/artifacts/Variables.ps1 @@ -32,10 +32,10 @@ Get-ChildItem "$PSScriptRoot/../variables" |% { # If that didn't get us anything, just copy the script itself if (-not $value) { - $value = Get-Content -Path $_.FullName + $value = Get-Content -LiteralPath $_.FullName } - Set-Content -Path "$VariablesArtifactPath/$($_.Name)" -Value $value + Set-Content -LiteralPath "$VariablesArtifactPath/$($_.Name)" -Value $value } @{ diff --git a/azure-pipelines/artifacts/_pipelines.ps1 b/azure-pipelines/artifacts/_pipelines.ps1 index 47321ed5..5f259a51 100644 --- a/azure-pipelines/artifacts/_pipelines.ps1 +++ b/azure-pipelines/artifacts/_pipelines.ps1 @@ -16,7 +16,7 @@ Function Set-PipelineVariable($name, $value) { return # already set } - #New-Item -Path "Env:\$name".ToUpper() -Value $value -Force | Out-Null + #New-Item -LiteralPath "Env:\$name".ToUpper() -Value $value -Force | Out-Null Write-Host "##vso[task.setvariable variable=$name]$value" } diff --git a/azure-pipelines/artifacts/_stage_all.ps1 b/azure-pipelines/artifacts/_stage_all.ps1 index 74d7a38d..bf961ce5 100644 --- a/azure-pipelines/artifacts/_stage_all.ps1 +++ b/azure-pipelines/artifacts/_stage_all.ps1 @@ -51,7 +51,7 @@ $Artifacts |% { if (Test-Path -PathType Leaf $_.Source) { # skip folders $TargetPath = Join-Path $DestinationFolder $Name if ($AvoidSymbolicLinks) { - Copy-Item -Path $_.Source -Destination $TargetPath + Copy-Item -LiteralPath $_.Source -Destination $TargetPath } else { Create-SymbolicLink -Link $TargetPath -Target $_.Source } diff --git a/azure-pipelines/artifacts/coverageResults.ps1 b/azure-pipelines/artifacts/coverageResults.ps1 index 280ff9ae..a6c8f420 100644 --- a/azure-pipelines/artifacts/coverageResults.ps1 +++ b/azure-pipelines/artifacts/coverageResults.ps1 @@ -6,8 +6,8 @@ $coverageFiles = @(Get-ChildItem "$RepoRoot/test/*.cobertura.xml" -Recurse | Whe if ($env:SYSTEM_DEFAULTWORKINGDIRECTORY) { Write-Host "Substituting $env:SYSTEM_DEFAULTWORKINGDIRECTORY with `"{reporoot}`"" $coverageFiles |% { - $content = Get-Content -Path $_ |% { $_ -Replace [regex]::Escape($env:SYSTEM_DEFAULTWORKINGDIRECTORY), "{reporoot}" } - Set-Content -Path $_ -Value $content -Encoding UTF8 + $content = Get-Content -LiteralPath $_ |% { $_ -Replace [regex]::Escape($env:SYSTEM_DEFAULTWORKINGDIRECTORY), "{reporoot}" } + Set-Content -LiteralPath $_ -Value $content -Encoding UTF8 } } else { Write-Warning "coverageResults: Azure Pipelines not detected. Machine-neutral token replacement skipped." diff --git a/azure-pipelines/dotnet-test-cloud.ps1 b/azure-pipelines/dotnet-test-cloud.ps1 index 24bf812a..33ff3d7c 100755 --- a/azure-pipelines/dotnet-test-cloud.ps1 +++ b/azure-pipelines/dotnet-test-cloud.ps1 @@ -61,7 +61,7 @@ Get-ChildItem -Recurse -Path $RepoRoot\test\*.trx |% { Copy-Item $_ -Destination $ArtifactStagingFolder/test_logs/ if ($PublishResults) { - $x = [xml](Get-Content -Path $_) + $x = [xml](Get-Content -LiteralPath $_) $runTitle = $null if ($x.TestRun.TestDefinitions -and $x.TestRun.TestDefinitions.GetElementsByTagName('UnitTest')) { $storage = $x.TestRun.TestDefinitions.GetElementsByTagName('UnitTest')[0].storage -replace '\\','/' diff --git a/azure-pipelines/publish-CodeCov.ps1 b/azure-pipelines/publish-CodeCov.ps1 index 9926f018..1d736511 100644 --- a/azure-pipelines/publish-CodeCov.ps1 +++ b/azure-pipelines/publish-CodeCov.ps1 @@ -22,7 +22,7 @@ Param ( $RepoRoot = (Resolve-Path "$PSScriptRoot/..").Path -Get-ChildItem -Recurse -Path $PathToCodeCoverage -Filter "*.cobertura.xml" | % { +Get-ChildItem -Recurse -LiteralPath $PathToCodeCoverage -Filter "*.cobertura.xml" | % { $relativeFilePath = Resolve-Path -relative $_.FullName Write-Host "Uploading: $relativeFilePath" -ForegroundColor Yellow diff --git a/azure-pipelines/variables/DotNetSdkVersion.ps1 b/azure-pipelines/variables/DotNetSdkVersion.ps1 index b213fbc2..722cc584 100644 --- a/azure-pipelines/variables/DotNetSdkVersion.ps1 +++ b/azure-pipelines/variables/DotNetSdkVersion.ps1 @@ -1,2 +1,2 @@ -$globalJson = Get-Content -Path "$PSScriptRoot\..\..\global.json" | ConvertFrom-Json +$globalJson = Get-Content -LiteralPath "$PSScriptRoot\..\..\global.json" | ConvertFrom-Json $globalJson.sdk.version diff --git a/azure-pipelines/variables/_pipelines.ps1 b/azure-pipelines/variables/_pipelines.ps1 index 11748b81..d40e5cf1 100644 --- a/azure-pipelines/variables/_pipelines.ps1 +++ b/azure-pipelines/variables/_pipelines.ps1 @@ -24,8 +24,8 @@ param ( # and the second that works across jobs and stages but must be fully qualified when referenced. Write-Host "##vso[task.setvariable variable=$keyCaps;isOutput=true]$($_.Value)" } elseif ($env:GITHUB_ACTIONS) { - Add-Content -Path $env:GITHUB_ENV -Value "$keyCaps=$($_.Value)" + Add-Content -LiteralPath $env:GITHUB_ENV -Value "$keyCaps=$($_.Value)" } - Set-Item -Path "env:$keyCaps" -Value $_.Value + Set-Item -LiteralPath "env:$keyCaps" -Value $_.Value } } diff --git a/tools/Install-DotNetSdk.ps1 b/tools/Install-DotNetSdk.ps1 index e190fcfb..ffb52203 100644 --- a/tools/Install-DotNetSdk.ps1 +++ b/tools/Install-DotNetSdk.ps1 @@ -55,8 +55,8 @@ $runtimeVersions = @() $windowsDesktopRuntimeVersions = @() $aspnetRuntimeVersions = @() if (!$SdkOnly) { - Get-ChildItem "$PSScriptRoot\..\src\*.*proj","$PSScriptRoot\..\test\*.*proj","$PSScriptRoot\..\Directory.Build.props" -Recurse |% { - $projXml = [xml](Get-Content -Path $_) + Get-ChildItem "$PSScriptRoot\..\src\*.*proj", "$PSScriptRoot\..\test\*.*proj", "$PSScriptRoot\..\Directory.Build.props" -Recurse | % { + $projXml = [xml](Get-Content -LiteralPath $_) $pg = $projXml.Project.PropertyGroup if ($pg) { $targetFrameworks = @() diff --git a/tools/Install-NuGetCredProvider.ps1 b/tools/Install-NuGetCredProvider.ps1 index 857324b6..2b904e33 100755 --- a/tools/Install-NuGetCredProvider.ps1 +++ b/tools/Install-NuGetCredProvider.ps1 @@ -50,7 +50,7 @@ if ($AccessToken) { $endpointURIs = @() Get-ChildItem "$PSScriptRoot\..\nuget.config" -Recurse |% { - $nugetConfig = [xml](Get-Content -Path $_) + $nugetConfig = [xml](Get-Content -LiteralPath $_) $nugetConfig.configuration.packageSources.add |? { ($_.value -match '^https://pkgs\.dev\.azure\.com/') -or ($_.value -match '^https://[\w\-]+\.pkgs\.visualstudio\.com/') } |% { if ($endpointURIs -notcontains $_.Value) { diff --git a/tools/Set-EnvVars.ps1 b/tools/Set-EnvVars.ps1 index 3f6f86ba..2bd3ca4d 100644 --- a/tools/Set-EnvVars.ps1 +++ b/tools/Set-EnvVars.ps1 @@ -45,14 +45,14 @@ if ($env:GITHUB_ACTIONS) { $CmdEnvScript = '' $Variables.GetEnumerator() |% { - Set-Item -Path env:$($_.Key) -Value $_.Value + Set-Item -LiteralPath env:$($_.Key) -Value $_.Value # If we're running in a cloud CI, set these environment variables so they propagate. if ($env:TF_BUILD) { Write-Host "##vso[task.setvariable variable=$($_.Key);]$($_.Value)" } if ($env:GITHUB_ACTIONS) { - Add-Content -Path $env:GITHUB_ENV -Value "$($_.Key)=$($_.Value)" + Add-Content -LiteralPath $env:GITHUB_ENV -Value "$($_.Key)=$($_.Value)" } if ($cmdInstructions) { @@ -70,7 +70,7 @@ if ($IsMacOS -or $IsLinux) { if ($PrependPath) { $PrependPath |% { $newPathValue = "$_$pathDelimiter$env:PATH" - Set-Item -Path env:PATH -Value $newPathValue + Set-Item -LiteralPath env:PATH -Value $newPathValue if ($cmdInstructions) { Write-Host "SET PATH=$newPathValue" } @@ -79,7 +79,7 @@ if ($PrependPath) { Write-Host "##vso[task.prependpath]$_" } if ($env:GITHUB_ACTIONS) { - Add-Content -Path $env:GITHUB_PATH -Value $_ + Add-Content -LiteralPath $env:GITHUB_PATH -Value $_ } $CmdEnvScript += "SET PATH=$_$pathDelimiter%PATH%" @@ -88,10 +88,10 @@ if ($PrependPath) { if ($env:CmdEnvScriptPath) { if (Test-Path $env:CmdEnvScriptPath) { - $CmdEnvScript = (Get-Content -Path $env:CmdEnvScriptPath) + $CmdEnvScript + $CmdEnvScript = (Get-Content -LiteralPath $env:CmdEnvScriptPath) + $CmdEnvScript } - Set-Content -Path $env:CmdEnvScriptPath -Value $CmdEnvScript + Set-Content -LiteralPath $env:CmdEnvScriptPath -Value $CmdEnvScript } return !$cmdInstructions From 110da233b0796e2c3e9a3acfabe9df70334a796e Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Mon, 25 Nov 2024 06:51:07 -0700 Subject: [PATCH 009/110] Replace `Nullable` with `PolySharp` as a dependency PolySharp is far more exhaustive in the polyfills than Nullable is. --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 1a464d15..237b3c2c 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -15,7 +15,7 @@ - + From f8235e44613937e4f524aeae1654c1438fd1d612 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Wed, 27 Nov 2024 11:36:45 -0700 Subject: [PATCH 010/110] Add docfx verification to build --- .github/workflows/build.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 24bc7d9e..6b1fb606 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,8 +3,8 @@ name: CI on: push: branches: - - main - - validate/* + - main + - validate/* pull_request: env: @@ -51,6 +51,9 @@ jobs: run: dotnet format --verify-no-changes --no-restore shell: pwsh if: runner.os == 'Linux' + - name: ๐Ÿ“š Verify docfx build + run: dotnet docfx docfx/docfx.json --warningsAsErrors --disableGitFeatures + if: runner.os == 'Linux' - name: โš™ Update pipeline variables based on build outputs run: azure-pipelines/variables/_pipelines.ps1 shell: pwsh From 45279a7aaf81400e9420099490a33c41d87bd2c4 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Wed, 27 Nov 2024 12:02:22 -0700 Subject: [PATCH 011/110] Fix nb.gv failure during docfx build --- .github/workflows/docs.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 6e6e64a0..1820866e 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -25,6 +25,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 # avoid shallow clone so nbgv can do its work. - name: โš™ Install prerequisites run: ./init.ps1 -UpgradePrerequisites From 3a32d099657cdfddc0175cdacbd55a450c171a6e Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Sat, 30 Nov 2024 09:02:09 -0700 Subject: [PATCH 012/110] Remove double word from boilerplate docfx text --- docfx/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docfx/index.md b/docfx/index.md index fc1b9e28..391ee6ec 100644 --- a/docfx/index.md +++ b/docfx/index.md @@ -6,4 +6,4 @@ _layout: landing This is your docfx landing page. -Click "Docs" across the top to get get started. +Click "Docs" across the top to get started. From feb1a4651ff6fcf933deae89478c1f06dab2db6c Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Mon, 2 Dec 2024 07:10:53 -0700 Subject: [PATCH 013/110] Bump docfx to 2.78.2 --- .config/dotnet-tools.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 1c5d6944..81e88d25 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -24,11 +24,11 @@ "rollForward": false }, "docfx": { - "version": "2.78.1", + "version": "2.78.2", "commands": [ "docfx" ], "rollForward": false } } -} \ No newline at end of file +} From 130ad679bb04f5a57b2cbf111675303eb6f531e1 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Sun, 8 Dec 2024 18:27:14 -0700 Subject: [PATCH 014/110] Bump dotnet-coverage to 17.13.1 --- .config/dotnet-tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 81e88d25..aaff6e7f 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -10,7 +10,7 @@ "rollForward": false }, "dotnet-coverage": { - "version": "17.12.6", + "version": "17.13.1", "commands": [ "dotnet-coverage" ], From 8a0d319d2a5fdac363f11c092ff83561234eeb0a Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Sun, 8 Dec 2024 19:56:33 -0700 Subject: [PATCH 015/110] Move artifact publishing into a composite action --- .github/actions/publish-artifacts/action.yaml | 67 +++++++++++++++++++ .github/workflows/build.yml | 60 +---------------- 2 files changed, 70 insertions(+), 57 deletions(-) create mode 100644 .github/actions/publish-artifacts/action.yaml diff --git a/.github/actions/publish-artifacts/action.yaml b/.github/actions/publish-artifacts/action.yaml new file mode 100644 index 00000000..94b74261 --- /dev/null +++ b/.github/actions/publish-artifacts/action.yaml @@ -0,0 +1,67 @@ +name: Publish artifacts +description: Publish artifacts + +runs: + using: composite + steps: + - name: ๐Ÿ“ฅ Collect artifacts + run: azure-pipelines/artifacts/_stage_all.ps1 + shell: pwsh + if: always() + +# TODO: replace this hard-coded list with a loop that utilizes the NPM package at +# https://github.com/actions/toolkit/tree/main/packages/artifact (or similar) to push the artifacts. + + - name: ๐Ÿ“ข Upload project.assets.json files + if: always() + uses: actions/upload-artifact@v4 + with: + name: projectAssetsJson-${{ runner.os }} + path: ${{ runner.temp }}/_artifacts/projectAssetsJson + continue-on-error: true + - name: ๐Ÿ“ข Upload variables + uses: actions/upload-artifact@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 + with: + name: build_logs-${{ runner.os }} + path: ${{ runner.temp }}/_artifacts/build_logs + continue-on-error: true + - name: ๐Ÿ“ข Upload test_logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: test_logs-${{ runner.os }} + path: ${{ runner.temp }}/_artifacts/test_logs + continue-on-error: true + - name: ๐Ÿ“ข Upload testResults + if: always() + uses: actions/upload-artifact@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 + with: + name: coverageResults-${{ runner.os }} + path: ${{ runner.temp }}/_artifacts/coverageResults + continue-on-error: true + - name: ๐Ÿ“ข Upload symbols + uses: actions/upload-artifact@v4 + with: + name: symbols-${{ runner.os }} + path: ${{ runner.temp }}/_artifacts/symbols + continue-on-error: true + - name: ๐Ÿ“ข Upload deployables + uses: actions/upload-artifact@v4 + with: + name: deployables-${{ runner.os }} + path: ${{ runner.temp }}/_artifacts/deployables + if: always() diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6b1fb606..9d87be99 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,6 +15,7 @@ env: jobs: build: + name: ๐Ÿญ Build runs-on: ${{ matrix.os }} strategy: @@ -57,63 +58,8 @@ jobs: - name: โš™ Update pipeline variables based on build outputs run: azure-pipelines/variables/_pipelines.ps1 shell: pwsh - - name: ๐Ÿ“ฅ Collect artifacts - run: azure-pipelines/artifacts/_stage_all.ps1 - shell: pwsh - if: always() - - name: ๐Ÿ“ข Upload project.assets.json files - if: always() - uses: actions/upload-artifact@v4 - with: - name: projectAssetsJson-${{ runner.os }} - path: ${{ runner.temp }}/_artifacts/projectAssetsJson - continue-on-error: true - - name: ๐Ÿ“ข Upload variables - uses: actions/upload-artifact@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 - with: - name: build_logs-${{ runner.os }} - path: ${{ runner.temp }}/_artifacts/build_logs - continue-on-error: true - - name: ๐Ÿ“ข Upload test_logs - if: always() - uses: actions/upload-artifact@v4 - with: - name: test_logs-${{ runner.os }} - path: ${{ runner.temp }}/_artifacts/test_logs - continue-on-error: true - - name: ๐Ÿ“ข Upload testResults - if: always() - uses: actions/upload-artifact@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 - with: - name: coverageResults-${{ runner.os }} - path: ${{ runner.temp }}/_artifacts/coverageResults - continue-on-error: true - - name: ๐Ÿ“ข Upload symbols - uses: actions/upload-artifact@v4 - with: - name: symbols-${{ runner.os }} - path: ${{ runner.temp }}/_artifacts/symbols - continue-on-error: true - - name: ๐Ÿ“ข Upload deployables - uses: actions/upload-artifact@v4 - with: - name: deployables-${{ runner.os }} - path: ${{ runner.temp }}/_artifacts/deployables - if: always() + - name: ๐Ÿ“ข Publish artifacts + uses: ./.github/actions/publish-artifacts - name: ๐Ÿ“ข Publish code coverage results to codecov.io run: ./azure-pipelines/publish-CodeCov.ps1 -CodeCovToken "${{ env.codecov_token }}" -PathToCodeCoverage "${{ runner.temp }}/_artifacts/coverageResults" -Name "${{ runner.os }} Coverage Results" -Flags "${{ runner.os }}" shell: pwsh From 904ff78e41c6c0b5c508080012583a063d4e0eef Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Sun, 8 Dec 2024 19:59:31 -0700 Subject: [PATCH 016/110] Make the CI workflow dispatchable --- .github/workflows/build.yml | 3 ++- .github/workflows/libtemplate-update.yml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9d87be99..5334bac5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: CI +name: ๐Ÿญ Build on: push: @@ -6,6 +6,7 @@ on: - main - validate/* pull_request: + workflow_dispatch: env: DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true diff --git a/.github/workflows/libtemplate-update.yml b/.github/workflows/libtemplate-update.yml index 0501d5ee..f78c7e08 100644 --- a/.github/workflows/libtemplate-update.yml +++ b/.github/workflows/libtemplate-update.yml @@ -1,4 +1,4 @@ -name: Library.Template update +name: โ›œ Library.Template update # PREREQUISITE: This workflow requires the repo to be configured to allow workflows to create pull requests. # Visit https://github.com/USER/REPO/settings/actions From 9bbf8a32612f990db1c8972293af5a972febb406 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Mon, 9 Dec 2024 11:17:13 -0700 Subject: [PATCH 017/110] Fix docfx build on private repos --- .github/workflows/docs.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 1820866e..70b779b5 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -10,6 +10,7 @@ permissions: actions: read pages: write id-token: write + contents: read # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. From 4fa9e72acb9f30a3cdb4f15c60681fc2b71273f0 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Mon, 9 Dec 2024 11:17:23 -0700 Subject: [PATCH 018/110] Fix code coverage merge on GitHub Actions --- azure-pipelines/artifacts/coverageResults.ps1 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/azure-pipelines/artifacts/coverageResults.ps1 b/azure-pipelines/artifacts/coverageResults.ps1 index a6c8f420..8c68216e 100644 --- a/azure-pipelines/artifacts/coverageResults.ps1 +++ b/azure-pipelines/artifacts/coverageResults.ps1 @@ -3,14 +3,16 @@ $RepoRoot = [System.IO.Path]::GetFullPath("$PSScriptRoot\..\..") $coverageFiles = @(Get-ChildItem "$RepoRoot/test/*.cobertura.xml" -Recurse | Where {$_.FullName -notlike "*/In/*" -and $_.FullName -notlike "*\In\*" }) # Prepare code coverage reports for merging on another machine -if ($env:SYSTEM_DEFAULTWORKINGDIRECTORY) { - Write-Host "Substituting $env:SYSTEM_DEFAULTWORKINGDIRECTORY with `"{reporoot}`"" +$repoRoot = $env:SYSTEM_DEFAULTWORKINGDIRECTORY +if (!$repoRoot) { $repoRoot = $env:GITHUB_WORKSPACE } +if ($repoRoot) { + Write-Host "Substituting $repoRoot with `"{reporoot}`"" $coverageFiles |% { - $content = Get-Content -LiteralPath $_ |% { $_ -Replace [regex]::Escape($env:SYSTEM_DEFAULTWORKINGDIRECTORY), "{reporoot}" } + $content = Get-Content -LiteralPath $_ |% { $_ -Replace [regex]::Escape($repoRoot), "{reporoot}" } Set-Content -LiteralPath $_ -Value $content -Encoding UTF8 } } else { - Write-Warning "coverageResults: Azure Pipelines not detected. Machine-neutral token replacement skipped." + Write-Warning "coverageResults: Cloud build not detected. Machine-neutral token replacement skipped." } if (!((Test-Path $RepoRoot\bin) -and (Test-Path $RepoRoot\obj))) { return } From 89afbfc38b5726d311954e4902e8f2c75f62f535 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Mon, 9 Dec 2024 11:17:37 -0700 Subject: [PATCH 019/110] Add release workflow --- .github/workflows/release.yml | 87 +++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..d6f5cc45 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,87 @@ +name: ๐ŸŽ Release + +on: + release: + types: [published] + workflow_dispatch: + inputs: + ship_run_id: + description: ID of the GitHub workflow run to ship + required: true + +run-name: ${{ github.ref_name }} + +permissions: + actions: read + contents: write + +jobs: + release: + runs-on: ubuntu-22.04 + steps: + - name: โš™๏ธ Initialization + shell: pwsh + run: | + if ('${{ secrets.NUGET_API_KEY }}') { + echo "NUGET_API_KEY_DEFINED=true" >> $GITHUB_ENV + } + + - name: ๐Ÿ”Ž Search for build of ${{ github.ref }} + shell: pwsh + id: findrunid + env: + GH_TOKEN: ${{ github.token }} + run: | + if ('${{ inputs.ship_run_id }}') { + $runid = '${{ inputs.ship_run_id }}' + } else { + $restApiRoot = '/repos/${{ github.repository }}' + + # Resolve the tag reference to a commit sha + $resolvedRef = gh api ` + -H "Accept: application/vnd.github+json" ` + -H "X-GitHub-Api-Version: 2022-11-28" ` + $restApiRoot/git/ref/tags/${{ github.ref_name }} ` + | ConvertFrom-Json + $commitSha = $resolvedRef.object.sha + + Write-Host "Resolved ${{ github.ref_name }} to $commitSha" + + $releases = gh run list -R ${{ github.repository }} -c $commitSha -w .github/workflows/build.yml -s success --json databaseId,startedAt ` + | ConvertFrom-Json | Sort-Object startedAt -Descending + + if ($releases.length -eq 0) { + Write-Error "No successful builds found for ${{ github.ref }}." + } elseif ($releases.length -gt 1) { + Write-Warning "More than one successful run found for ${{ github.ref }}. Artifacts from the most recent successful run will ship." + } + + $runid = $releases[0].databaseId + } + + Write-Host "Using artifacts from run-id: $runid" + + Echo "runid=$runid" >> $env:GITHUB_OUTPUT + + - name: ๐Ÿ”ป Download deployables artifacts + uses: actions/download-artifact@v4 + with: + name: deployables-Linux + path: ${{ runner.temp }}/deployables + run-id: ${{ steps.findrunid.outputs.runid }} + github-token: ${{ github.token }} + + - name: ๐Ÿ’ฝ Upload artifacts to release + shell: pwsh + if: ${{ github.event.release.assets_url }} != '' + env: + GH_TOKEN: ${{ github.token }} + run: | + Get-ChildItem '${{ runner.temp }}/deployables' |% { + Write-Host "Uploading $($_.Name) to release..." + gh release -R ${{ github.repository }} upload "${{ github.ref_name }}" $_.FullName + } + + - name: ๐Ÿš€ Push NuGet packages + run: dotnet nuget push ${{ runner.temp }}/deployables/*.nupkg --source https://api.nuget.org/v3/index.json -k '${{ secrets.NUGET_API_KEY }}' + if: ${{ env.NUGET_API_KEY_DEFINED == 'true' }} From 1a06053669fe6f6c7d67d8f76ba5b139ab691b5e Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Mon, 9 Dec 2024 11:53:03 -0700 Subject: [PATCH 020/110] Document release process --- CONTRIBUTING.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7ec56f4d..52d83a88 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -41,6 +41,29 @@ Building, testing, and packing this repository can be done by using the standard [pwsh]: https://docs.microsoft.com/powershell/scripting/install/installing-powershell?view=powershell-6 +## Releases + +Use `nbgv tag` to create a tag for a particular commit that you mean to release. +[Learn more about `nbgv` and its `tag` and `prepare-release` commands](https://github.com/dotnet/Nerdbank.GitVersioning/blob/main/doc/nbgv-cli.md). + +Push the tag. + +### GitHub Actions + +When your repo is hosted by GitHub and you are using GitHub Actions, you should create a GitHub Release using the standard GitHub UI. +Having previously used `nbgv tag` and pushing the tag will help you identify the precise commit and name to use for this release. + +After publishing the release, the `.github\workflows\release.yml` workflow will be automatically triggered, which will: + +1. Find the most recent `.github\workflows\build.yml` GitHub workflow run of the tagged release. +1. Upload the `deployables` artifact from that workflow run to your GitHub Release. +1. If you have `NUGET_API_KEY` defined as a secret variable for your repo or org, any nuget packages in the `deployables` artifact will be pushed to nuget.org. + +### Azure Pipelines + +When your repo builds with Azure Pipelines, use the `azure-pipelines/release.yml` pipeline. +Trigger the pipeline by adding the `auto-release` tag on a run of your main `azure-pipelines.yml` pipeline. + ## Tutorial and API documentation API and hand-written docs are found under the `docfx/` directory. and are built by [docfx](https://dotnet.github.io/docfx/). From 7bb9a6c37c9cc09513b5e6c0a950e410dfb8d70e Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Wed, 11 Dec 2024 10:25:36 -0700 Subject: [PATCH 021/110] Publish test results when they fail on github workflows --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5334bac5..474d90c2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -61,6 +61,7 @@ jobs: shell: pwsh - name: ๐Ÿ“ข Publish artifacts uses: ./.github/actions/publish-artifacts + if: always() - name: ๐Ÿ“ข Publish code coverage results to codecov.io run: ./azure-pipelines/publish-CodeCov.ps1 -CodeCovToken "${{ env.codecov_token }}" -PathToCodeCoverage "${{ runner.temp }}/_artifacts/coverageResults" -Name "${{ runner.os }} Coverage Results" -Flags "${{ runner.os }}" shell: pwsh From f6204f39ccd73fde0e4890d66f5019d467a9348a Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Fri, 13 Dec 2024 09:16:31 -0700 Subject: [PATCH 022/110] Fix push to nuget.org in github release workflow --- .github/workflows/release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d6f5cc45..ed0f5924 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,7 +23,8 @@ jobs: shell: pwsh run: | if ('${{ secrets.NUGET_API_KEY }}') { - echo "NUGET_API_KEY_DEFINED=true" >> $GITHUB_ENV + Write-Host "NUGET_API_KEY secret detected. NuGet packages will be pushed." + echo "NUGET_API_KEY_DEFINED=true" >> $env:GITHUB_ENV } - name: ๐Ÿ”Ž Search for build of ${{ github.ref }} From 0a42cd9afd1e40f6a5392850a5115ca5f42dfd9a Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Sun, 15 Dec 2024 20:35:38 -0700 Subject: [PATCH 023/110] Bump nbgv and Nerdbank.GitVersioning to 3.7.112 --- .config/dotnet-tools.json | 2 +- Directory.Packages.props | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index aaff6e7f..3f79bdec 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -17,7 +17,7 @@ "rollForward": false }, "nbgv": { - "version": "3.6.146", + "version": "3.7.112", "commands": [ "nbgv" ], diff --git a/Directory.Packages.props b/Directory.Packages.props index 237b3c2c..1023acab 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -14,7 +14,7 @@ - + From d8df5c88cf22b9a90fb7a48b73ee3fa7dcf7eb07 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Wed, 18 Dec 2024 11:29:15 -0700 Subject: [PATCH 024/110] Activate GitHub Actions test reporting --- Directory.Packages.props | 1 + azure-pipelines/dotnet-test-cloud.ps1 | 35 ++++++++++++++++++++++++--- test/Directory.Build.props | 3 +++ 3 files changed, 35 insertions(+), 4 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 1023acab..1f94284a 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -6,6 +6,7 @@ true + diff --git a/azure-pipelines/dotnet-test-cloud.ps1 b/azure-pipelines/dotnet-test-cloud.ps1 index 33ff3d7c..c0be8672 100755 --- a/azure-pipelines/dotnet-test-cloud.ps1 +++ b/azure-pipelines/dotnet-test-cloud.ps1 @@ -25,6 +25,8 @@ Param( $RepoRoot = (Resolve-Path "$PSScriptRoot/..").Path $ArtifactStagingFolder = & "$PSScriptRoot/Get-ArtifactsStagingDirectory.ps1" +$TestLogsPath = "$ArtifactStagingFolder/test_logs" +if (!(Test-Path $TestLogsPath)) { New-Item -ItemType Directory -Path $TestLogsPath | Out-Null } $dotnet = 'dotnet' if ($x86) { @@ -44,21 +46,46 @@ if ($x86) { } } +$dotnetTestArgs = @() +$dotnetTestArgs2 = @() + +# The GitHubActions test logger fails when combined with certain switches, but only on mac/linux. +# We avoid those switches in that specific context. +# Failure symptoms when using the wrong switch combinations on mac/linux are (depending on the switches) EITHER: +# - The test runner fails with exit code 1 (and no error message) +# - The test runner succeeds but the GitHubActions logger only adds annotations on Windows agents. +# See https://github.com/Tyrrrz/GitHubActionsTestLogger/discussions/37 for more info. +# Thus, the mess of conditions you see below, in order to get GitHubActions to work +# without undermining other value we have when running in other contexts. +if ($env:GITHUB_WORKFLOW -and ($IsLinux -or $IsMacOS)) { + $dotnetTestArgs += '--collect','Xplat Code Coverage' + $dotnetTestArgs2 += 'DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover' +} else { + $dotnetTestArgs += '--diag','$$TestLogsPath/diag.log;TraceLevel=info' + $dotnetTestArgs += '--collect','Code Coverage;Format=cobertura' + $dotnetTestArgs += '--settings',"$PSScriptRoot/test.runsettings" +} + +if ($env:GITHUB_WORKFLOW) { + $dotnetTestArgs += '--logger','GitHubActions' + $dotnetTestArgs2 += 'RunConfiguration.CollectSourceInformation=true' +} + & $dotnet test $RepoRoot ` --no-build ` -c $Configuration ` --filter "TestCategory!=FailsInCloudTest" ` - --collect "Code Coverage;Format=cobertura" ` - --settings "$PSScriptRoot/test.runsettings" ` --blame-hang-timeout 60s ` --blame-crash ` -bl:"$ArtifactStagingFolder/build_logs/test.binlog" ` - --diag "$ArtifactStagingFolder/test_logs/diag.log;TraceLevel=info" ` --logger trx ` + @dotnetTestArgs ` + -- ` + @dotnetTestArgs2 $unknownCounter = 0 Get-ChildItem -Recurse -Path $RepoRoot\test\*.trx |% { - Copy-Item $_ -Destination $ArtifactStagingFolder/test_logs/ + Copy-Item $_ -Destination $TestLogsPath/ if ($PublishResults) { $x = [xml](Get-Content -LiteralPath $_) diff --git a/test/Directory.Build.props b/test/Directory.Build.props index 6c7aa71d..65b3bade 100644 --- a/test/Directory.Build.props +++ b/test/Directory.Build.props @@ -7,4 +7,7 @@ true + + + From d2f4c5e339b1be2bb8bccff6ef13b0a3fe63c81e Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Wed, 18 Dec 2024 15:10:28 -0700 Subject: [PATCH 025/110] Revert "Merge pull request #319 from AArnott/betterTestingLibTemplate" This reverts commit 01eeb1aff44be490aea525baa92f89240ba2f682, reversing changes made to 0a42cd9afd1e40f6a5392850a5115ca5f42dfd9a. --- Directory.Packages.props | 1 - azure-pipelines/dotnet-test-cloud.ps1 | 35 +++------------------------ test/Directory.Build.props | 3 --- 3 files changed, 4 insertions(+), 35 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 1f94284a..1023acab 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -6,7 +6,6 @@ true - diff --git a/azure-pipelines/dotnet-test-cloud.ps1 b/azure-pipelines/dotnet-test-cloud.ps1 index c0be8672..33ff3d7c 100755 --- a/azure-pipelines/dotnet-test-cloud.ps1 +++ b/azure-pipelines/dotnet-test-cloud.ps1 @@ -25,8 +25,6 @@ Param( $RepoRoot = (Resolve-Path "$PSScriptRoot/..").Path $ArtifactStagingFolder = & "$PSScriptRoot/Get-ArtifactsStagingDirectory.ps1" -$TestLogsPath = "$ArtifactStagingFolder/test_logs" -if (!(Test-Path $TestLogsPath)) { New-Item -ItemType Directory -Path $TestLogsPath | Out-Null } $dotnet = 'dotnet' if ($x86) { @@ -46,46 +44,21 @@ if ($x86) { } } -$dotnetTestArgs = @() -$dotnetTestArgs2 = @() - -# The GitHubActions test logger fails when combined with certain switches, but only on mac/linux. -# We avoid those switches in that specific context. -# Failure symptoms when using the wrong switch combinations on mac/linux are (depending on the switches) EITHER: -# - The test runner fails with exit code 1 (and no error message) -# - The test runner succeeds but the GitHubActions logger only adds annotations on Windows agents. -# See https://github.com/Tyrrrz/GitHubActionsTestLogger/discussions/37 for more info. -# Thus, the mess of conditions you see below, in order to get GitHubActions to work -# without undermining other value we have when running in other contexts. -if ($env:GITHUB_WORKFLOW -and ($IsLinux -or $IsMacOS)) { - $dotnetTestArgs += '--collect','Xplat Code Coverage' - $dotnetTestArgs2 += 'DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover' -} else { - $dotnetTestArgs += '--diag','$$TestLogsPath/diag.log;TraceLevel=info' - $dotnetTestArgs += '--collect','Code Coverage;Format=cobertura' - $dotnetTestArgs += '--settings',"$PSScriptRoot/test.runsettings" -} - -if ($env:GITHUB_WORKFLOW) { - $dotnetTestArgs += '--logger','GitHubActions' - $dotnetTestArgs2 += 'RunConfiguration.CollectSourceInformation=true' -} - & $dotnet test $RepoRoot ` --no-build ` -c $Configuration ` --filter "TestCategory!=FailsInCloudTest" ` + --collect "Code Coverage;Format=cobertura" ` + --settings "$PSScriptRoot/test.runsettings" ` --blame-hang-timeout 60s ` --blame-crash ` -bl:"$ArtifactStagingFolder/build_logs/test.binlog" ` + --diag "$ArtifactStagingFolder/test_logs/diag.log;TraceLevel=info" ` --logger trx ` - @dotnetTestArgs ` - -- ` - @dotnetTestArgs2 $unknownCounter = 0 Get-ChildItem -Recurse -Path $RepoRoot\test\*.trx |% { - Copy-Item $_ -Destination $TestLogsPath/ + Copy-Item $_ -Destination $ArtifactStagingFolder/test_logs/ if ($PublishResults) { $x = [xml](Get-Content -LiteralPath $_) diff --git a/test/Directory.Build.props b/test/Directory.Build.props index 65b3bade..6c7aa71d 100644 --- a/test/Directory.Build.props +++ b/test/Directory.Build.props @@ -7,7 +7,4 @@ true - - - From 7b18fd08172526499129f394ae71878cfc0acc63 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Fri, 20 Dec 2024 08:14:30 -0700 Subject: [PATCH 026/110] Resolve schema validation error in VS Code for docfx yml files --- docfx/docs/toc.yml | 2 +- docfx/toc.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docfx/docs/toc.yml b/docfx/docs/toc.yml index 36a38020..518ffadd 100644 --- a/docfx/docs/toc.yml +++ b/docfx/docs/toc.yml @@ -1,5 +1,5 @@ +items: - name: Features href: features.md - name: Getting Started href: getting-started.md - diff --git a/docfx/toc.yml b/docfx/toc.yml index abd17b8c..8e9a6700 100644 --- a/docfx/toc.yml +++ b/docfx/toc.yml @@ -1,3 +1,4 @@ +items: - name: Docs href: docs/ - name: API From ad4ff0f092dfc147fdb6f5f2151c7071c9b8bc6e Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Fri, 20 Dec 2024 10:19:52 -0700 Subject: [PATCH 027/110] Bump xunit.runner.visualstudio to 3.0.0 --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 1023acab..b10eaee7 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -7,7 +7,7 @@ - + From 2e9751f002252714719de4d2f914156902b8aae5 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Fri, 20 Dec 2024 10:19:58 -0700 Subject: [PATCH 028/110] Bump .NET SDK to 9.0.101 --- global.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global.json b/global.json index 088f23e1..f3e0b323 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "9.0.100", + "version": "9.0.101", "rollForward": "patch", "allowPrerelease": false } From 0c33c695660191469a486f8f9de195f378f1bd2d Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Fri, 20 Dec 2024 10:35:40 -0700 Subject: [PATCH 029/110] Organize Directory.Packages.props to reduce merge conflicts going forward --- Directory.Packages.props | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Directory.Packages.props b/Directory.Packages.props index b10eaee7..32113f54 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -6,11 +6,17 @@ true + + + + + + From 99ee1fcd49f2d7ce9cf8e5c1d2927260548d0171 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Sun, 22 Dec 2024 18:50:42 -0700 Subject: [PATCH 030/110] Bump to Xunit v3 --- Directory.Packages.props | 4 ++-- test/Library.Tests/Library.Tests.csproj | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 32113f54..63808e7c 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -11,7 +11,7 @@ - + @@ -24,4 +24,4 @@ - + \ No newline at end of file diff --git a/test/Library.Tests/Library.Tests.csproj b/test/Library.Tests/Library.Tests.csproj index a853dc7d..5cbc1e1f 100644 --- a/test/Library.Tests/Library.Tests.csproj +++ b/test/Library.Tests/Library.Tests.csproj @@ -3,6 +3,7 @@ net8.0 $(TargetFrameworks);net472 + Exe @@ -13,7 +14,7 @@ - + From 94eba4a33a15fd28a0693bba3e3e5086d0df8d24 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Mon, 23 Dec 2024 09:48:35 -0700 Subject: [PATCH 031/110] Build servicing branches --- .github/workflows/build.yml | 1 + azure-pipelines.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 474d90c2..fbd7115c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,6 +4,7 @@ on: push: branches: - main + - 'v*.*' - validate/* pull_request: workflow_dispatch: diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 9867b3db..4d372fe0 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -3,6 +3,7 @@ trigger: branches: include: - main + - 'v*.*' - 'validate/*' paths: exclude: From 275a44b6c5cb089a21ac2b2456c55d66ec172236 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Mon, 23 Dec 2024 11:39:09 -0700 Subject: [PATCH 032/110] Do not publish artifacts on cancelled GitHub workflows --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fbd7115c..58e56ccc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -62,7 +62,7 @@ jobs: shell: pwsh - name: ๐Ÿ“ข Publish artifacts uses: ./.github/actions/publish-artifacts - if: always() + if: cancelled() == false - name: ๐Ÿ“ข Publish code coverage results to codecov.io run: ./azure-pipelines/publish-CodeCov.ps1 -CodeCovToken "${{ env.codecov_token }}" -PathToCodeCoverage "${{ runner.temp }}/_artifacts/coverageResults" -Name "${{ runner.os }} Coverage Results" -Flags "${{ runner.os }}" shell: pwsh From 8870497c3473ebc75324c5356b36b4361f2a9065 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Tue, 24 Dec 2024 09:12:10 -0700 Subject: [PATCH 033/110] Move scripts that apply to github workflows from azp to tools --- .github/workflows/build.yml | 4 ++-- .github/workflows/libtemplate-update.yml | 2 +- azure-pipelines/artifacts/_stage_all.ps1 | 2 +- azure-pipelines/artifacts/build_logs.ps1 | 2 +- azure-pipelines/dotnet.yml | 6 +++--- azure-pipelines/libtemplate-update.yml | 2 +- init.ps1 | 2 +- .../Get-ArtifactsStagingDirectory.ps1 | 0 {azure-pipelines => tools}/Get-CodeCovTool.ps1 | 0 {azure-pipelines => tools}/Get-LibTemplateBasis.ps1 | 0 {azure-pipelines => tools}/Get-NuGetTool.ps1 | 0 {azure-pipelines => tools}/Get-ProcDump.ps1 | 0 {azure-pipelines => tools}/Get-TempToolsPath.ps1 | 0 tools/Install-NuGetCredProvider.ps1 | 2 +- tools/MergeFrom-Template.ps1 | 2 +- {azure-pipelines => tools}/dotnet-test-cloud.ps1 | 0 {azure-pipelines => tools}/publish-CodeCov.ps1 | 0 {azure-pipelines => tools}/test.runsettings | 0 18 files changed, 12 insertions(+), 12 deletions(-) rename {azure-pipelines => tools}/Get-ArtifactsStagingDirectory.ps1 (100%) rename {azure-pipelines => tools}/Get-CodeCovTool.ps1 (100%) rename {azure-pipelines => tools}/Get-LibTemplateBasis.ps1 (100%) rename {azure-pipelines => tools}/Get-NuGetTool.ps1 (100%) rename {azure-pipelines => tools}/Get-ProcDump.ps1 (100%) rename {azure-pipelines => tools}/Get-TempToolsPath.ps1 (100%) rename {azure-pipelines => tools}/dotnet-test-cloud.ps1 (100%) mode change 100755 => 100644 rename {azure-pipelines => tools}/publish-CodeCov.ps1 (100%) rename {azure-pipelines => tools}/test.runsettings (100%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 58e56ccc..5e338ffa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -48,7 +48,7 @@ jobs: - name: ๐Ÿ›  build run: dotnet build -t:build,pack --no-restore -c ${{ env.BUILDCONFIGURATION }} -warnAsError -warnNotAsError:NU1901,NU1902,NU1903,NU1904 /bl:"${{ runner.temp }}/_artifacts/build_logs/build.binlog" - name: ๐Ÿงช test - run: azure-pipelines/dotnet-test-cloud.ps1 -Configuration ${{ env.BUILDCONFIGURATION }} -Agent ${{ runner.os }} + run: tools/dotnet-test-cloud.ps1 -Configuration ${{ env.BUILDCONFIGURATION }} -Agent ${{ runner.os }} shell: pwsh - name: ๐Ÿ’…๐Ÿป Verify formatted code run: dotnet format --verify-no-changes --no-restore @@ -64,7 +64,7 @@ jobs: uses: ./.github/actions/publish-artifacts if: cancelled() == false - name: ๐Ÿ“ข Publish code coverage results to codecov.io - run: ./azure-pipelines/publish-CodeCov.ps1 -CodeCovToken "${{ env.codecov_token }}" -PathToCodeCoverage "${{ runner.temp }}/_artifacts/coverageResults" -Name "${{ runner.os }} Coverage Results" -Flags "${{ runner.os }}" + run: ./tools/publish-CodeCov.ps1 -CodeCovToken "${{ env.codecov_token }}" -PathToCodeCoverage "${{ runner.temp }}/_artifacts/coverageResults" -Name "${{ runner.os }} Coverage Results" -Flags "${{ runner.os }}" shell: pwsh timeout-minutes: 3 continue-on-error: true diff --git a/.github/workflows/libtemplate-update.yml b/.github/workflows/libtemplate-update.yml index f78c7e08..c6b8fb4a 100644 --- a/.github/workflows/libtemplate-update.yml +++ b/.github/workflows/libtemplate-update.yml @@ -25,7 +25,7 @@ jobs: id: merge shell: pwsh run: | - $LibTemplateBranch = & ./azure-pipelines/Get-LibTemplateBasis.ps1 -ErrorIfNotRelated + $LibTemplateBranch = & ./tools/Get-LibTemplateBasis.ps1 -ErrorIfNotRelated if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } diff --git a/azure-pipelines/artifacts/_stage_all.ps1 b/azure-pipelines/artifacts/_stage_all.ps1 index bf961ce5..08e9844c 100644 --- a/azure-pipelines/artifacts/_stage_all.ps1 +++ b/azure-pipelines/artifacts/_stage_all.ps1 @@ -11,7 +11,7 @@ param ( [switch]$AvoidSymbolicLinks ) -$ArtifactStagingFolder = & "$PSScriptRoot/../Get-ArtifactsStagingDirectory.ps1" -CleanIfLocal +$ArtifactStagingFolder = & "$PSScriptRoot/../../tools/Get-ArtifactsStagingDirectory.ps1" -CleanIfLocal function Create-SymbolicLink { param ( diff --git a/azure-pipelines/artifacts/build_logs.ps1 b/azure-pipelines/artifacts/build_logs.ps1 index f05358e0..10c5478b 100644 --- a/azure-pipelines/artifacts/build_logs.ps1 +++ b/azure-pipelines/artifacts/build_logs.ps1 @@ -1,4 +1,4 @@ -$ArtifactStagingFolder = & "$PSScriptRoot/../Get-ArtifactsStagingDirectory.ps1" +$ArtifactStagingFolder = & "$PSScriptRoot/../../tools/Get-ArtifactsStagingDirectory.ps1" if (!(Test-Path $ArtifactStagingFolder/build_logs)) { return } diff --git a/azure-pipelines/dotnet.yml b/azure-pipelines/dotnet.yml index 2444928f..2ce80af3 100644 --- a/azure-pipelines/dotnet.yml +++ b/azure-pipelines/dotnet.yml @@ -6,7 +6,7 @@ steps: - script: dotnet build -t:build,pack --no-restore -c $(BuildConfiguration) -warnAsError -warnNotAsError:NU1901,NU1902,NU1903,NU1904 /bl:"$(Build.ArtifactStagingDirectory)/build_logs/build.binlog" displayName: ๐Ÿ›  dotnet build -- powershell: azure-pipelines/dotnet-test-cloud.ps1 -Configuration $(BuildConfiguration) -Agent $(Agent.JobName) -PublishResults +- powershell: tools/dotnet-test-cloud.ps1 -Configuration $(BuildConfiguration) -Agent $(Agent.JobName) -PublishResults displayName: ๐Ÿงช dotnet test condition: and(succeeded(), ${{ parameters.RunTests }}) @@ -22,9 +22,9 @@ steps: - ${{ if and(ne(variables['codecov_token'], ''), parameters.RunTests) }}: - powershell: | - $ArtifactStagingFolder = & "azure-pipelines/Get-ArtifactsStagingDirectory.ps1" + $ArtifactStagingFolder = & "tools/Get-ArtifactsStagingDirectory.ps1" $CoverageResultsFolder = Join-Path $ArtifactStagingFolder "coverageResults-$(Agent.JobName)" - azure-pipelines/publish-CodeCov.ps1 -CodeCovToken "$(codecov_token)" -PathToCodeCoverage "$CoverageResultsFolder" -Name "$(Agent.JobName) Coverage Results" -Flags "$(Agent.JobName)" + tools/publish-CodeCov.ps1 -CodeCovToken "$(codecov_token)" -PathToCodeCoverage "$CoverageResultsFolder" -Name "$(Agent.JobName) Coverage Results" -Flags "$(Agent.JobName)" displayName: ๐Ÿ“ข Publish code coverage results to codecov.io timeoutInMinutes: 3 continueOnError: true diff --git a/azure-pipelines/libtemplate-update.yml b/azure-pipelines/libtemplate-update.yml index 87302b06..fdfa1df5 100644 --- a/azure-pipelines/libtemplate-update.yml +++ b/azure-pipelines/libtemplate-update.yml @@ -28,7 +28,7 @@ stages: fetchDepth: 0 clean: true - pwsh: | - $LibTemplateBranch = & ./azure-pipelines/Get-LibTemplateBasis.ps1 -ErrorIfNotRelated + $LibTemplateBranch = & ./tools/Get-LibTemplateBasis.ps1 -ErrorIfNotRelated if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } diff --git a/init.ps1 b/init.ps1 index e2849855..b4004e79 100755 --- a/init.ps1 +++ b/init.ps1 @@ -71,7 +71,7 @@ if (!$NoPrerequisites) { # The procdump tool and env var is required for dotnet test to collect hang/crash dumps of tests. # But it only works on Windows. if ($env:OS -eq 'Windows_NT') { - $EnvVars['PROCDUMP_PATH'] = & "$PSScriptRoot\azure-pipelines\Get-ProcDump.ps1" + $EnvVars['PROCDUMP_PATH'] = & "$PSScriptRoot\tools\Get-ProcDump.ps1" } } diff --git a/azure-pipelines/Get-ArtifactsStagingDirectory.ps1 b/tools/Get-ArtifactsStagingDirectory.ps1 similarity index 100% rename from azure-pipelines/Get-ArtifactsStagingDirectory.ps1 rename to tools/Get-ArtifactsStagingDirectory.ps1 diff --git a/azure-pipelines/Get-CodeCovTool.ps1 b/tools/Get-CodeCovTool.ps1 similarity index 100% rename from azure-pipelines/Get-CodeCovTool.ps1 rename to tools/Get-CodeCovTool.ps1 diff --git a/azure-pipelines/Get-LibTemplateBasis.ps1 b/tools/Get-LibTemplateBasis.ps1 similarity index 100% rename from azure-pipelines/Get-LibTemplateBasis.ps1 rename to tools/Get-LibTemplateBasis.ps1 diff --git a/azure-pipelines/Get-NuGetTool.ps1 b/tools/Get-NuGetTool.ps1 similarity index 100% rename from azure-pipelines/Get-NuGetTool.ps1 rename to tools/Get-NuGetTool.ps1 diff --git a/azure-pipelines/Get-ProcDump.ps1 b/tools/Get-ProcDump.ps1 similarity index 100% rename from azure-pipelines/Get-ProcDump.ps1 rename to tools/Get-ProcDump.ps1 diff --git a/azure-pipelines/Get-TempToolsPath.ps1 b/tools/Get-TempToolsPath.ps1 similarity index 100% rename from azure-pipelines/Get-TempToolsPath.ps1 rename to tools/Get-TempToolsPath.ps1 diff --git a/tools/Install-NuGetCredProvider.ps1 b/tools/Install-NuGetCredProvider.ps1 index 2b904e33..b776f56d 100755 --- a/tools/Install-NuGetCredProvider.ps1 +++ b/tools/Install-NuGetCredProvider.ps1 @@ -21,7 +21,7 @@ Param ( $envVars = @{} -$toolsPath = & "$PSScriptRoot\..\azure-pipelines\Get-TempToolsPath.ps1" +$toolsPath = & "$PSScriptRoot\Get-TempToolsPath.ps1" if ($IsMacOS -or $IsLinux) { $installerScript = "installcredprovider.sh" diff --git a/tools/MergeFrom-Template.ps1 b/tools/MergeFrom-Template.ps1 index 3f721c6a..240a5709 100644 --- a/tools/MergeFrom-Template.ps1 +++ b/tools/MergeFrom-Template.ps1 @@ -36,7 +36,7 @@ Function Spawn-Tool($command, $commandArgs, $workingDirectory, $allowFailures) { } } -$remoteBranch = & $PSScriptRoot\..\azure-pipelines\Get-LibTemplateBasis.ps1 -ErrorIfNotRelated +$remoteBranch = & $PSScriptRoot\Get-LibTemplateBasis.ps1 -ErrorIfNotRelated if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } diff --git a/azure-pipelines/dotnet-test-cloud.ps1 b/tools/dotnet-test-cloud.ps1 old mode 100755 new mode 100644 similarity index 100% rename from azure-pipelines/dotnet-test-cloud.ps1 rename to tools/dotnet-test-cloud.ps1 diff --git a/azure-pipelines/publish-CodeCov.ps1 b/tools/publish-CodeCov.ps1 similarity index 100% rename from azure-pipelines/publish-CodeCov.ps1 rename to tools/publish-CodeCov.ps1 diff --git a/azure-pipelines/test.runsettings b/tools/test.runsettings similarity index 100% rename from azure-pipelines/test.runsettings rename to tools/test.runsettings From bb60632aa68a206d37505999b65228f2de86b032 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Tue, 24 Dec 2024 09:25:56 -0700 Subject: [PATCH 034/110] Remove unused nuget.config file --- azure-pipelines/justnugetorg.nuget.config | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 azure-pipelines/justnugetorg.nuget.config diff --git a/azure-pipelines/justnugetorg.nuget.config b/azure-pipelines/justnugetorg.nuget.config deleted file mode 100644 index 765346e5..00000000 --- a/azure-pipelines/justnugetorg.nuget.config +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - From abbd6b001e55897f9922dd90ddce51b8ad6bb818 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Tue, 24 Dec 2024 09:33:58 -0700 Subject: [PATCH 035/110] Move artifacts and variables scripts to `tools` --- .github/actions/publish-artifacts/action.yaml | 2 +- .github/workflows/build.yml | 4 ++-- .../{variables/_pipelines.ps1 => define_variables.ps1} | 2 +- azure-pipelines/dotnet.yml | 4 ++-- azure-pipelines/install-dependencies.yml | 2 +- .../{artifacts/_pipelines.ps1 => publish_artifacts.ps1} | 2 +- {azure-pipelines => tools}/Get-SymbolFiles.ps1 | 0 tools/Install-DotNetSdk.ps1 | 2 +- {azure-pipelines => tools}/artifacts/Variables.ps1 | 0 {azure-pipelines => tools}/artifacts/_all.ps1 | 0 {azure-pipelines => tools}/artifacts/_stage_all.ps1 | 0 {azure-pipelines => tools}/artifacts/build_logs.ps1 | 0 {azure-pipelines => tools}/artifacts/coverageResults.ps1 | 0 {azure-pipelines => tools}/artifacts/deployables.ps1 | 0 {azure-pipelines => tools}/artifacts/projectAssetsJson.ps1 | 0 {azure-pipelines => tools}/artifacts/symbols.ps1 | 0 {azure-pipelines => tools}/artifacts/testResults.ps1 | 0 {azure-pipelines => tools}/artifacts/test_symbols.ps1 | 0 {azure-pipelines => tools}/variables/DotNetSdkVersion.ps1 | 0 {azure-pipelines => tools}/variables/_all.ps1 | 0 20 files changed, 9 insertions(+), 9 deletions(-) rename azure-pipelines/{variables/_pipelines.ps1 => define_variables.ps1} (95%) rename azure-pipelines/{artifacts/_pipelines.ps1 => publish_artifacts.ps1} (92%) rename {azure-pipelines => tools}/Get-SymbolFiles.ps1 (100%) rename {azure-pipelines => tools}/artifacts/Variables.ps1 (100%) rename {azure-pipelines => tools}/artifacts/_all.ps1 (100%) mode change 100755 => 100644 rename {azure-pipelines => tools}/artifacts/_stage_all.ps1 (100%) rename {azure-pipelines => tools}/artifacts/build_logs.ps1 (100%) rename {azure-pipelines => tools}/artifacts/coverageResults.ps1 (100%) rename {azure-pipelines => tools}/artifacts/deployables.ps1 (100%) rename {azure-pipelines => tools}/artifacts/projectAssetsJson.ps1 (100%) rename {azure-pipelines => tools}/artifacts/symbols.ps1 (100%) rename {azure-pipelines => tools}/artifacts/testResults.ps1 (100%) rename {azure-pipelines => tools}/artifacts/test_symbols.ps1 (100%) rename {azure-pipelines => tools}/variables/DotNetSdkVersion.ps1 (100%) rename {azure-pipelines => tools}/variables/_all.ps1 (100%) mode change 100755 => 100644 diff --git a/.github/actions/publish-artifacts/action.yaml b/.github/actions/publish-artifacts/action.yaml index 94b74261..228b6404 100644 --- a/.github/actions/publish-artifacts/action.yaml +++ b/.github/actions/publish-artifacts/action.yaml @@ -5,7 +5,7 @@ runs: using: composite steps: - name: ๐Ÿ“ฅ Collect artifacts - run: azure-pipelines/artifacts/_stage_all.ps1 + run: tools/artifacts/_stage_all.ps1 shell: pwsh if: always() diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5e338ffa..e6ffd301 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -43,7 +43,7 @@ jobs: } shell: pwsh - name: โš™๏ธ Set pipeline variables based on source - run: azure-pipelines/variables/_pipelines.ps1 + run: azure-pipelines/define_variables.ps1 shell: pwsh - name: ๐Ÿ›  build run: dotnet build -t:build,pack --no-restore -c ${{ env.BUILDCONFIGURATION }} -warnAsError -warnNotAsError:NU1901,NU1902,NU1903,NU1904 /bl:"${{ runner.temp }}/_artifacts/build_logs/build.binlog" @@ -58,7 +58,7 @@ jobs: run: dotnet docfx docfx/docfx.json --warningsAsErrors --disableGitFeatures if: runner.os == 'Linux' - name: โš™ Update pipeline variables based on build outputs - run: azure-pipelines/variables/_pipelines.ps1 + run: azure-pipelines/define_variables.ps1 shell: pwsh - name: ๐Ÿ“ข Publish artifacts uses: ./.github/actions/publish-artifacts diff --git a/azure-pipelines/variables/_pipelines.ps1 b/azure-pipelines/define_variables.ps1 similarity index 95% rename from azure-pipelines/variables/_pipelines.ps1 rename to azure-pipelines/define_variables.ps1 index d40e5cf1..9cf36286 100644 --- a/azure-pipelines/variables/_pipelines.ps1 +++ b/azure-pipelines/define_variables.ps1 @@ -11,7 +11,7 @@ param ( ) -(& "$PSScriptRoot\_all.ps1").GetEnumerator() |% { +(& "$PSScriptRoot\..\tools\variables\_all.ps1").GetEnumerator() |% { # Always use ALL CAPS for env var names since Azure Pipelines converts variable names to all caps and on non-Windows OS, env vars are case sensitive. $keyCaps = $_.Key.ToUpper() if ((Test-Path "env:$keyCaps") -and (Get-Content "env:$keyCaps")) { diff --git a/azure-pipelines/dotnet.yml b/azure-pipelines/dotnet.yml index 2ce80af3..f0942238 100644 --- a/azure-pipelines/dotnet.yml +++ b/azure-pipelines/dotnet.yml @@ -10,12 +10,12 @@ steps: displayName: ๐Ÿงช dotnet test condition: and(succeeded(), ${{ parameters.RunTests }}) -- powershell: azure-pipelines/variables/_pipelines.ps1 +- powershell: azure-pipelines/define_variables.ps1 failOnStderr: true displayName: โš™ Update pipeline variables based on build outputs condition: succeededOrFailed() -- powershell: azure-pipelines/artifacts/_pipelines.ps1 -ArtifactNameSuffix "-$(Agent.JobName)" -Verbose +- powershell: azure-pipelines/publish_artifacts.ps1 -ArtifactNameSuffix "-$(Agent.JobName)" -Verbose failOnStderr: true displayName: ๐Ÿ“ข Publish artifacts condition: succeededOrFailed() diff --git a/azure-pipelines/install-dependencies.yml b/azure-pipelines/install-dependencies.yml index 81782668..ce88b25e 100644 --- a/azure-pipelines/install-dependencies.yml +++ b/azure-pipelines/install-dependencies.yml @@ -19,7 +19,7 @@ steps: } displayName: โš™ Install prerequisites -- powershell: azure-pipelines/variables/_pipelines.ps1 +- powershell: azure-pipelines/define_variables.ps1 failOnStderr: true displayName: โš™ Set pipeline variables based on source name: SetPipelineVariables diff --git a/azure-pipelines/artifacts/_pipelines.ps1 b/azure-pipelines/publish_artifacts.ps1 similarity index 92% rename from azure-pipelines/artifacts/_pipelines.ps1 rename to azure-pipelines/publish_artifacts.ps1 index 5f259a51..3f35cc6e 100644 --- a/azure-pipelines/artifacts/_pipelines.ps1 +++ b/azure-pipelines/publish_artifacts.ps1 @@ -25,7 +25,7 @@ Function Test-ArtifactUploaded($artifactName) { Test-Path "env:$varName" } -& "$PSScriptRoot/_stage_all.ps1" -ArtifactNameSuffix $ArtifactNameSuffix -AvoidSymbolicLinks:$AvoidSymbolicLinks |% { +& "$PSScriptRoot/../tools/artifacts/_stage_all.ps1" -ArtifactNameSuffix $ArtifactNameSuffix -AvoidSymbolicLinks:$AvoidSymbolicLinks |% { # Set a variable which will out-live this script so that a subsequent attempt to collect and upload artifacts # will skip this one from a check in the _all.ps1 script. Set-PipelineVariable "ARTIFACTSTAGED_$($_.Name.ToUpper())" 'true' diff --git a/azure-pipelines/Get-SymbolFiles.ps1 b/tools/Get-SymbolFiles.ps1 similarity index 100% rename from azure-pipelines/Get-SymbolFiles.ps1 rename to tools/Get-SymbolFiles.ps1 diff --git a/tools/Install-DotNetSdk.ps1 b/tools/Install-DotNetSdk.ps1 index ffb52203..e08571bc 100644 --- a/tools/Install-DotNetSdk.ps1 +++ b/tools/Install-DotNetSdk.ps1 @@ -36,7 +36,7 @@ if (!(Test-Path $DotNetInstallScriptRoot)) { New-Item -ItemType Directory -Path $DotNetInstallScriptRoot = Resolve-Path $DotNetInstallScriptRoot # Look up actual required .NET SDK version from global.json -$sdkVersion = & "$PSScriptRoot/../azure-pipelines/variables/DotNetSdkVersion.ps1" +$sdkVersion = & "$PSScriptRoot/variables/DotNetSdkVersion.ps1" If ($IncludeX86 -and ($IsMacOS -or $IsLinux)) { Write-Verbose "Ignoring -IncludeX86 switch because 32-bit runtimes are only supported on Windows." diff --git a/azure-pipelines/artifacts/Variables.ps1 b/tools/artifacts/Variables.ps1 similarity index 100% rename from azure-pipelines/artifacts/Variables.ps1 rename to tools/artifacts/Variables.ps1 diff --git a/azure-pipelines/artifacts/_all.ps1 b/tools/artifacts/_all.ps1 old mode 100755 new mode 100644 similarity index 100% rename from azure-pipelines/artifacts/_all.ps1 rename to tools/artifacts/_all.ps1 diff --git a/azure-pipelines/artifacts/_stage_all.ps1 b/tools/artifacts/_stage_all.ps1 similarity index 100% rename from azure-pipelines/artifacts/_stage_all.ps1 rename to tools/artifacts/_stage_all.ps1 diff --git a/azure-pipelines/artifacts/build_logs.ps1 b/tools/artifacts/build_logs.ps1 similarity index 100% rename from azure-pipelines/artifacts/build_logs.ps1 rename to tools/artifacts/build_logs.ps1 diff --git a/azure-pipelines/artifacts/coverageResults.ps1 b/tools/artifacts/coverageResults.ps1 similarity index 100% rename from azure-pipelines/artifacts/coverageResults.ps1 rename to tools/artifacts/coverageResults.ps1 diff --git a/azure-pipelines/artifacts/deployables.ps1 b/tools/artifacts/deployables.ps1 similarity index 100% rename from azure-pipelines/artifacts/deployables.ps1 rename to tools/artifacts/deployables.ps1 diff --git a/azure-pipelines/artifacts/projectAssetsJson.ps1 b/tools/artifacts/projectAssetsJson.ps1 similarity index 100% rename from azure-pipelines/artifacts/projectAssetsJson.ps1 rename to tools/artifacts/projectAssetsJson.ps1 diff --git a/azure-pipelines/artifacts/symbols.ps1 b/tools/artifacts/symbols.ps1 similarity index 100% rename from azure-pipelines/artifacts/symbols.ps1 rename to tools/artifacts/symbols.ps1 diff --git a/azure-pipelines/artifacts/testResults.ps1 b/tools/artifacts/testResults.ps1 similarity index 100% rename from azure-pipelines/artifacts/testResults.ps1 rename to tools/artifacts/testResults.ps1 diff --git a/azure-pipelines/artifacts/test_symbols.ps1 b/tools/artifacts/test_symbols.ps1 similarity index 100% rename from azure-pipelines/artifacts/test_symbols.ps1 rename to tools/artifacts/test_symbols.ps1 diff --git a/azure-pipelines/variables/DotNetSdkVersion.ps1 b/tools/variables/DotNetSdkVersion.ps1 similarity index 100% rename from azure-pipelines/variables/DotNetSdkVersion.ps1 rename to tools/variables/DotNetSdkVersion.ps1 diff --git a/azure-pipelines/variables/_all.ps1 b/tools/variables/_all.ps1 old mode 100755 new mode 100644 similarity index 100% rename from azure-pipelines/variables/_all.ps1 rename to tools/variables/_all.ps1 From fe7350fbebf12912487fa3397bd5c9bd95127859 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Tue, 24 Dec 2024 09:51:28 -0700 Subject: [PATCH 036/110] Move variable definition script --- .github/workflows/build.yml | 4 ++-- azure-pipelines/dotnet.yml | 2 +- azure-pipelines/install-dependencies.yml | 2 +- .../define_variables.ps1 => tools/variables/_define.ps1 | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) rename azure-pipelines/define_variables.ps1 => tools/variables/_define.ps1 (95%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e6ffd301..5b4fc7be 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -43,7 +43,7 @@ jobs: } shell: pwsh - name: โš™๏ธ Set pipeline variables based on source - run: azure-pipelines/define_variables.ps1 + run: tools/variables/_define.ps1 shell: pwsh - name: ๐Ÿ›  build run: dotnet build -t:build,pack --no-restore -c ${{ env.BUILDCONFIGURATION }} -warnAsError -warnNotAsError:NU1901,NU1902,NU1903,NU1904 /bl:"${{ runner.temp }}/_artifacts/build_logs/build.binlog" @@ -58,7 +58,7 @@ jobs: run: dotnet docfx docfx/docfx.json --warningsAsErrors --disableGitFeatures if: runner.os == 'Linux' - name: โš™ Update pipeline variables based on build outputs - run: azure-pipelines/define_variables.ps1 + run: tools/variables/_define.ps1 shell: pwsh - name: ๐Ÿ“ข Publish artifacts uses: ./.github/actions/publish-artifacts diff --git a/azure-pipelines/dotnet.yml b/azure-pipelines/dotnet.yml index f0942238..30bb4107 100644 --- a/azure-pipelines/dotnet.yml +++ b/azure-pipelines/dotnet.yml @@ -10,7 +10,7 @@ steps: displayName: ๐Ÿงช dotnet test condition: and(succeeded(), ${{ parameters.RunTests }}) -- powershell: azure-pipelines/define_variables.ps1 +- powershell: tools/variables/_define.ps1 failOnStderr: true displayName: โš™ Update pipeline variables based on build outputs condition: succeededOrFailed() diff --git a/azure-pipelines/install-dependencies.yml b/azure-pipelines/install-dependencies.yml index ce88b25e..5944bc9e 100644 --- a/azure-pipelines/install-dependencies.yml +++ b/azure-pipelines/install-dependencies.yml @@ -19,7 +19,7 @@ steps: } displayName: โš™ Install prerequisites -- powershell: azure-pipelines/define_variables.ps1 +- powershell: tools/variables/_define.ps1 failOnStderr: true displayName: โš™ Set pipeline variables based on source name: SetPipelineVariables diff --git a/azure-pipelines/define_variables.ps1 b/tools/variables/_define.ps1 similarity index 95% rename from azure-pipelines/define_variables.ps1 rename to tools/variables/_define.ps1 index 9cf36286..d40e5cf1 100644 --- a/azure-pipelines/define_variables.ps1 +++ b/tools/variables/_define.ps1 @@ -11,7 +11,7 @@ param ( ) -(& "$PSScriptRoot\..\tools\variables\_all.ps1").GetEnumerator() |% { +(& "$PSScriptRoot\_all.ps1").GetEnumerator() |% { # Always use ALL CAPS for env var names since Azure Pipelines converts variable names to all caps and on non-Windows OS, env vars are case sensitive. $keyCaps = $_.Key.ToUpper() if ((Test-Path "env:$keyCaps") -and (Get-Content "env:$keyCaps")) { From bd10eaad9c1069e96c282383132765797b0344de Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Thu, 26 Dec 2024 15:16:12 -0700 Subject: [PATCH 037/110] Group dependabot update PRs --- .github/dependabot.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index b168ac6d..a7a1782f 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -7,6 +7,14 @@ updates: directory: / schedule: interval: weekly + groups: + nerdbank-gitversioning: + patterns: + - nbgv + - nerdbank.gitversioning + xunit: + patterns: + - 'xunit*' - package-ecosystem: dotnet-sdk directory: / schedule: From 05072c1f50722d8eaa99e1a17299c57d5f1a5365 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Thu, 26 Dec 2024 16:06:41 -0700 Subject: [PATCH 038/110] Switch from Dependabot to Renovate --- .github/dependabot.yml | 21 --------------------- .github/renovate.json | 24 ++++++++++++++++++++++++ CONTRIBUTING.md | 10 ++++++++++ 3 files changed, 34 insertions(+), 21 deletions(-) delete mode 100644 .github/dependabot.yml create mode 100644 .github/renovate.json diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index a7a1782f..00000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,21 +0,0 @@ -# Please see the documentation for all configuration options: -# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file - -version: 2 -updates: -- package-ecosystem: nuget - directory: / - schedule: - interval: weekly - groups: - nerdbank-gitversioning: - patterns: - - nbgv - - nerdbank.gitversioning - xunit: - patterns: - - 'xunit*' -- package-ecosystem: dotnet-sdk - directory: / - schedule: - interval: monthly diff --git a/.github/renovate.json b/.github/renovate.json new file mode 100644 index 00000000..a9fbeb23 --- /dev/null +++ b/.github/renovate.json @@ -0,0 +1,24 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "config:recommended" + ], + "semanticCommits": "disabled", + "prHourlyLimit": 5, + "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" + } + ] +} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 52d83a88..77f5e0a3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -72,3 +72,13 @@ You can make changes and host the site locally to preview them by switching to t After making a change, you can rebuild the docs site while the localhost server is running by running `dotnet docfx` again from a separate terminal. The `.github/workflows/docs.yml` GitHub Actions workflow publishes the content of these docs to github.io if the workflow itself and [GitHub Pages is enabled for your repository](https://docs.github.com/en/pages/quickstart). + +## Updating dependencies + +This repo uses Renovate to keep dependencies current. +Configuration is in the `.github/renovate.json` file. +[Learn more about configuring Renovate](https://docs.renovatebot.com/configuration-options/). + +When changing the renovate.json file, follow [these validation steps](https://docs.renovatebot.com/config-validation/). + +If Renovate is not creating pull requests when you expect it to, check that the [Renovate GitHub App](https://github.com/apps/renovate) is configured for your account or repo. From 72caf2d7baaa56bb5638dfd71e60e42de014e12f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 26 Dec 2024 23:08:25 +0000 Subject: [PATCH 039/110] Update mcr.microsoft.com/dotnet/sdk Docker tag to v9.0.101 --- .devcontainer/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 42fd12a7..3674e182 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,5 +1,5 @@ # Refer to https://hub.docker.com/_/microsoft-dotnet-sdk for available versions -FROM mcr.microsoft.com/dotnet/sdk:9.0.100-noble +FROM mcr.microsoft.com/dotnet/sdk:9.0.101-noble # Installing mono makes `dotnet test` work without errors even for net472. # But installing it takes a long time, so it's excluded by default. From b353d1fb965bd85f73fee096eda88de20ae206dc Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 26 Dec 2024 23:08:30 +0000 Subject: [PATCH 040/110] Update dependency ubuntu to v24 --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ed0f5924..766ebaf5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,7 +17,7 @@ permissions: jobs: release: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: โš™๏ธ Initialization shell: pwsh From 147f846d07821941e3c40f8ba8747d2bd62fa76b Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Thu, 26 Dec 2024 18:00:17 -0700 Subject: [PATCH 041/110] Drop renovate PR hourly limit back to default --- .github/renovate.json | 1 - README.md | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/renovate.json b/.github/renovate.json index a9fbeb23..498ca420 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -4,7 +4,6 @@ "config:recommended" ], "semanticCommits": "disabled", - "prHourlyLimit": 5, "labels": ["dependencies"], "packageRules": [ { diff --git a/README.md b/README.md index 33ddbfab..610e6504 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,8 @@ Further customize your repo by: 1. Verify the license is suitable for your goal as it appears in the LICENSE and stylecop.json files and the Directory.Build.props file's `PackageLicenseExpression` property. 1. Reset or replace the badges at the top of this file. +[Activate Renovate automated dependency updates](https://docs.renovatebot.com/getting-started/installing-onboarding/) for your repo. + ### Maintaining your repo based on this template The best way to keep your repo in sync with this template's evolving features and best practices is to periodically merge the template into your repo: From ddc4c2d1b86ea10672fb07e69279d94308dc76aa Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Sat, 28 Dec 2024 08:39:07 -0700 Subject: [PATCH 042/110] Use JSON5 for renovate configuration --- .devcontainer/devcontainer.json | 3 ++- .github/.editorconfig | 2 ++ .github/renovate.json | 23 ----------------------- .github/renovate.json5 | 21 +++++++++++++++++++++ .vscode/extensions.json | 3 ++- 5 files changed, 27 insertions(+), 25 deletions(-) create mode 100644 .github/.editorconfig delete mode 100644 .github/renovate.json create mode 100644 .github/renovate.json5 diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 01a087c7..8f77d288 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -16,6 +16,7 @@ "dotjoshjohnson.xml", "ms-vscode-remote.remote-containers", "ms-azuretools.vscode-docker", - "tintoy.msbuild-project-tools" + "tintoy.msbuild-project-tools", + "mrmlnc.vscode-json5" ] } diff --git a/.github/.editorconfig b/.github/.editorconfig new file mode 100644 index 00000000..2b7682ef --- /dev/null +++ b/.github/.editorconfig @@ -0,0 +1,2 @@ +[renovate.json*] +indent_style = tab diff --git a/.github/renovate.json b/.github/renovate.json deleted file mode 100644 index 498ca420..00000000 --- a/.github/renovate.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "$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" - } - ] -} diff --git a/.github/renovate.json5 b/.github/renovate.json5 new file mode 100644 index 00000000..76f2fb1f --- /dev/null +++ b/.github/renovate.json5 @@ -0,0 +1,21 @@ +{ + $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", + }, + ], +} diff --git a/.vscode/extensions.json b/.vscode/extensions.json index acaf0213..b289e507 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -13,7 +13,8 @@ "dotjoshjohnson.xml", "ms-vscode-remote.remote-containers", "ms-azuretools.vscode-docker", - "tintoy.msbuild-project-tools" + "tintoy.msbuild-project-tools", + "mrmlnc.vscode-json5" ], // List of extensions recommended by VS Code that should not be recommended for users of this workspace. "unwantedRecommendations": [] From 7e3ea7889b92003802fa9222740226ed2bb78f8c Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Sat, 28 Dec 2024 08:40:04 -0700 Subject: [PATCH 043/110] Update devcontainer schema --- .devcontainer/devcontainer.json | 38 ++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 8f77d288..3be99af4 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,22 +1,26 @@ { "name": "Dev space", "dockerFile": "Dockerfile", - "settings": { - "terminal.integrated.shell.linux": "/usr/bin/pwsh" + "customizations": { + "vscode": { + "settings": { + "terminal.integrated.shell.linux": "/usr/bin/pwsh" + }, + "extensions": [ + "ms-azure-devops.azure-pipelines", + "ms-dotnettools.csharp", + "k--kato.docomment", + "editorconfig.editorconfig", + "esbenp.prettier-vscode", + "pflannery.vscode-versionlens", + "davidanson.vscode-markdownlint", + "dotjoshjohnson.xml", + "ms-vscode-remote.remote-containers", + "ms-azuretools.vscode-docker", + "tintoy.msbuild-project-tools", + "mrmlnc.vscode-json5" + ] + } }, - "postCreateCommand": "./init.ps1 -InstallLocality machine", - "extensions": [ - "ms-azure-devops.azure-pipelines", - "ms-dotnettools.csharp", - "k--kato.docomment", - "editorconfig.editorconfig", - "esbenp.prettier-vscode", - "pflannery.vscode-versionlens", - "davidanson.vscode-markdownlint", - "dotjoshjohnson.xml", - "ms-vscode-remote.remote-containers", - "ms-azuretools.vscode-docker", - "tintoy.msbuild-project-tools", - "mrmlnc.vscode-json5" - ] + "postCreateCommand": "./init.ps1 -InstallLocality machine" } From 6ad0c9460ff72b51497e102fde1f3029a1442792 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Sun, 29 Dec 2024 18:48:38 -0700 Subject: [PATCH 044/110] Rename renovate config back to .json .json5 was fine, but VS Code doesn't have native support for it, and the popular JSON5 extension doesn't support JSON schema. --- .devcontainer/devcontainer.json | 3 +-- .github/renovate.json | 21 +++++++++++++++++++++ .github/renovate.json5 | 21 --------------------- .vscode/extensions.json | 3 +-- 4 files changed, 23 insertions(+), 25 deletions(-) create mode 100644 .github/renovate.json delete mode 100644 .github/renovate.json5 diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 3be99af4..1a3a0086 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -17,8 +17,7 @@ "dotjoshjohnson.xml", "ms-vscode-remote.remote-containers", "ms-azuretools.vscode-docker", - "tintoy.msbuild-project-tools", - "mrmlnc.vscode-json5" + "tintoy.msbuild-project-tools" ] } }, diff --git a/.github/renovate.json b/.github/renovate.json new file mode 100644 index 00000000..c140014f --- /dev/null +++ b/.github/renovate.json @@ -0,0 +1,21 @@ +{ + "$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" + } + ] +} diff --git a/.github/renovate.json5 b/.github/renovate.json5 deleted file mode 100644 index 76f2fb1f..00000000 --- a/.github/renovate.json5 +++ /dev/null @@ -1,21 +0,0 @@ -{ - $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", - }, - ], -} diff --git a/.vscode/extensions.json b/.vscode/extensions.json index b289e507..acaf0213 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -13,8 +13,7 @@ "dotjoshjohnson.xml", "ms-vscode-remote.remote-containers", "ms-azuretools.vscode-docker", - "tintoy.msbuild-project-tools", - "mrmlnc.vscode-json5" + "tintoy.msbuild-project-tools" ], // List of extensions recommended by VS Code that should not be recommended for users of this workspace. "unwantedRecommendations": [] From fadd4eb10683551901b3b04899c3dd74b2b7ec1f Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Tue, 31 Dec 2024 16:16:17 -0700 Subject: [PATCH 045/110] Fix test logs collection They are intended to be collected as part of the `testResults` artifact. --- .github/actions/publish-artifacts/action.yaml | 7 ------- tools/artifacts/testResults.ps1 | 3 ++- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/actions/publish-artifacts/action.yaml b/.github/actions/publish-artifacts/action.yaml index 228b6404..2a75c4d2 100644 --- a/.github/actions/publish-artifacts/action.yaml +++ b/.github/actions/publish-artifacts/action.yaml @@ -32,13 +32,6 @@ runs: name: build_logs-${{ runner.os }} path: ${{ runner.temp }}/_artifacts/build_logs continue-on-error: true - - name: ๐Ÿ“ข Upload test_logs - if: always() - uses: actions/upload-artifact@v4 - with: - name: test_logs-${{ runner.os }} - path: ${{ runner.temp }}/_artifacts/test_logs - continue-on-error: true - name: ๐Ÿ“ข Upload testResults if: always() uses: actions/upload-artifact@v4 diff --git a/tools/artifacts/testResults.ps1 b/tools/artifacts/testResults.ps1 index 301a4376..07146957 100644 --- a/tools/artifacts/testResults.ps1 +++ b/tools/artifacts/testResults.ps1 @@ -7,7 +7,8 @@ $result = @{} $testRoot = Resolve-Path "$PSScriptRoot\..\..\test" $result[$testRoot] = (Get-ChildItem "$testRoot\TestResults" -Recurse -Directory | Get-ChildItem -Recurse -File) -$testlogsPath = "$env:BUILD_ARTIFACTSTAGINGDIRECTORY\test_logs" +$artifactStaging = & "$PSScriptRoot\..\Get-ArtifactsStagingDirectory.ps1" +$testlogsPath = Join-Path $artifactStaging "test_logs" if (Test-Path $testlogsPath) { $result[$testlogsPath] = Get-ChildItem "$testlogsPath\*"; } From 16f72e358da97fb5058f32eef4002a1dc33a6e3d Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Wed, 1 Jan 2025 10:30:13 -0700 Subject: [PATCH 046/110] Take care to use proper slashes per OS for testing --- tools/Get-ArtifactsStagingDirectory.ps1 | 2 +- tools/artifacts/testResults.ps1 | 2 +- tools/dotnet-test-cloud.ps1 | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/tools/Get-ArtifactsStagingDirectory.ps1 b/tools/Get-ArtifactsStagingDirectory.ps1 index 391e5713..18967f4c 100644 --- a/tools/Get-ArtifactsStagingDirectory.ps1 +++ b/tools/Get-ArtifactsStagingDirectory.ps1 @@ -4,7 +4,7 @@ Param( if ($env:BUILD_ARTIFACTSTAGINGDIRECTORY) { $ArtifactStagingFolder = $env:BUILD_ARTIFACTSTAGINGDIRECTORY } elseif ($env:RUNNER_TEMP) { - $ArtifactStagingFolder = "$env:RUNNER_TEMP\_artifacts" + $ArtifactStagingFolder = Join-Path $env:RUNNER_TEMP _artifacts } else { $ArtifactStagingFolder = [System.IO.Path]::GetFullPath("$PSScriptRoot/../obj/_artifacts") if ($CleanIfLocal -and (Test-Path $ArtifactStagingFolder)) { diff --git a/tools/artifacts/testResults.ps1 b/tools/artifacts/testResults.ps1 index 07146957..519a63c0 100644 --- a/tools/artifacts/testResults.ps1 +++ b/tools/artifacts/testResults.ps1 @@ -10,7 +10,7 @@ $result[$testRoot] = (Get-ChildItem "$testRoot\TestResults" -Recurse -Directory $artifactStaging = & "$PSScriptRoot\..\Get-ArtifactsStagingDirectory.ps1" $testlogsPath = Join-Path $artifactStaging "test_logs" if (Test-Path $testlogsPath) { - $result[$testlogsPath] = Get-ChildItem "$testlogsPath\*"; + $result[$testlogsPath] = Get-ChildItem $testlogsPath -Recurse; } $result diff --git a/tools/dotnet-test-cloud.ps1 b/tools/dotnet-test-cloud.ps1 index 33ff3d7c..10cd4311 100644 --- a/tools/dotnet-test-cloud.ps1 +++ b/tools/dotnet-test-cloud.ps1 @@ -44,6 +44,9 @@ if ($x86) { } } +$testBinLog = Join-Path $ArtifactStagingFolder (Join-Path build_logs test.binlog) +$testDiagLog = Join-Path $ArtifactStagingFolder (Join-Path test_logs diag.log) + & $dotnet test $RepoRoot ` --no-build ` -c $Configuration ` @@ -52,8 +55,8 @@ if ($x86) { --settings "$PSScriptRoot/test.runsettings" ` --blame-hang-timeout 60s ` --blame-crash ` - -bl:"$ArtifactStagingFolder/build_logs/test.binlog" ` - --diag "$ArtifactStagingFolder/test_logs/diag.log;TraceLevel=info" ` + -bl:"$testBinLog" ` + --diag "$testDiagLog;TraceLevel=info" ` --logger trx ` $unknownCounter = 0 From 656c5ff5cb3897ca2151842a1e050598c422b140 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Sun, 5 Jan 2025 13:15:50 -0700 Subject: [PATCH 047/110] Match test assemblies that are built as exe's Fixes #332 --- tools/dotnet-test-cloud.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/dotnet-test-cloud.ps1 b/tools/dotnet-test-cloud.ps1 index 10cd4311..02891d97 100644 --- a/tools/dotnet-test-cloud.ps1 +++ b/tools/dotnet-test-cloud.ps1 @@ -68,7 +68,7 @@ Get-ChildItem -Recurse -Path $RepoRoot\test\*.trx |% { $runTitle = $null if ($x.TestRun.TestDefinitions -and $x.TestRun.TestDefinitions.GetElementsByTagName('UnitTest')) { $storage = $x.TestRun.TestDefinitions.GetElementsByTagName('UnitTest')[0].storage -replace '\\','/' - if ($storage -match '/(?net[^/]+)/(?:(?[^/]+)/)?(?[^/]+)\.dll$') { + if ($storage -match '/(?net[^/]+)/(?:(?[^/]+)/)?(?[^/]+)\.(dll|exe)$') { if ($matches.rid) { $runTitle = "$($matches.lib) ($($matches.tfm), $($matches.rid), $Agent)" } else { From 5f9a3444985dc683c096209870eb7bff36f26e67 Mon Sep 17 00:00:00 2001 From: Richard Stanton Date: Fri, 7 Jun 2024 19:46:00 -0700 Subject: [PATCH 048/110] Ensure Expand-Template uses UTF-8 when replacing placeholders. --- Expand-Template.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Expand-Template.ps1 b/Expand-Template.ps1 index 9f9db676..ae162313 100755 --- a/Expand-Template.ps1 +++ b/Expand-Template.ps1 @@ -40,7 +40,7 @@ function Replace-Placeholders { $Path = Resolve-Path $Path Write-Host "Replacing tokens in `"$Path`"" - $content = Get-Content -LiteralPath $Path | Out-String + $content = Get-Content -Encoding UTF8 -LiteralPath $Path | Out-String $Replacements.GetEnumerator() |% { $modifiedContent = $content -replace $_.Key,$_.Value if ($modifiedContent -eq $content) { From b3fc0f3f597580e67990716ef8aad9cb47d74b9d Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Mon, 6 Jan 2025 19:34:39 -0700 Subject: [PATCH 049/110] Simplify certain ps1 script paths --- tools/artifacts/_stage_all.ps1 | 2 +- tools/artifacts/build_logs.ps1 | 2 +- tools/artifacts/testResults.ps1 | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/artifacts/_stage_all.ps1 b/tools/artifacts/_stage_all.ps1 index 08e9844c..bf961ce5 100644 --- a/tools/artifacts/_stage_all.ps1 +++ b/tools/artifacts/_stage_all.ps1 @@ -11,7 +11,7 @@ param ( [switch]$AvoidSymbolicLinks ) -$ArtifactStagingFolder = & "$PSScriptRoot/../../tools/Get-ArtifactsStagingDirectory.ps1" -CleanIfLocal +$ArtifactStagingFolder = & "$PSScriptRoot/../Get-ArtifactsStagingDirectory.ps1" -CleanIfLocal function Create-SymbolicLink { param ( diff --git a/tools/artifacts/build_logs.ps1 b/tools/artifacts/build_logs.ps1 index 10c5478b..f05358e0 100644 --- a/tools/artifacts/build_logs.ps1 +++ b/tools/artifacts/build_logs.ps1 @@ -1,4 +1,4 @@ -$ArtifactStagingFolder = & "$PSScriptRoot/../../tools/Get-ArtifactsStagingDirectory.ps1" +$ArtifactStagingFolder = & "$PSScriptRoot/../Get-ArtifactsStagingDirectory.ps1" if (!(Test-Path $ArtifactStagingFolder/build_logs)) { return } diff --git a/tools/artifacts/testResults.ps1 b/tools/artifacts/testResults.ps1 index 519a63c0..5310fb52 100644 --- a/tools/artifacts/testResults.ps1 +++ b/tools/artifacts/testResults.ps1 @@ -7,7 +7,7 @@ $result = @{} $testRoot = Resolve-Path "$PSScriptRoot\..\..\test" $result[$testRoot] = (Get-ChildItem "$testRoot\TestResults" -Recurse -Directory | Get-ChildItem -Recurse -File) -$artifactStaging = & "$PSScriptRoot\..\Get-ArtifactsStagingDirectory.ps1" +$artifactStaging = & "$PSScriptRoot/../Get-ArtifactsStagingDirectory.ps1" $testlogsPath = Join-Path $artifactStaging "test_logs" if (Test-Path $testlogsPath) { $result[$testlogsPath] = Get-ChildItem $testlogsPath -Recurse; From 048010c3a101eb0b26965759e55b188dd576c37f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 10 Jan 2025 07:14:33 -0700 Subject: [PATCH 050/110] Update xunit (#336) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- Directory.Packages.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 63808e7c..c3f32204 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -10,8 +10,8 @@ - - + + From 6ac5aae85808499ecfe561ffeac39a50aaa21b84 Mon Sep 17 00:00:00 2001 From: Matteo Prosperi <41970398+matteo-prosperi@users.noreply.github.com> Date: Fri, 10 Jan 2025 12:19:51 -0800 Subject: [PATCH 051/110] Fix InsertJsonValues script (#337) * Fix InsertJsonValues script I believe that `LibraryName` here is a typo considering that it is in a loop and we couldn't just replace it with a fixed string (even one that is specific to the repo) * Fix vsman file URL formatting * Update Expand-Template.ps1 --- Expand-Template.ps1 | 4 ---- tools/variables/InsertJsonValues.ps1 | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/Expand-Template.ps1 b/Expand-Template.ps1 index 70191c72..0bc5f440 100755 --- a/Expand-Template.ps1 +++ b/Expand-Template.ps1 @@ -172,10 +172,6 @@ try { 'LibraryNoDots' = $LibraryName.Replace('.',''); } - Replace-Placeholders -Path "tools/variables/InsertJsonValues.ps1" -Replacements @{ - 'LibraryName' = $LibraryName; - } - Replace-Placeholders -Path "tools/variables/SymbolsFeatureName.ps1" -Replacements @{ 'LibraryName' = $LibraryName; } diff --git a/tools/variables/InsertJsonValues.ps1 b/tools/variables/InsertJsonValues.ps1 index 807ca1cb..7aa8d30c 100644 --- a/tools/variables/InsertJsonValues.ps1 +++ b/tools/variables/InsertJsonValues.ps1 @@ -11,7 +11,7 @@ if (Test-Path $BasePath) { Get-ChildItem $BasePath *.vsman -Recurse -File |% { $version = (Get-Content $_.FullName | ConvertFrom-Json).info.buildVersion $fn = $_.Name - $vsmanFiles += "LibraryName.vsman{$version}=https://vsdrop.corp.microsoft.com/file/v1/$vstsDropNames;$fn" + $vsmanFiles += "$fn{$version}=https://vsdrop.corp.microsoft.com/file/v1/$vstsDropNames;$fn" } [string]::join(',',$vsmanFiles) From b47196d0fd54776d22fea52f03d75086cc071ffe Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 10 Jan 2025 18:43:52 -0700 Subject: [PATCH 052/110] Update nbgv and nerdbank.gitversioning updates to 3.7.115 (#338) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .config/dotnet-tools.json | 2 +- Directory.Packages.props | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 3f79bdec..3a7b9b69 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -17,7 +17,7 @@ "rollForward": false }, "nbgv": { - "version": "3.7.112", + "version": "3.7.115", "commands": [ "nbgv" ], diff --git a/Directory.Packages.props b/Directory.Packages.props index c3f32204..8811c1ea 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -20,7 +20,7 @@ - + From 48ff6ea445004c5b71c7e89eba5ceb7381871961 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Mon, 13 Jan 2025 15:11:33 -0700 Subject: [PATCH 053/110] Bump MicroBuildInsertVsPayload to v5 --- azure-pipelines/OptProf.yml | 2 +- azure-pipelines/vs-insertion.yml | 2 +- azure-pipelines/vs-validation.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/azure-pipelines/OptProf.yml b/azure-pipelines/OptProf.yml index b196e345..a70b9362 100644 --- a/azure-pipelines/OptProf.yml +++ b/azure-pipelines/OptProf.yml @@ -90,7 +90,7 @@ stages: packagesToPush: $(Agent.TempDirectory)/VSInsertion-Windows/*.nupkg publishVstsFeed: 97a41293-2972-4f48-8c0e-05493ae82010 # VS feed allowPackageConflicts: true - - task: MicroBuildInsertVsPayload@4 + - task: MicroBuildInsertVsPayload@5 displayName: Insert VS Payload inputs: TeamName: $(TeamName) diff --git a/azure-pipelines/vs-insertion.yml b/azure-pipelines/vs-insertion.yml index add241f0..f8998736 100644 --- a/azure-pipelines/vs-insertion.yml +++ b/azure-pipelines/vs-insertion.yml @@ -54,7 +54,7 @@ extends: packageParentPath: $(Pipeline.Workspace)/CI/VSInsertion-Windows allowPackageConflicts: true publishVstsFeed: VS - - task: MicroBuildInsertVsPayload@4 + - task: MicroBuildInsertVsPayload@5 displayName: ๐Ÿญ Insert VS Payload inputs: TeamName: $(TeamName) diff --git a/azure-pipelines/vs-validation.yml b/azure-pipelines/vs-validation.yml index eded8319..2a0f0900 100644 --- a/azure-pipelines/vs-validation.yml +++ b/azure-pipelines/vs-validation.yml @@ -87,7 +87,7 @@ extends: packageParentPath: $(Pipeline.Workspace)/VSInsertion-Windows allowPackageConflicts: true publishVstsFeed: VS - - task: MicroBuildInsertVsPayload@4 + - task: MicroBuildInsertVsPayload@5 displayName: ๐Ÿญ Insert VS Payload inputs: TeamName: $(TeamName) From 8819ea6092146216ee27258b321e1be5604b6caa Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Mon, 13 Jan 2025 19:40:30 -0700 Subject: [PATCH 054/110] Replace github build workflow with just docfx validation --- .github/workflows/build.yml | 72 ----------------------------- .github/workflows/docs_validate.yml | 22 +++++++++ 2 files changed, 22 insertions(+), 72 deletions(-) delete mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/docs_validate.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 7617cd99..00000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,72 +0,0 @@ -name: ๐Ÿญ Build - -on: - push: - branches: - - main - - 'v*.*' - - microbuild - - validate/* - pull_request: - workflow_dispatch: - -env: - DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true - BUILDCONFIGURATION: Release - # codecov_token: 4dc9e7e2-6b01-4932-a180-847b52b43d35 # Get a new one from https://codecov.io/ - NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages/ - -jobs: - build: - name: ๐Ÿญ Build - - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: - - ubuntu-22.04 - - macos-14 - - windows-2022 - - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 # avoid shallow clone so nbgv can do its work. - - name: โš™ Install prerequisites - run: | - ./init.ps1 -UpgradePrerequisites - dotnet --info - - # Print mono version if it is present. - if (Get-Command mono -ErrorAction SilentlyContinue) { - mono --version - } - shell: pwsh - - name: โš™๏ธ Set pipeline variables based on source - run: tools/variables/_define.ps1 - shell: pwsh - - name: ๐Ÿ›  build - run: dotnet build -t:build,pack --no-restore -c ${{ env.BUILDCONFIGURATION }} -warnAsError -warnNotAsError:NU1901,NU1902,NU1903,NU1904 /bl:"${{ runner.temp }}/_artifacts/build_logs/build.binlog" - - name: ๐Ÿงช test - run: tools/dotnet-test-cloud.ps1 -Configuration ${{ env.BUILDCONFIGURATION }} -Agent ${{ runner.os }} - shell: pwsh - - name: ๐Ÿ’…๐Ÿป Verify formatted code - run: dotnet format --verify-no-changes --no-restore - shell: pwsh - if: runner.os == 'Linux' - - name: ๐Ÿ“š Verify docfx build - run: dotnet docfx docfx/docfx.json --warningsAsErrors --disableGitFeatures - if: runner.os == 'Linux' - - name: โš™ Update pipeline variables based on build outputs - run: tools/variables/_define.ps1 - shell: pwsh - - name: ๐Ÿ“ข Publish artifacts - uses: ./.github/actions/publish-artifacts - if: cancelled() == false - - name: ๐Ÿ“ข Publish code coverage results to codecov.io - run: ./tools/publish-CodeCov.ps1 -CodeCovToken "${{ env.codecov_token }}" -PathToCodeCoverage "${{ runner.temp }}/_artifacts/coverageResults" -Name "${{ runner.os }} Coverage Results" -Flags "${{ runner.os }}" - shell: pwsh - timeout-minutes: 3 - continue-on-error: true - if: env.codecov_token != '' diff --git a/.github/workflows/docs_validate.yml b/.github/workflows/docs_validate.yml new file mode 100644 index 00000000..9be82c56 --- /dev/null +++ b/.github/workflows/docs_validate.yml @@ -0,0 +1,22 @@ +name: ๐Ÿ“ƒ Docfx Validate + +on: + pull_request: + workflow_dispatch: + +jobs: + build: + name: ๐Ÿ“š docfx + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 # avoid shallow clone so nbgv can do its work. + - name: โš™ Install prerequisites + run: | + ./init.ps1 -UpgradePrerequisites + dotnet --info + shell: pwsh + - name: ๐Ÿ“š Verify docfx build + run: dotnet docfx docfx/docfx.json --warningsAsErrors --disableGitFeatures + if: runner.os == 'Linux' From 84258fcadc61a58d352d064dbeab7fb62370db4b Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Tue, 14 Jan 2025 07:15:57 -0700 Subject: [PATCH 055/110] Adapt to breaking change in MicroBuildInsertVsPayload@5 --- azure-pipelines/vs-insertion.yml | 2 +- azure-pipelines/vs-validation.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines/vs-insertion.yml b/azure-pipelines/vs-insertion.yml index f8998736..6aaba41c 100644 --- a/azure-pipelines/vs-insertion.yml +++ b/azure-pipelines/vs-insertion.yml @@ -60,7 +60,7 @@ extends: TeamName: $(TeamName) TeamEmail: $(TeamEmail) InsertionPayloadName: $(Build.Repository.Name) $(Build.BuildNumber) - InsertionBuildPolicy: Request Perf DDRITs + InsertionBuildPolicies: Request Perf DDRITs InsertionReviewers: $(Build.RequestedFor) # Append `,Your team name` (without quotes) AutoCompletePR: true AutoCompleteMergeStrategy: Squash diff --git a/azure-pipelines/vs-validation.yml b/azure-pipelines/vs-validation.yml index 2a0f0900..2fa5086d 100644 --- a/azure-pipelines/vs-validation.yml +++ b/azure-pipelines/vs-validation.yml @@ -96,7 +96,7 @@ extends: InsertionDescription: | This PR is for **validation purposes only** for !$(System.PullRequest.PullRequestId). **Do not complete**. CustomScriptExecutionCommand: src/VSSDK/NuGet/AllowUnstablePackages.ps1 - InsertionBuildPolicy: Request Perf DDRITs + InsertionBuildPolicies: Request Perf DDRITs InsertionReviewers: $(Build.RequestedFor) DraftPR: false # set to true and update InsertionBuildPolicy when we can specify all the validations we want to run (https://dev.azure.com/devdiv/DevDiv/_workitems/edit/2224288) AutoCompletePR: false From 5a6c72d984bfd5baef7a70f77010905dbc9b9d00 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Tue, 14 Jan 2025 08:39:06 -0700 Subject: [PATCH 056/110] Bring back Dependabot --- .github/dependabot.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..a7a1782f --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,21 @@ +# Please see the documentation for all configuration options: +# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file + +version: 2 +updates: +- package-ecosystem: nuget + directory: / + schedule: + interval: weekly + groups: + nerdbank-gitversioning: + patterns: + - nbgv + - nerdbank.gitversioning + xunit: + patterns: + - 'xunit*' +- package-ecosystem: dotnet-sdk + directory: / + schedule: + interval: monthly From 862f998b734e016e71fa5045909e64208de05437 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Tue, 14 Jan 2025 11:52:44 -0700 Subject: [PATCH 057/110] Fix Install-NuGetPackage.ps1 script --- azure-pipelines/Install-NuGetPackage.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines/Install-NuGetPackage.ps1 b/azure-pipelines/Install-NuGetPackage.ps1 index 9afde055..f1db577a 100644 --- a/azure-pipelines/Install-NuGetPackage.ps1 +++ b/azure-pipelines/Install-NuGetPackage.ps1 @@ -33,7 +33,7 @@ Param( [string]$Verbosity='normal' ) -$nugetPath = & "$PSScriptRoot\Get-NuGetTool.ps1" +$nugetPath = & "$PSScriptRoot\..\tools\Get-NuGetTool.ps1" try { Write-Verbose "Installing $PackageId..." From d1583877d80f8b6447cfc22986391b4e54e7b780 Mon Sep 17 00:00:00 2001 From: Matteo Prosperi <41970398+matteo-prosperi@users.noreply.github.com> Date: Tue, 14 Jan 2025 11:06:13 -0800 Subject: [PATCH 058/110] Create a separate unofficial.yml pipeline (#334) --- Expand-Template.ps1 | 2 +- azure-pipelines/apiscan.yml | 8 ++ azure-pipelines/build.yml | 1 + azure-pipelines/official.yml | 129 +++++++++++---------------------- azure-pipelines/unofficial.yml | 90 +++++++++++++++++++++++ 5 files changed, 141 insertions(+), 89 deletions(-) create mode 100644 azure-pipelines/unofficial.yml diff --git a/Expand-Template.ps1 b/Expand-Template.ps1 index 0bc5f440..9ba1f04e 100755 --- a/Expand-Template.ps1 +++ b/Expand-Template.ps1 @@ -156,7 +156,7 @@ try { $YmlReplacements = @{ "(?m)^\s+- microbuild`r?`n"="" } - Replace-Placeholders -Path "azure-pipelines\official.yml" -Replacements $YmlReplacements + Replace-Placeholders -Path "azure-pipelines\unofficial.yml" -Replacements $YmlReplacements Replace-Placeholders -Path "azure-pipelines.yml" -Replacements $YmlReplacements $YmlReplacements = @{} diff --git a/azure-pipelines/apiscan.yml b/azure-pipelines/apiscan.yml index af78f15c..c3c8aed1 100644 --- a/azure-pipelines/apiscan.yml +++ b/azure-pipelines/apiscan.yml @@ -1,6 +1,8 @@ parameters: - name: windowsPool type: object +- name: RealSign + type: boolean jobs: - job: apiscan @@ -9,6 +11,12 @@ jobs: pool: ${{ parameters.windowsPool }} timeoutInMinutes: 120 templateContext: + ${{ if not(parameters.RealSign) }}: + mb: + signing: # if the build is test-signed, install the signing plugin so that CSVTestSignPolicy.xml is available + enabled: true + zipSources: false + signType: test outputs: - output: pipelineArtifact displayName: ๐Ÿ“ข collect apiscan artifact diff --git a/azure-pipelines/build.yml b/azure-pipelines/build.yml index 279c10a6..1a830586 100644 --- a/azure-pipelines/build.yml +++ b/azure-pipelines/build.yml @@ -313,3 +313,4 @@ jobs: - template: apiscan.yml parameters: windowsPool: ${{ parameters.windowsPool }} + RealSign: ${{ parameters.RealSign }} diff --git a/azure-pipelines/official.yml b/azure-pipelines/official.yml index 35beb818..a9b5b81e 100644 --- a/azure-pipelines/official.yml +++ b/azure-pipelines/official.yml @@ -1,17 +1,5 @@ -trigger: - batch: true - branches: - include: - - main - - microbuild - - 'validate/*' - paths: - exclude: - - doc/ - - '*.md' - - .vscode/ - - azure-pipelines/release.yml - - azure-pipelines/vs-insertion.yml +trigger: none # We only want to trigger manually or based on a schedule +pr: none #schedules: #- cron: "0 3 * * *" # Daily @ 8 PM PST # displayName: Daily vs-insertion @@ -23,10 +11,6 @@ parameters: # As an entrypoint pipeline yml file, all parameters here show up in the Queue Run dialog. # If any paramaters should NOT be queue-time options, they should be removed from here # and references to them in this file replaced with hard-coded values. -- name: ForceOfficialBuild - displayName: Official build (sign, compliance, etc.) - type: boolean - default: false # this should remain false so PR builds using this pipeline are unofficial # - name: ShouldSkipOptimize # Uncomment this and references to it below when setting EnableOptProf to true in build.yml. # displayName: Skip OptProf optimization # type: boolean @@ -55,75 +39,44 @@ variables: - template: GlobalVariables.yml extends: - ${{ if or(parameters.ForceOfficialBuild, eq(variables['Build.Reason'],'Schedule')) }}: - template: azure-pipelines/MicroBuild.1ES.Official.yml@MicroBuildTemplate - parameters: - sdl: - sourceAnalysisPool: VSEngSS-MicroBuild2022-1ES - codeSignValidation: - enabled: true - break: true - additionalTargetsGlobPattern: -|Variables-*\*.ps1;-|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 - stages: - - stage: Build - variables: - - template: /azure-pipelines/BuildStageVariables.yml@self - jobs: - - template: /azure-pipelines/build.yml@self - parameters: - Is1ESPT: true - RealSign: true - # ShouldSkipOptimize: ${{ parameters.ShouldSkipOptimize }} - EnableAPIScan: ${{ and(parameters.EnableAPIScan, ne(variables['Build.Reason'], 'pullRequest')) }} - windowsPool: VSEngSS-MicroBuild2022-1ES - linuxPool: - name: AzurePipelines-EO - demands: - - ImageOverride -equals 1ESPT-Ubuntu22.04 - os: Linux - macOSPool: - name: Azure Pipelines - vmImage: macOS-14 - os: macOS - EnableMacOSBuild: ${{ parameters.EnableMacOSBuild }} - RunTests: ${{ parameters.RunTests }} - - template: /azure-pipelines/prepare-insertion-stages.yml@self + template: azure-pipelines/MicroBuild.1ES.Official.yml@MicroBuildTemplate + parameters: + sdl: + sourceAnalysisPool: VSEngSS-MicroBuild2022-1ES + codeSignValidation: + enabled: true + break: true + additionalTargetsGlobPattern: -|Variables-*\*.ps1;-|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 + stages: + - stage: Build + variables: + - template: /azure-pipelines/BuildStageVariables.yml@self + jobs: + - template: /azure-pipelines/build.yml@self parameters: + Is1ESPT: true RealSign: true - ${{ else }}: - template: azure-pipelines/MicroBuild.1ES.Unofficial.yml@MicroBuildTemplate - parameters: - sdl: - sourceAnalysisPool: VSEngSS-MicroBuild2022-1ES - suppression: - suppressionFile: $(System.DefaultWorkingDirectory)\azure-pipelines\falsepositives.gdnsuppress - stages: - - stage: Build - variables: - - template: /azure-pipelines/BuildStageVariables.yml@self - jobs: - - template: /azure-pipelines/build.yml@self - parameters: - Is1ESPT: true - RealSign: false - # ShouldSkipOptimize: ${{ parameters.ShouldSkipOptimize }} - EnableAPIScan: false - windowsPool: VSEngSS-MicroBuild2022-1ES - linuxPool: - name: AzurePipelines-EO - demands: - - ImageOverride -equals 1ESPT-Ubuntu22.04 - os: Linux - macOSPool: - name: Azure Pipelines - vmImage: macOS-14 - os: macOS - EnableMacOSBuild: ${{ parameters.EnableMacOSBuild }} - RunTests: ${{ parameters.RunTests }} + # ShouldSkipOptimize: ${{ parameters.ShouldSkipOptimize }} + EnableAPIScan: ${{ parameters.EnableAPIScan }} + windowsPool: VSEngSS-MicroBuild2022-1ES + linuxPool: + name: AzurePipelines-EO + demands: + - ImageOverride -equals 1ESPT-Ubuntu22.04 + os: Linux + macOSPool: + name: Azure Pipelines + vmImage: macOS-14 + os: macOS + EnableMacOSBuild: ${{ parameters.EnableMacOSBuild }} + RunTests: ${{ parameters.RunTests }} + - template: /azure-pipelines/prepare-insertion-stages.yml@self + parameters: + RealSign: true diff --git a/azure-pipelines/unofficial.yml b/azure-pipelines/unofficial.yml new file mode 100644 index 00000000..afce810b --- /dev/null +++ b/azure-pipelines/unofficial.yml @@ -0,0 +1,90 @@ +trigger: + batch: true + branches: + include: + - main + - microbuild + - 'validate/*' + paths: + exclude: + - doc/ + - '*.md' + - .vscode/ + - azure-pipelines/release.yml + - azure-pipelines/vs-insertion.yml + +parameters: +# As an entrypoint pipeline yml file, all parameters here show up in the Queue Run dialog. +# If any paramaters should NOT be queue-time options, they should be removed from here +# and references to them in this file replaced with hard-coded values. +# - name: ShouldSkipOptimize # Uncomment this and references to it below when setting EnableOptProf to true in build.yml. +# displayName: Skip OptProf optimization +# type: boolean +# default: false +- name: EnableMacOSBuild + displayName: Build on macOS + type: boolean + default: false # macOS is often bogged down in Azure Pipelines +- name: RunTests + displayName: Run tests + type: boolean + default: true +- name: EnableAPIScan + displayName: Include APIScan with compliance tools + type: boolean + default: false +- name: EnableProductionSDL + displayName: Enable Production SDL + type: boolean + default: false + +resources: + repositories: + - repository: MicroBuildTemplate + type: git + name: 1ESPipelineTemplates/MicroBuildTemplate + ref: refs/tags/release + +variables: +- template: GlobalVariables.yml + +extends: + template: azure-pipelines/MicroBuild.1ES.Unofficial.yml@MicroBuildTemplate + parameters: + sdl: + sourceAnalysisPool: VSEngSS-MicroBuild2022-1ES + suppression: + suppressionFile: $(System.DefaultWorkingDirectory)\azure-pipelines\falsepositives.gdnsuppress + enableProductionSDL: ${{ parameters.EnableProductionSDL }} + codeSignValidation: + enabled: ${{ parameters.EnableProductionSDL }} + break: true + policyFile: $(MBSIGN_APPFOLDER)\CSVTestSignPolicy.xml + policheck: + enabled: ${{ parameters.EnableProductionSDL }} + exclusionsFile: $(System.DefaultWorkingDirectory)\azure-pipelines\PoliCheckExclusions.xml + sbom: + enabled: ${{ parameters.EnableProductionSDL }} + stages: + - stage: Build + variables: + - template: /azure-pipelines/BuildStageVariables.yml@self + jobs: + - template: /azure-pipelines/build.yml@self + parameters: + Is1ESPT: true + RealSign: false + # ShouldSkipOptimize: ${{ parameters.ShouldSkipOptimize }} + EnableAPIScan: ${{ parameters.EnableAPIScan }} + windowsPool: VSEngSS-MicroBuild2022-1ES + linuxPool: + name: AzurePipelines-EO + demands: + - ImageOverride -equals 1ESPT-Ubuntu22.04 + os: Linux + macOSPool: + name: Azure Pipelines + vmImage: macOS-14 + os: macOS + EnableMacOSBuild: ${{ parameters.EnableMacOSBuild }} + RunTests: ${{ parameters.RunTests }} From 2545e3021b61162d5f23b4b41e7405f1b25dbbfb Mon Sep 17 00:00:00 2001 From: Matteo Prosperi <41970398+matteo-prosperi@users.noreply.github.com> Date: Tue, 14 Jan 2025 13:18:08 -0800 Subject: [PATCH 059/110] Add back signcheck exclusion for unofficial builds --- azure-pipelines/unofficial.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines/unofficial.yml b/azure-pipelines/unofficial.yml index afce810b..ff3c2b5d 100644 --- a/azure-pipelines/unofficial.yml +++ b/azure-pipelines/unofficial.yml @@ -59,6 +59,7 @@ extends: codeSignValidation: enabled: ${{ parameters.EnableProductionSDL }} break: true + additionalTargetsGlobPattern: -|Variables-*\*.ps1;-|APIScanInputs-*\**;-|test_symbols-*\**;-|MicroBuild\** policyFile: $(MBSIGN_APPFOLDER)\CSVTestSignPolicy.xml policheck: enabled: ${{ parameters.EnableProductionSDL }} From 8c45970cd587e8923048ebef3db71ad559a870a3 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 14 Jan 2025 18:21:19 -0700 Subject: [PATCH 060/110] Update Dockerfile and global.json updates to v9.0.102 (#340) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .devcontainer/Dockerfile | 2 +- global.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 3674e182..6952a419 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,5 +1,5 @@ # Refer to https://hub.docker.com/_/microsoft-dotnet-sdk for available versions -FROM mcr.microsoft.com/dotnet/sdk:9.0.101-noble +FROM mcr.microsoft.com/dotnet/sdk:9.0.102-noble # Installing mono makes `dotnet test` work without errors even for net472. # But installing it takes a long time, so it's excluded by default. diff --git a/global.json b/global.json index f3e0b323..119eff7e 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "9.0.101", + "version": "9.0.102", "rollForward": "patch", "allowPrerelease": false } From 25d6df9315be95115c164411a39ee242b29de0ed Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Tue, 14 Jan 2025 18:27:14 -0700 Subject: [PATCH 061/110] Migrate xunit settings from app.config to xunit.runner.json --- test/Directory.Build.targets | 4 ++++ test/Library.Tests/app.config | 5 ----- test/Library.Tests/xunit.runner.json | 4 ++++ 3 files changed, 8 insertions(+), 5 deletions(-) delete mode 100644 test/Library.Tests/app.config create mode 100644 test/Library.Tests/xunit.runner.json diff --git a/test/Directory.Build.targets b/test/Directory.Build.targets index a6e0f4ac..9f32cd06 100644 --- a/test/Directory.Build.targets +++ b/test/Directory.Build.targets @@ -1,4 +1,8 @@ + + + + diff --git a/test/Library.Tests/app.config b/test/Library.Tests/app.config deleted file mode 100644 index 61890f05..00000000 --- a/test/Library.Tests/app.config +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/test/Library.Tests/xunit.runner.json b/test/Library.Tests/xunit.runner.json new file mode 100644 index 00000000..8465a454 --- /dev/null +++ b/test/Library.Tests/xunit.runner.json @@ -0,0 +1,4 @@ +{ + "$schema": "https://xunit.net/schema/current/xunit.runner.schema.json", + "shadowCopy": false +} From b9f8bc9561e76aa68cac7e4ec41ece0364c123a0 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Wed, 15 Jan 2025 10:05:41 -0700 Subject: [PATCH 062/110] Fix typo --- .github/workflows/libtemplate-update.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/libtemplate-update.yml b/.github/workflows/libtemplate-update.yml index c6b8fb4a..53df80ff 100644 --- a/.github/workflows/libtemplate-update.yml +++ b/.github/workflows/libtemplate-update.yml @@ -45,7 +45,7 @@ jobs: # Pushing commits that add or change files under .github/workflows will cause our workflow to fail. # But it usually isn't necessary because the target branch already has (or doesn't have) these changes. - # So if the merged doesn't bring in any changes to these files, try the merge locally and push that + # So if the merge doesn't bring in any changes to these files, try the merge locally and push that # to keep github happy. if ((git rev-list FETCH_HEAD ^HEAD --count -- .github/workflows) -eq 0) { # Indeed there are no changes in that area. So merge locally to try to appease GitHub. From df5243521eabba1568f50f15e503d1e2dda0ee78 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Sat, 18 Jan 2025 10:36:33 -0700 Subject: [PATCH 063/110] Add GitS sponsorship badge --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 610e6504..f7a79262 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,8 @@ ![GitHub Actions status](https://github.com/aarnott/Library.Template/workflows/CI/badge.svg) [![codecov](https://codecov.io/gh/aarnott/library.template/branch/main/graph/badge.svg)](https://codecov.io/gh/aarnott/library.template) +[](https://api.gitsponsors.com/api/badge/link?p=MCQ+F+FQ4qDG3aB7nxcFJ9OIaaCARvdUdn6994QBDixzmF6GkU1V7l/Zk+7MwNTbZGdGMw06hyJAs80v04cpo08nYPaOeWn9BMLwruCMqnmr8AoX5dTC4OcDg3r1juk0nocxT2n22yvq8MyXIS32EQ==) + ## Features * Follow the best and simplest patterns of build, pack and test with dotnet CLI. From 02bf9eeae2ac8aa8b3efe3641ec46eee8d9c3529 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Mon, 20 Jan 2025 07:13:46 -0700 Subject: [PATCH 064/110] Revert "Add GitS sponsorship badge" This reverts commit df5243521eabba1568f50f15e503d1e2dda0ee78. --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index f7a79262..610e6504 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,6 @@ ![GitHub Actions status](https://github.com/aarnott/Library.Template/workflows/CI/badge.svg) [![codecov](https://codecov.io/gh/aarnott/library.template/branch/main/graph/badge.svg)](https://codecov.io/gh/aarnott/library.template) -[](https://api.gitsponsors.com/api/badge/link?p=MCQ+F+FQ4qDG3aB7nxcFJ9OIaaCARvdUdn6994QBDixzmF6GkU1V7l/Zk+7MwNTbZGdGMw06hyJAs80v04cpo08nYPaOeWn9BMLwruCMqnmr8AoX5dTC4OcDg3r1juk0nocxT2n22yvq8MyXIS32EQ==) - ## Features * Follow the best and simplest patterns of build, pack and test with dotnet CLI. From aa8e87054f2ad8fb64a0de043f39b959a7e5ce51 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 23 Jan 2025 16:14:15 -0700 Subject: [PATCH 065/110] Update dependency powershell to 7.5.0 (#341) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .config/dotnet-tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 3a7b9b69..1b8c58ce 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,7 +3,7 @@ "isRoot": true, "tools": { "powershell": { - "version": "7.4.6", + "version": "7.5.0", "commands": [ "pwsh" ], From 37306430894c3d18854bbdc8dcb0b0c228b588d8 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Thu, 23 Jan 2025 22:39:45 -0700 Subject: [PATCH 066/110] Bump all microbuild packages at once --- .github/renovate.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/renovate.json b/.github/renovate.json index c140014f..55602947 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -16,6 +16,10 @@ "matchDatasources": ["dotnet-version", "docker"], "matchDepNames": ["dotnet-sdk", "mcr.microsoft.com/dotnet/sdk"], "groupName": "Dockerfile and global.json updates" + }, + { + "matchPackageNames": ["Microsoft.VisualStudio.Internal.MicroBuild*"], + "groupName": "microbuild" } ] } From 66fe1ca6c9d3c86887bccd2c550d92587f27b2da Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Mon, 27 Jan 2025 08:28:00 -0700 Subject: [PATCH 067/110] Add markup link checker to GitHub workflow --- .github/workflows/build.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5b4fc7be..2d951062 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -69,3 +69,13 @@ jobs: timeout-minutes: 3 continue-on-error: true if: env.codecov_token != '' + + docs: + name: ๐Ÿ“ƒ Docs + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: ๐Ÿ”— Markup Link Checker (mlc) + uses: becheran/mlc@v0.19.0 + with: + args: --do-not-warn-for-redirect-to https://learn.microsoft.com*,https://dev.azure.com/*,https://app.codecov.io/* -p docfx From b3b3da2f87f080d451e7514865717c7cd6540ecd Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Mon, 27 Jan 2025 08:35:34 -0700 Subject: [PATCH 068/110] Fix stale link in CONTRIBUTING.md --- CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 77f5e0a3..56dd666f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -25,7 +25,7 @@ You should install the version specified in `global.json` or a later version wit the same major.minor.Bxx "hundreds" band. For example if 2.2.300 is specified, you may install 2.2.300, 2.2.301, or 2.2.310 while the 2.2.400 version would not be considered compatible by .NET SDK. -See [.NET Core Versioning](https://docs.microsoft.com/dotnet/core/versions/) for more information. +See [.NET Core Versioning](https://learn.microsoft.com/dotnet/core/versions/) for more information. ## Package restore @@ -44,7 +44,7 @@ Building, testing, and packing this repository can be done by using the standard ## Releases Use `nbgv tag` to create a tag for a particular commit that you mean to release. -[Learn more about `nbgv` and its `tag` and `prepare-release` commands](https://github.com/dotnet/Nerdbank.GitVersioning/blob/main/doc/nbgv-cli.md). +[Learn more about `nbgv` and its `tag` and `prepare-release` commands](https://dotnet.github.io/Nerdbank.GitVersioning/docs/nbgv-cli.html). Push the tag. From 1da386324a06ce360c03270dd19c01133270c4c0 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Mon, 27 Jan 2025 09:25:14 -0700 Subject: [PATCH 069/110] Skip aka.ms links that don't validate --- .github/workflows/docs_validate.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs_validate.yml b/.github/workflows/docs_validate.yml index 07dd8b9a..d1c8b8fb 100644 --- a/.github/workflows/docs_validate.yml +++ b/.github/workflows/docs_validate.yml @@ -6,7 +6,7 @@ on: jobs: build: - name: ๐Ÿ“š docfx + name: ๐Ÿ“š Doc validation runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 @@ -15,7 +15,7 @@ jobs: - name: ๐Ÿ”— Markup Link Checker (mlc) uses: becheran/mlc@v0.19.0 with: - args: --do-not-warn-for-redirect-to https://learn.microsoft.com*,https://dev.azure.com/*,https://app.codecov.io/* -p docfx + args: --do-not-warn-for-redirect-to https://learn.microsoft.com*,https://dev.azure.com/*,https://app.codecov.io/*,https://msrc.microsoft.com/*,https://www.microsoft.com/en-us/msrc* -p docfx -i https://aka.ms/onboardsupport,https://aka.ms/spot,https://www.microsoft.com/msrc/cvd,https://www.microsoft.com/msrc - name: โš™ Install prerequisites run: | ./init.ps1 -UpgradePrerequisites From 9409f44674386eb10f9721ecbed1cb1b7aa1e2db Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Mon, 27 Jan 2025 14:25:15 -0700 Subject: [PATCH 070/110] Bump nuget.exe build tool to 6.12.2 --- tools/Get-NuGetTool.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/Get-NuGetTool.ps1 b/tools/Get-NuGetTool.ps1 index 3097c873..8a3b9eed 100644 --- a/tools/Get-NuGetTool.ps1 +++ b/tools/Get-NuGetTool.ps1 @@ -6,7 +6,7 @@ #> Param( [Parameter()] - [string]$NuGetVersion='6.4.0' + [string]$NuGetVersion='6.12.2' ) $toolsPath = & "$PSScriptRoot\Get-TempToolsPath.ps1" From e25313b90d5f26b11211c61c7adff7f0a94eb4c8 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 4 Feb 2025 21:27:02 +0000 Subject: [PATCH 071/110] Update becheran/mlc action to v0.19.1 --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2d951062..42f5a005 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -76,6 +76,6 @@ jobs: steps: - uses: actions/checkout@v4 - name: ๐Ÿ”— Markup Link Checker (mlc) - uses: becheran/mlc@v0.19.0 + uses: becheran/mlc@v0.19.1 with: args: --do-not-warn-for-redirect-to https://learn.microsoft.com*,https://dev.azure.com/*,https://app.codecov.io/* -p docfx From 83228fe554696ec1508b2ff3e214832dd4df182e Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Tue, 4 Feb 2025 14:42:42 -0700 Subject: [PATCH 072/110] Suppress an expected doc warning --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 42f5a005..d3d9d2f8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -78,4 +78,4 @@ jobs: - name: ๐Ÿ”— Markup Link Checker (mlc) uses: becheran/mlc@v0.19.1 with: - args: --do-not-warn-for-redirect-to https://learn.microsoft.com*,https://dev.azure.com/*,https://app.codecov.io/* -p docfx + args: --do-not-warn-for-redirect-to https://learn.microsoft.com*,https://dotnet.microsoft.com/*,https://dev.azure.com/*,https://app.codecov.io/* -p docfx From 3114358825e4c20cf9d49597c2616c067e25b3f3 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Tue, 4 Feb 2025 16:06:31 -0700 Subject: [PATCH 073/110] Remove dependabot.yml --- .github/dependabot.yml | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index a7a1782f..00000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,21 +0,0 @@ -# Please see the documentation for all configuration options: -# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file - -version: 2 -updates: -- package-ecosystem: nuget - directory: / - schedule: - interval: weekly - groups: - nerdbank-gitversioning: - patterns: - - nbgv - - nerdbank.gitversioning - xunit: - patterns: - - 'xunit*' -- package-ecosystem: dotnet-sdk - directory: / - schedule: - interval: monthly From 3856c54130c323dd2fa8a48e9fc13eb0c23d8f0c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 4 Feb 2025 16:11:26 -0700 Subject: [PATCH 074/110] Update becheran/mlc action to v0.19.2 (#345) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d3d9d2f8..7eb7860e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -76,6 +76,6 @@ jobs: steps: - uses: actions/checkout@v4 - name: ๐Ÿ”— Markup Link Checker (mlc) - uses: becheran/mlc@v0.19.1 + uses: becheran/mlc@v0.19.2 with: args: --do-not-warn-for-redirect-to https://learn.microsoft.com*,https://dotnet.microsoft.com/*,https://dev.azure.com/*,https://app.codecov.io/* -p docfx From 399d3d5d8f13ac06a82a58dd50dcd6adf0b96767 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Tue, 4 Feb 2025 18:00:20 -0700 Subject: [PATCH 075/110] Stick with .NET 8 packages --- .github/renovate.json | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/renovate.json b/.github/renovate.json index 55602947..86c3fe2f 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -17,6 +17,20 @@ "matchDepNames": ["dotnet-sdk", "mcr.microsoft.com/dotnet/sdk"], "groupName": "Dockerfile and global.json updates" }, + { + "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" From 56ac6706a56b22a46358901886e9b679ac6cbee6 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Tue, 4 Feb 2025 18:01:04 -0700 Subject: [PATCH 076/110] Update microbuild to 2.0.181 --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 659d9c00..6606c84a 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -5,7 +5,7 @@ true true - 2.0.171 + 2.0.181 From 37e48d01b7bdd9990b6449cc8d361e94b81fa798 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Tue, 4 Feb 2025 18:01:27 -0700 Subject: [PATCH 077/110] Update dependency ubuntu to v24 --- .github/workflows/docs_validate.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs_validate.yml b/.github/workflows/docs_validate.yml index d1c8b8fb..f7125817 100644 --- a/.github/workflows/docs_validate.yml +++ b/.github/workflows/docs_validate.yml @@ -7,7 +7,7 @@ on: jobs: build: name: ๐Ÿ“š Doc validation - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 with: From 28c5968eb57d442d2a9eb82d95c3776069f028fc Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Tue, 4 Feb 2025 18:12:58 -0700 Subject: [PATCH 078/110] Avoid daily updates of VS packages --- .github/renovate.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/renovate.json b/.github/renovate.json index 86c3fe2f..409b27d9 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -34,6 +34,11 @@ { "matchPackageNames": ["Microsoft.VisualStudio.Internal.MicroBuild*"], "groupName": "microbuild" + }, + { + "matchPackageNames": ["Microsoft.VisualStudio.*"], + "matchUpdateTypes": ["patch"], + "enabled": false } ] } From b4a369cbcf6bf536dbf608d08520b3655d3db046 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Tue, 4 Feb 2025 18:15:50 -0700 Subject: [PATCH 079/110] Group VS SDK package updates --- .github/renovate.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/renovate.json b/.github/renovate.json index 409b27d9..c9d99b7f 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -35,6 +35,10 @@ "matchPackageNames": ["Microsoft.VisualStudio.Internal.MicroBuild*"], "groupName": "microbuild" }, + { + "matchPackageNames": ["Microsoft.VisualStudio.*"], + "groupName": "Visual Studio SDK" + }, { "matchPackageNames": ["Microsoft.VisualStudio.*"], "matchUpdateTypes": ["patch"], From 2d06ba40adda405cab7ebab4ace694ee8e40a413 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Tue, 4 Feb 2025 21:28:14 -0700 Subject: [PATCH 080/110] Update becheran/mlc action to v0.19.2 --- .github/workflows/docs_validate.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs_validate.yml b/.github/workflows/docs_validate.yml index 4bf30d42..380cc03c 100644 --- a/.github/workflows/docs_validate.yml +++ b/.github/workflows/docs_validate.yml @@ -13,7 +13,7 @@ jobs: with: fetch-depth: 0 # avoid shallow clone so nbgv can do its work. - name: ๐Ÿ”— Markup Link Checker (mlc) - uses: becheran/mlc@v0.19.0 + uses: becheran/mlc@v0.19.2 with: args: --do-not-warn-for-redirect-to https://learn.microsoft.com*,https://dotnet.microsoft.com/*,https://dev.azure.com/*,https://app.codecov.io/*,https://msrc.microsoft.com/*,https://www.microsoft.com/en-us/msrc* -p docfx -i https://aka.ms/onboardsupport,https://aka.ms/spot,https://www.microsoft.com/msrc/cvd,https://www.microsoft.com/msrc - name: โš™ Install prerequisites From 429e76f7d36b71ad3014c0c9712a238a26bed45b Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Wed, 5 Feb 2025 14:36:16 -0700 Subject: [PATCH 081/110] Fix mlc suppressions for SECURITY.md --- .github/workflows/docs_validate.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docs_validate.yml b/.github/workflows/docs_validate.yml index 380cc03c..e100eba6 100644 --- a/.github/workflows/docs_validate.yml +++ b/.github/workflows/docs_validate.yml @@ -3,6 +3,10 @@ name: ๐Ÿ“ƒ Docfx Validate on: pull_request: workflow_dispatch: + push: + branches: + - main + - microbuild jobs: build: @@ -15,7 +19,7 @@ jobs: - name: ๐Ÿ”— Markup Link Checker (mlc) uses: becheran/mlc@v0.19.2 with: - args: --do-not-warn-for-redirect-to https://learn.microsoft.com*,https://dotnet.microsoft.com/*,https://dev.azure.com/*,https://app.codecov.io/*,https://msrc.microsoft.com/*,https://www.microsoft.com/en-us/msrc* -p docfx -i https://aka.ms/onboardsupport,https://aka.ms/spot,https://www.microsoft.com/msrc/cvd,https://www.microsoft.com/msrc + args: --do-not-warn-for-redirect-to https://learn.microsoft.com*,https://dotnet.microsoft.com/*,https://dev.azure.com/*,https://app.codecov.io/* -p docfx -i https://aka.ms/onboardsupport,https://aka.ms/spot,https://msrc.microsoft.com/*,https://www.microsoft.com/msrc*,https://microsoft.com/msrc* - name: โš™ Install prerequisites run: | ./init.ps1 -UpgradePrerequisites From 8eb0937bad6dd628f70d29a75e76bff112d8a707 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Wed, 5 Feb 2025 21:42:18 -0700 Subject: [PATCH 082/110] Renovate should not update to versions from non-release branches --- .github/renovate.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/renovate.json b/.github/renovate.json index c140014f..a41e0267 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -16,6 +16,11 @@ "matchDatasources": ["dotnet-version", "docker"], "matchDepNames": ["dotnet-sdk", "mcr.microsoft.com/dotnet/sdk"], "groupName": "Dockerfile and global.json updates" + }, + { + "matchPackageNames": ["*"], + "allowedVersions": "!/-g[a-f0-9]+$/", + "groupName": "Ignore versions built from non-release branches" } ] } From 9db1062760fc20f2124ec32a012aced5666372bf Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Wed, 5 Feb 2025 22:36:37 -0700 Subject: [PATCH 083/110] Drop group name in renovate --- .github/renovate.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/renovate.json b/.github/renovate.json index a41e0267..092ed049 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -19,8 +19,7 @@ }, { "matchPackageNames": ["*"], - "allowedVersions": "!/-g[a-f0-9]+$/", - "groupName": "Ignore versions built from non-release branches" + "allowedVersions": "!/-g[a-f0-9]+$/" } ] } From 574886f56785776ec9246585256d3056228cd021 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 7 Feb 2025 07:20:17 -0700 Subject: [PATCH 084/110] Update xunit (#346) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- Directory.Packages.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 8811c1ea..8703de3f 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -10,8 +10,8 @@ - - + + From a71c97c2377c9d17faafb1a570350c213169efd0 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 10 Feb 2025 09:58:39 -0700 Subject: [PATCH 085/110] Update becheran/mlc action to v0.21.0 (#347) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7eb7860e..da3e9e1f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -76,6 +76,6 @@ jobs: steps: - uses: actions/checkout@v4 - name: ๐Ÿ”— Markup Link Checker (mlc) - uses: becheran/mlc@v0.19.2 + uses: becheran/mlc@v0.21.0 with: args: --do-not-warn-for-redirect-to https://learn.microsoft.com*,https://dotnet.microsoft.com/*,https://dev.azure.com/*,https://app.codecov.io/* -p docfx From a8d08d4856b60c9a2911b3a2fd0f1f297bd4a7ea Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 10 Feb 2025 09:59:19 -0700 Subject: [PATCH 086/110] Update dependency Microsoft.NET.Test.Sdk to 17.13.0 (#348) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 8703de3f..350c7eb5 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -9,7 +9,7 @@ - + From 62c89782b8d88a4cfef61338775a14522874e001 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Mon, 10 Feb 2025 10:01:53 -0700 Subject: [PATCH 087/110] Bump MicroBuildVersion to 2.0.187 --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index c2c31959..f9d52e8e 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -5,7 +5,7 @@ true true - 2.0.181 + 2.0.187 From 5724fef06be91bdb391252c650d250353b42fdc2 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 12 Feb 2025 07:43:48 -0700 Subject: [PATCH 088/110] Update Dockerfile and global.json updates to v9.0.200 Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .devcontainer/Dockerfile | 2 +- global.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 6952a419..78a791bc 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -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.200-noble # Installing mono makes `dotnet test` work without errors even for net472. # But installing it takes a long time, so it's excluded by default. diff --git a/global.json b/global.json index 119eff7e..024087d2 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "9.0.102", + "version": "9.0.200", "rollForward": "patch", "allowPrerelease": false } From c24a8f0bfb381569bbc93d518aea650dc0b75a48 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 18 Feb 2025 21:06:17 -0700 Subject: [PATCH 089/110] Update dependency dotnet-coverage to 17.14.1 Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .config/dotnet-tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 1b8c58ce..11790a98 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -10,7 +10,7 @@ "rollForward": false }, "dotnet-coverage": { - "version": "17.13.1", + "version": "17.14.1", "commands": [ "dotnet-coverage" ], From 05277201a25761e23e894abbc408fb3bb73f87a9 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 20 Feb 2025 05:51:42 -0700 Subject: [PATCH 090/110] Update dependency docfx to 2.78.3 (#351) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .config/dotnet-tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 11790a98..62b56f9f 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -24,7 +24,7 @@ "rollForward": false }, "docfx": { - "version": "2.78.2", + "version": "2.78.3", "commands": [ "docfx" ], From 077bfc33a6dc3e8cf600f983bea70c322973457e Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Wed, 26 Feb 2025 10:28:07 -0700 Subject: [PATCH 091/110] Do not verify signed binaries in LocBin artifact This artifact does not ship and only serves as input for translators. --- azure-pipelines/official.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines/official.yml b/azure-pipelines/official.yml index a9b5b81e..b8a4655d 100644 --- a/azure-pipelines/official.yml +++ b/azure-pipelines/official.yml @@ -46,7 +46,7 @@ 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 From 81ff3412fff91ecc268aaaf7220b865ca3166d54 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Wed, 26 Feb 2025 13:06:42 -0700 Subject: [PATCH 092/110] Add placeholder option for vs-validation to skip optimization --- azure-pipelines/vs-validation.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/azure-pipelines/vs-validation.yml b/azure-pipelines/vs-validation.yml index 2fa5086d..1b415b22 100644 --- a/azure-pipelines/vs-validation.yml +++ b/azure-pipelines/vs-validation.yml @@ -5,6 +5,12 @@ trigger: none # We only want to trigger manually or based on resources pr: none +# parameters: +# - name: ShouldSkipOptimize # Uncomment this and references to it below when setting EnableOptProf to true in build.yml. +# displayName: Skip OptProf optimization +# type: boolean +# default: false + resources: repositories: - repository: MicroBuildTemplate @@ -36,6 +42,7 @@ extends: parameters: Is1ESPT: true RealSign: false + # ShouldSkipOptimize: ${{ parameters.ShouldSkipOptimize }} windowsPool: VSEngSS-MicroBuild2022-1ES linuxPool: name: AzurePipelines-EO From 0fb1ddedffea5ffe98ec8a0a1b451495c9091a99 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 27 Feb 2025 05:53:53 -0700 Subject: [PATCH 093/110] Update dependency dotnet-coverage to 17.14.2 (#352) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .config/dotnet-tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 62b56f9f..c21d04bd 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -10,7 +10,7 @@ "rollForward": false }, "dotnet-coverage": { - "version": "17.14.1", + "version": "17.14.2", "commands": [ "dotnet-coverage" ], From 161bac90970e29dc4558e61f66c15c8c4d899e6a Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Mon, 3 Mar 2025 11:15:37 -0700 Subject: [PATCH 094/110] Fix GitHub release workflow in dispatched runs Dispatched runs were failing because they still looked for a GitHub release via properties that are not defined. Also, upload artifacts to the GitHub release recursively, avoiding directories. --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 766ebaf5..c6a5edd8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -74,11 +74,11 @@ jobs: - name: ๐Ÿ’ฝ Upload artifacts to release shell: pwsh - if: ${{ github.event.release.assets_url }} != '' + if: ${{ github.event_name == 'release' && github.event.release.assets_url != '' }} env: GH_TOKEN: ${{ github.token }} run: | - Get-ChildItem '${{ runner.temp }}/deployables' |% { + Get-ChildItem '${{ runner.temp }}/deployables' -File -Recurse |% { Write-Host "Uploading $($_.Name) to release..." gh release -R ${{ github.repository }} upload "${{ github.ref_name }}" $_.FullName } From 1e00ddcc7078405b5bf266b54b844fb0b64da280 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Tue, 4 Mar 2025 15:41:10 -0700 Subject: [PATCH 095/110] Drop semanticCommits setting from renovate.json It's default is to automatically detect the repo's convention, which is great. --- .github/renovate.json | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/renovate.json b/.github/renovate.json index 092ed049..9582ad99 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -1,7 +1,6 @@ { "$schema": "https://docs.renovatebot.com/renovate-schema.json", "extends": ["config:recommended"], - "semanticCommits": "disabled", "labels": ["dependencies"], "packageRules": [ { From 1cc3b975881ad6a07cc96d45f2f90dc997de6ff1 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Tue, 4 Mar 2025 15:42:02 -0700 Subject: [PATCH 096/110] Switch to renovate rules from Microsoft presets --- .github/renovate.json | 53 ++++--------------------------------------- 1 file changed, 5 insertions(+), 48 deletions(-) diff --git a/.github/renovate.json b/.github/renovate.json index 90b80965..4cd2b0cb 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -1,51 +1,8 @@ { "$schema": "https://docs.renovatebot.com/renovate-schema.json", - "extends": ["config:recommended"], - "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": [] } From 164ff31aab9c8173067e93ddd290a81e6c6eb2d4 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Fri, 7 Mar 2025 17:34:25 -0700 Subject: [PATCH 097/110] Do not fail on missing LCL files in official builds Missing LCL files are a normal consequence of creating a new library, and unless we get successful builds out after creating that library, translations will never be provided (thus resolving the warning). --- azure-pipelines/dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines/dotnet.yml b/azure-pipelines/dotnet.yml index 180e36c2..2abca9eb 100644 --- a/azure-pipelines/dotnet.yml +++ b/azure-pipelines/dotnet.yml @@ -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) }}: From 46e768b364bbff90441fb5c0c9bfb160f4bfc67d Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Sun, 9 Mar 2025 19:12:44 -0600 Subject: [PATCH 098/110] Revert "Avoid `dotnet format` hang" This reverts commit 20e285c4d956424d2686261faa32f8721d5a7acf. This workaround is no longer needed with the 9.0.200 .NET SDK. --- Directory.Packages.props | 5 ++--- azure-pipelines/build.yml | 4 +--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 350c7eb5..03d41a12 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -19,9 +19,8 @@ - - + - \ No newline at end of file + diff --git a/azure-pipelines/build.yml b/azure-pipelines/build.yml index 5c106ade..10825828 100644 --- a/azure-pipelines/build.yml +++ b/azure-pipelines/build.yml @@ -37,10 +37,8 @@ jobs: - template: dotnet.yml parameters: RunTests: ${{ parameters.RunTests }} - - 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 - template: expand-template.yml - job: macOS From 6ed2f360da0cf53546b2ea4d11330958bd7883be Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Mon, 10 Mar 2025 12:12:00 -0600 Subject: [PATCH 099/110] Consolidate SDL tasks for insertion job --- azure-pipelines/vs-insertion.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/azure-pipelines/vs-insertion.yml b/azure-pipelines/vs-insertion.yml index 6aaba41c..c19331d4 100644 --- a/azure-pipelines/vs-insertion.yml +++ b/azure-pipelines/vs-insertion.yml @@ -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)" From 65f844095c1638f14f4bc8c37f29534f6ca326a3 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Mon, 10 Mar 2025 12:13:41 -0600 Subject: [PATCH 100/110] Disable redundant 1ES SBOM task --- azure-pipelines/official.yml | 2 +- azure-pipelines/unofficial.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines/official.yml b/azure-pipelines/official.yml index b8a4655d..abf0ff25 100644 --- a/azure-pipelines/official.yml +++ b/azure-pipelines/official.yml @@ -53,7 +53,7 @@ extends: 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: diff --git a/azure-pipelines/unofficial.yml b/azure-pipelines/unofficial.yml index ff3c2b5d..d33b7421 100644 --- a/azure-pipelines/unofficial.yml +++ b/azure-pipelines/unofficial.yml @@ -65,7 +65,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: From 039ac0b644f5cc3cab1982542457e2d7e0a2e607 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Mon, 10 Mar 2025 12:17:16 -0600 Subject: [PATCH 101/110] Put publishing code coverage under a switch --- azure-pipelines/build.yml | 6 +++++- azure-pipelines/official.yml | 5 +++++ azure-pipelines/unofficial.yml | 5 +++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/azure-pipelines/build.yml b/azure-pipelines/build.yml index 1a830586..1448c055 100644 --- a/azure-pipelines/build.yml +++ b/azure-pipelines/build.yml @@ -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 @@ -303,7 +307,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 }} diff --git a/azure-pipelines/official.yml b/azure-pipelines/official.yml index abf0ff25..6d7c0213 100644 --- a/azure-pipelines/official.yml +++ b/azure-pipelines/official.yml @@ -27,6 +27,10 @@ parameters: displayName: Include APIScan with compliance tools type: boolean default: false # enable in individual repos only AFTER updating TSAOptions.json with your own values +- name: PublishCodeCoverage + displayName: Publish code coverage + type: boolean + default: true resources: repositories: @@ -77,6 +81,7 @@ extends: os: macOS EnableMacOSBuild: ${{ parameters.EnableMacOSBuild }} RunTests: ${{ parameters.RunTests }} + PublishCodeCoverage: ${{ parameters.PublishCodeCoverage }} - template: /azure-pipelines/prepare-insertion-stages.yml@self parameters: RealSign: true diff --git a/azure-pipelines/unofficial.yml b/azure-pipelines/unofficial.yml index d33b7421..9ca100ea 100644 --- a/azure-pipelines/unofficial.yml +++ b/azure-pipelines/unofficial.yml @@ -37,6 +37,10 @@ parameters: displayName: Enable Production SDL type: boolean default: false +- name: PublishCodeCoverage + displayName: Publish code coverage + type: boolean + default: true resources: repositories: @@ -89,3 +93,4 @@ extends: os: macOS EnableMacOSBuild: ${{ parameters.EnableMacOSBuild }} RunTests: ${{ parameters.RunTests }} + PublishCodeCoverage: ${{ parameters.PublishCodeCoverage }} From dcc296378aafe7b7ed65965cabbb7fad59d77f3f Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Wed, 12 Mar 2025 09:45:59 -0600 Subject: [PATCH 102/110] Drop github release workflow --- .github/workflows/release.yml | 88 ----------------------------------- 1 file changed, 88 deletions(-) delete mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index c6a5edd8..00000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,88 +0,0 @@ -name: ๐ŸŽ Release - -on: - release: - types: [published] - workflow_dispatch: - inputs: - ship_run_id: - description: ID of the GitHub workflow run to ship - required: true - -run-name: ${{ github.ref_name }} - -permissions: - actions: read - contents: write - -jobs: - release: - runs-on: ubuntu-24.04 - steps: - - name: โš™๏ธ Initialization - shell: pwsh - run: | - if ('${{ secrets.NUGET_API_KEY }}') { - Write-Host "NUGET_API_KEY secret detected. NuGet packages will be pushed." - echo "NUGET_API_KEY_DEFINED=true" >> $env:GITHUB_ENV - } - - - name: ๐Ÿ”Ž Search for build of ${{ github.ref }} - shell: pwsh - id: findrunid - env: - GH_TOKEN: ${{ github.token }} - run: | - if ('${{ inputs.ship_run_id }}') { - $runid = '${{ inputs.ship_run_id }}' - } else { - $restApiRoot = '/repos/${{ github.repository }}' - - # Resolve the tag reference to a commit sha - $resolvedRef = gh api ` - -H "Accept: application/vnd.github+json" ` - -H "X-GitHub-Api-Version: 2022-11-28" ` - $restApiRoot/git/ref/tags/${{ github.ref_name }} ` - | ConvertFrom-Json - $commitSha = $resolvedRef.object.sha - - Write-Host "Resolved ${{ github.ref_name }} to $commitSha" - - $releases = gh run list -R ${{ github.repository }} -c $commitSha -w .github/workflows/build.yml -s success --json databaseId,startedAt ` - | ConvertFrom-Json | Sort-Object startedAt -Descending - - if ($releases.length -eq 0) { - Write-Error "No successful builds found for ${{ github.ref }}." - } elseif ($releases.length -gt 1) { - Write-Warning "More than one successful run found for ${{ github.ref }}. Artifacts from the most recent successful run will ship." - } - - $runid = $releases[0].databaseId - } - - Write-Host "Using artifacts from run-id: $runid" - - Echo "runid=$runid" >> $env:GITHUB_OUTPUT - - - name: ๐Ÿ”ป Download deployables artifacts - uses: actions/download-artifact@v4 - with: - name: deployables-Linux - path: ${{ runner.temp }}/deployables - run-id: ${{ steps.findrunid.outputs.runid }} - github-token: ${{ github.token }} - - - name: ๐Ÿ’ฝ Upload artifacts to release - shell: pwsh - if: ${{ github.event_name == 'release' && github.event.release.assets_url != '' }} - env: - GH_TOKEN: ${{ github.token }} - run: | - Get-ChildItem '${{ runner.temp }}/deployables' -File -Recurse |% { - Write-Host "Uploading $($_.Name) to release..." - gh release -R ${{ github.repository }} upload "${{ github.ref_name }}" $_.FullName - } - - - name: ๐Ÿš€ Push NuGet packages - run: dotnet nuget push ${{ runner.temp }}/deployables/*.nupkg --source https://api.nuget.org/v3/index.json -k '${{ secrets.NUGET_API_KEY }}' - if: ${{ env.NUGET_API_KEY_DEFINED == 'true' }} From e5d6527429d1be1824854435c32112356c387aff Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 12 Mar 2025 11:10:57 -0600 Subject: [PATCH 103/110] Merge pull request #355 from AArnott/renovate/dockerfile-and-global.json-updates Update Dockerfile and global.json updates to v9.0.201 --- .devcontainer/Dockerfile | 2 +- global.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 78a791bc..8f9e2d8b 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,5 +1,5 @@ # Refer to https://hub.docker.com/_/microsoft-dotnet-sdk for available versions -FROM mcr.microsoft.com/dotnet/sdk:9.0.200-noble +FROM mcr.microsoft.com/dotnet/sdk:9.0.201-noble # Installing mono makes `dotnet test` work without errors even for net472. # But installing it takes a long time, so it's excluded by default. diff --git a/global.json b/global.json index 024087d2..95c3e307 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "9.0.200", + "version": "9.0.201", "rollForward": "patch", "allowPrerelease": false } From 24a6e2bd2268958e129e3e98f77d39dbe2ad73d7 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Wed, 19 Mar 2025 15:33:09 -0600 Subject: [PATCH 104/110] Build renovate settings on the best-practices preset (#357) --- .github/renovate.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/renovate.json b/.github/renovate.json index 9582ad99..c8b723c8 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -1,6 +1,6 @@ { "$schema": "https://docs.renovatebot.com/renovate-schema.json", - "extends": ["config:recommended"], + "extends": ["config:best-practices"], "labels": ["dependencies"], "packageRules": [ { From 408618f71d35359f62986a0cfc5fd603f18ecb62 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 19 Mar 2025 15:33:48 -0600 Subject: [PATCH 105/110] Update Dockerfile and global.json updates to v9.0.202 (#356) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .devcontainer/Dockerfile | 2 +- global.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 8f9e2d8b..e605cd68 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,5 +1,5 @@ # Refer to https://hub.docker.com/_/microsoft-dotnet-sdk for available versions -FROM mcr.microsoft.com/dotnet/sdk:9.0.201-noble +FROM mcr.microsoft.com/dotnet/sdk:9.0.202-noble # Installing mono makes `dotnet test` work without errors even for net472. # But installing it takes a long time, so it's excluded by default. diff --git a/global.json b/global.json index 95c3e307..d0e43443 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "9.0.201", + "version": "9.0.202", "rollForward": "patch", "allowPrerelease": false } From b8573cfd44403da853ddb2a1bec3c917368f787d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 19 Mar 2025 21:42:32 +0000 Subject: [PATCH 106/110] Pin dependencies (#358) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/actions/publish-artifacts/action.yaml | 14 +++++++------- .github/workflows/build.yml | 6 +++--- .github/workflows/docs.yml | 6 +++--- .github/workflows/libtemplate-update.yml | 2 +- .github/workflows/release.yml | 2 +- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/actions/publish-artifacts/action.yaml b/.github/actions/publish-artifacts/action.yaml index 2a75c4d2..1f345fe6 100644 --- a/.github/actions/publish-artifacts/action.yaml +++ b/.github/actions/publish-artifacts/action.yaml @@ -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 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index da3e9e1f..d4ee90e5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,7 +29,7 @@ jobs: - windows-2022 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 @@ -74,8 +74,8 @@ jobs: name: ๐Ÿ“ƒ Docs runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 - name: ๐Ÿ”— Markup Link Checker (mlc) - uses: becheran/mlc@v0.21.0 + uses: becheran/mlc@c925f90a9a25e16e4c4bfa29058f6f9ffa9f0d8c # v0.21.0 with: args: --do-not-warn-for-redirect-to https://learn.microsoft.com*,https://dotnet.microsoft.com/*,https://dev.azure.com/*,https://app.codecov.io/* -p docfx diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 70b779b5..0a8f8215 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -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 @@ -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 diff --git a/.github/workflows/libtemplate-update.yml b/.github/workflows/libtemplate-update.yml index 53df80ff..7d0a67a0 100644 --- a/.github/workflows/libtemplate-update.yml +++ b/.github/workflows/libtemplate-update.yml @@ -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. diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c6a5edd8..dccc87af 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -65,7 +65,7 @@ jobs: Echo "runid=$runid" >> $env:GITHUB_OUTPUT - name: ๐Ÿ”ป Download deployables artifacts - uses: actions/download-artifact@v4 + uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4 with: name: deployables-Linux path: ${{ runner.temp }}/deployables From 45692247456d307128609f7a55d2b53e101a33a8 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 19 Mar 2025 21:43:08 +0000 Subject: [PATCH 107/110] Pin mcr.microsoft.com/dotnet/sdk Docker tag to 332e036 (#359) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .devcontainer/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index e605cd68..eaaf8fe1 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,5 +1,5 @@ # Refer to https://hub.docker.com/_/microsoft-dotnet-sdk for available versions -FROM mcr.microsoft.com/dotnet/sdk:9.0.202-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. From 836f33efd58dc19b30c477a6c74631c87cfc5822 Mon Sep 17 00:00:00 2001 From: Tevin Stanley Date: Mon, 24 Mar 2025 15:37:56 -0700 Subject: [PATCH 108/110] fixing build issues with merge --- .github/workflows/build.yml | 4 +-- docfx/.gitignore | 2 ++ docfx/docfx.json | 48 +++++++++++++++++++++++++++++++++++ docfx/docs/features.md | 3 +++ docfx/docs/getting-started.md | 12 +++++++++ 5 files changed, 67 insertions(+), 2 deletions(-) create mode 100644 docfx/.gitignore create mode 100644 docfx/docfx.json create mode 100644 docfx/docs/features.md create mode 100644 docfx/docs/getting-started.md diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4ccf1187..8b6d7d5f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -39,7 +39,7 @@ jobs: } shell: pwsh - name: โš™๏ธ Set pipeline variables based on source - run: azure-pipelines/variables/_pipelines.ps1 + run: tools/variables/_define.ps1 shell: pwsh - name: ๐Ÿ›  build run: dotnet build src -t:build,pack --no-restore -c ${{ env.BUILDCONFIGURATION }} /bl:"${{ runner.temp }}/_artifacts/build_logs/build.binlog" @@ -51,7 +51,7 @@ jobs: shell: pwsh if: runner.os == 'Linux' - name: โš™ Update pipeline variables based on build outputs - run: azure-pipelines/variables/_pipelines.ps1 + run: tools/variables/_define.ps1 shell: pwsh - name: ๐Ÿ“ฅ Collect artifacts run: azure-pipelines/artifacts/_stage_all.ps1 diff --git a/docfx/.gitignore b/docfx/.gitignore new file mode 100644 index 00000000..d5bcab17 --- /dev/null +++ b/docfx/.gitignore @@ -0,0 +1,2 @@ +_site/ +api/ diff --git a/docfx/docfx.json b/docfx/docfx.json new file mode 100644 index 00000000..0b551e91 --- /dev/null +++ b/docfx/docfx.json @@ -0,0 +1,48 @@ +{ + "metadata": [ + { + "src": [ + { + "src": "../src", + "files": [ + "**/*.csproj" + ] + } + ], + "dest": "api" + } + ], + "build": { + "content": [ + { + "files": [ + "**/*.{md,yml}" + ], + "exclude": [ + "_site/**" + ] + } + ], + "resource": [ + { + "files": [ + "images/**" + ] + } + ], + "xref": [ + "https://learn.microsoft.com/en-us/dotnet/.xrefmap.json" + ], + "output": "_site", + "template": [ + "default", + "modern" + ], + "globalMetadata": { + "_appName": "Library", + "_appTitle": "Library", + "_enableSearch": true, + "pdf": false + } + } +} diff --git a/docfx/docs/features.md b/docfx/docs/features.md new file mode 100644 index 00000000..eb3fbeb0 --- /dev/null +++ b/docfx/docs/features.md @@ -0,0 +1,3 @@ +# Features + +TODO diff --git a/docfx/docs/getting-started.md b/docfx/docs/getting-started.md new file mode 100644 index 00000000..eff2c2fb --- /dev/null +++ b/docfx/docs/getting-started.md @@ -0,0 +1,12 @@ +# Getting Started + +## Installation + +Consume this library via its NuGet Package. +Click on the badge to find its latest version and the instructions for consuming it that best apply to your project. + +[![NuGet package](https://img.shields.io/nuget/v/Library.svg)](https://nuget.org/packages/Library) + +## Usage + +TODO From a0c0e2a4a09d3226f23cee44591ac653be0adc8d Mon Sep 17 00:00:00 2001 From: Tevin Stanley Date: Mon, 24 Mar 2025 15:41:25 -0700 Subject: [PATCH 109/110] fix file path --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8b6d7d5f..f0eff8c7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -54,7 +54,7 @@ jobs: run: tools/variables/_define.ps1 shell: pwsh - name: ๐Ÿ“ฅ Collect artifacts - run: azure-pipelines/artifacts/_stage_all.ps1 + run: tools/artifacts/_stage_all.ps1 shell: pwsh if: always() - name: ๐Ÿ“ข Upload project.assets.json files From bb75b2e37c3765d49399181adaab277701fac075 Mon Sep 17 00:00:00 2001 From: Tevin Stanley Date: Mon, 24 Mar 2025 15:42:07 -0700 Subject: [PATCH 110/110] another fix to pathing --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f0eff8c7..f4f832e5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -44,7 +44,7 @@ jobs: - name: ๐Ÿ›  build run: dotnet build src -t:build,pack --no-restore -c ${{ env.BUILDCONFIGURATION }} /bl:"${{ runner.temp }}/_artifacts/build_logs/build.binlog" - name: ๐Ÿงช test - run: azure-pipelines/dotnet-test-cloud.ps1 -Configuration ${{ env.BUILDCONFIGURATION }} -Agent ${{ runner.os }} + run: tools/dotnet-test-cloud.ps1 -Configuration ${{ env.BUILDCONFIGURATION }} -Agent ${{ runner.os }} shell: pwsh - name: ๐Ÿ’…๐Ÿป Verify formatted code run: dotnet format --verify-no-changes --no-restore