Skip to content

Commit

Permalink
Merge pull request #70 from AArnott/dev/andre/libtemplateUpdate
Browse files Browse the repository at this point in the history
Merge latest Library.Template
  • Loading branch information
AArnott authored Jan 22, 2025
2 parents 548bbc0 + f6da28e commit 3057676
Show file tree
Hide file tree
Showing 17 changed files with 63 additions and 66 deletions.
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"rollForward": false
},
"nbgv": {
"version": "3.7.112",
"version": "3.7.115",
"commands": [
"nbgv"
],
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Refer to https://hub.docker.com/_/microsoft-dotnet-sdk for available versions
FROM mcr.microsoft.com/dotnet/sdk:9.0.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.
Expand Down
36 changes: 20 additions & 16 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
{
"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"
]
}
},
"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"
]
"postCreateCommand": "./init.ps1 -InstallLocality machine"
}
2 changes: 2 additions & 0 deletions .github/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[renovate.json*]
indent_style = tab
7 changes: 0 additions & 7 deletions .github/actions/publish-artifacts/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
42 changes: 20 additions & 22 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
{
"$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*"],
"allowedVersions": "<3.0",
"groupName": "xunit"
},
{
"matchDatasources": ["dotnet-version", "docker"],
"matchDepNames": ["dotnet-sdk", "mcr.microsoft.com/dotnet/sdk"],
"groupName": "Dockerfile and global.json updates"
}
]
"$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*"],
"allowedVersions": "<3.0",
"groupName": "xunit"
},
{
"matchDatasources": ["dotnet-version", "docker"],
"matchDepNames": ["dotnet-sdk", "mcr.microsoft.com/dotnet/sdk"],
"groupName": "Dockerfile and global.json updates"
}
]
}
2 changes: 1 addition & 1 deletion .github/workflows/libtemplate-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<GlobalPackageReference Include="CSharpIsNullAnalyzer" Version="0.1.593" />
<GlobalPackageReference Include="DotNetAnalyzers.DocumentationAnalyzers" Version="1.0.0-beta.59" />
<!-- The condition works around https://github.com/dotnet/sdk/issues/44951 -->
<GlobalPackageReference Include="Nerdbank.GitVersioning" Version="3.7.112" Condition="!('$(TF_BUILD)'=='true' and '$(dotnetformat)'=='true')" />
<GlobalPackageReference Include="Nerdbank.GitVersioning" Version="3.7.115" Condition="!('$(TF_BUILD)'=='true' and '$(dotnetformat)'=='true')" />
<GlobalPackageReference Include="PolySharp" Version="1.15.0" />
<GlobalPackageReference Include="StyleCop.Analyzers.Unstable" Version="1.2.0.556" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "9.0.101",
"version": "9.0.102",
"rollForward": "patch",
"allowPrerelease": false
}
Expand Down
4 changes: 4 additions & 0 deletions test/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<ItemGroup>
<Content Include="xunit.runner.json" CopyToOutputDirectory="PreserveNewest" Condition="Exists('xunit.runner.json')" />
</ItemGroup>

<Import Project="$([MSBuild]::GetPathOfFileAbove($(MSBuildThisFile), $(MSBuildThisFileDirectory)..))" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@
<TargetFrameworks Condition="'$(OS)' == 'Windows_NT'">$(TargetFrameworks);net462</TargetFrameworks>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<Content Include="xunit.runner.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Xunit.SkippableFact\Xunit.SkippableFact.csproj" />
</ItemGroup>
Expand Down
3 changes: 0 additions & 3 deletions test/Xunit.SkippableFact.Tests/xunit.runner.json

This file was deleted.

2 changes: 1 addition & 1 deletion tools/Get-ArtifactsStagingDirectory.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
2 changes: 1 addition & 1 deletion tools/artifacts/_stage_all.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ param (
[switch]$AvoidSymbolicLinks
)

$ArtifactStagingFolder = & "$PSScriptRoot/../../tools/Get-ArtifactsStagingDirectory.ps1" -CleanIfLocal
$ArtifactStagingFolder = & "$PSScriptRoot/../Get-ArtifactsStagingDirectory.ps1" -CleanIfLocal

function Create-SymbolicLink {
param (
Expand Down
2 changes: 1 addition & 1 deletion tools/artifacts/build_logs.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$ArtifactStagingFolder = & "$PSScriptRoot/../../tools/Get-ArtifactsStagingDirectory.ps1"
$ArtifactStagingFolder = & "$PSScriptRoot/../Get-ArtifactsStagingDirectory.ps1"

if (!(Test-Path $ArtifactStagingFolder/build_logs)) { return }

Expand Down
5 changes: 3 additions & 2 deletions tools/artifacts/testResults.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ $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\*";
$result[$testlogsPath] = Get-ChildItem $testlogsPath -Recurse;
}

$result
9 changes: 6 additions & 3 deletions tools/dotnet-test-cloud.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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 `
Expand All @@ -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
Expand All @@ -65,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 '/(?<tfm>net[^/]+)/(?:(?<rid>[^/]+)/)?(?<lib>[^/]+)\.dll$') {
if ($storage -match '/(?<tfm>net[^/]+)/(?:(?<rid>[^/]+)/)?(?<lib>[^/]+)\.(dll|exe)$') {
if ($matches.rid) {
$runTitle = "$($matches.lib) ($($matches.tfm), $($matches.rid), $Agent)"
} else {
Expand Down

0 comments on commit 3057676

Please sign in to comment.