Skip to content

Commit 73ef762

Browse files
authored
Merge pull request #594 from ckadluba/release-8.0.0
Release 8.0.0
2 parents 23d1596 + 244181f commit 73ef762

File tree

21 files changed

+209
-121
lines changed

21 files changed

+209
-121
lines changed

.github/workflows/perftests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
- uses: actions/checkout@v4
1212

1313
- name: Run build
14-
run: ./Build.ps1 -SkipTests
14+
run: ./Build.ps1 -SkipTests -SkipSamples
1515
shell: pwsh
1616

1717
- name: Run performance tests

.github/workflows/pr-analysis-codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99

1010
jobs:
1111
build-and-codeql:
12-
runs-on: ubuntu-latest
12+
runs-on: windows-latest
1313
permissions:
1414
actions: read
1515
contents: read

.github/workflows/pr-validation.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
# Run every biweekly to discover failures due to environment changes
88
schedule:
99
- cron: '0 0 1,15 * *'
10-
10+
1111
# Allows you to run this workflow manually from the Actions tab
1212
workflow_dispatch:
1313

@@ -24,8 +24,8 @@ jobs:
2424
- name: Upload binaries artifact for InferSharp job
2525
uses: actions/upload-artifact@v4
2626
with:
27-
name: bin-net6
28-
path: src\Serilog.Sinks.MSSqlServer\bin\Release\net6.0
27+
name: bin
28+
path: src\Serilog.Sinks.MSSqlServer\bin\Release\net8.0
2929

3030
- name: Upload testresults artifact with code coverage file
3131
uses: actions/upload-artifact@v4
@@ -44,13 +44,13 @@ jobs:
4444
- name: Download binaries artifact
4545
uses: actions/download-artifact@v4
4646
with:
47-
name: bin-net6
48-
path: bin-net6
47+
name: bin
48+
path: bin
4949

5050
- name: Run Infer#
5151
uses: microsoft/[email protected]
5252
with:
53-
binary-path: bin-net6
53+
binary-path: bin
5454

5555
- name: Upload SARIF output to GitHub Security Center
5656
uses: github/codeql-action/upload-sarif@v3

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
shell: pwsh
3333

3434
- name: Run build
35-
run: ./Build.ps1 -SkipTests
35+
run: ./Build.ps1 -SkipTests -SkipSamples
3636
shell: pwsh
3737

3838
- name: Run performance tests

Build.ps1

Lines changed: 117 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -2,61 +2,135 @@
22
param (
33
[Parameter(Mandatory = $false)]
44
[Switch]
5-
$SkipTests
6-
)
7-
8-
echo "build: Build started"
9-
10-
Push-Location "$PSScriptRoot"
11-
12-
if (Test-Path .\artifacts) {
13-
echo "build: Cleaning .\artifacts"
14-
Remove-Item .\artifacts -Force -Recurse
15-
}
16-
17-
& dotnet restore --no-cache
5+
$SkipTests,
186

19-
$branch = @{ $true = $env:GITHUB_REF_NAME; $false = $(git symbolic-ref --short -q HEAD) }[$env:GITHUB_REF_NAME -ne $NULL]
20-
$revision = @{ $true = "{0:00000}" -f [convert]::ToInt32("0" + $env:GITHUB_RUN_NUMBER, 10); $false = "local" }[$env:GITHUB_RUN_NUMBER -ne $NULL]
21-
$suffix = @{ $true = ""; $false = "$($branch.Substring(0, [math]::Min(10, $branch.Length)))-$revision" }[$branch -ne "dev" -and $revision -ne "local"]
7+
[Parameter(Mandatory = $false)]
8+
[Switch]
9+
$SkipPerfTests,
2210

23-
echo "build: Version suffix is $suffix"
11+
[Parameter(Mandatory = $false)]
12+
[Switch]
13+
$SkipSamples
14+
)
2415

25-
foreach ($src in Get-ChildItem "$PSScriptRoot/src" -Directory) {
26-
Push-Location $src.FullName
16+
echo "build: Build started"
2717

28-
echo "build: Packaging project in $($src.FullName)"
18+
try
19+
{
20+
Push-Location "$PSScriptRoot"
2921

30-
if ($suffix) {
31-
& dotnet pack -c Release -o ..\..\artifacts --version-suffix=$suffix
32-
} else {
33-
& dotnet pack -c Release -o ..\..\artifacts
22+
if (Test-Path .\artifacts)
23+
{
24+
echo "build: Cleaning .\artifacts"
25+
Remove-Item .\artifacts -Force -Recurse
3426
}
35-
if ($LASTEXITCODE -ne 0) { exit 1 }
3627

37-
Pop-Location
38-
}
39-
40-
if ($SkipTests -eq $false) {
41-
foreach ($test in Get-ChildItem "$PSScriptRoot/test" -Filter "*.Tests" -Directory) {
42-
Push-Location $test.FullName
43-
44-
echo "build: Testing project in $($test.FullName)"
45-
46-
& dotnet test -c Release --collect "XPlat Code Coverage"
47-
if ($LASTEXITCODE -ne 0) { exit 3 }
28+
echo "build: Restoring packages for solution"
29+
& dotnet restore --no-cache
30+
if ($LASTEXITCODE -ne 0)
31+
{
32+
echo "Error returned by dotnet restore. Aborting build."
33+
exit 1
34+
}
4835

36+
$branch = @{ $true = $env:GITHUB_REF_NAME; $false = $( git symbolic-ref --short -q HEAD ) }[$env:GITHUB_REF_NAME -ne $NULL]
37+
$revision = @{ $true = "{0:00000}" -f [convert]::ToInt32("0" + $env:GITHUB_RUN_NUMBER, 10); $false = "local" }[$env:GITHUB_RUN_NUMBER -ne $NULL]
38+
$suffix = @{ $true = ""; $false = "$($branch.Substring(0,[math]::Min(10, $branch.Length)) )-$revision" }[$branch -ne "dev" -and $revision -ne "local"]
39+
40+
echo "build: Version suffix is $suffix"
41+
42+
$sinkProjectPath = "$PSScriptRoot/src/Serilog.Sinks.MSSqlServer"
43+
try
44+
{
45+
Push-Location "$sinkProjectPath"
46+
47+
echo "build: Packaging sink main project in $sinkProjectPath"
48+
if ($suffix)
49+
{
50+
& dotnet pack -c Release -o ..\..\artifacts --version-suffix=$suffix
51+
}
52+
else
53+
{
54+
& dotnet pack -c Release -o ..\..\artifacts
55+
}
56+
if ($LASTEXITCODE -ne 0)
57+
{
58+
echo "Error returned by dotnet pack. Aborting build."
59+
exit 1
60+
}
61+
}
62+
finally
63+
{
4964
Pop-Location
5065
}
5166

52-
# The performance benchmark tests should at least build without errors during PR validation
53-
$perfTestProjectPath = "$PSScriptRoot/test/Serilog.Sinks.MSSqlServer.PerformanceTests"
54-
Push-Location "$perfTestProjectPath"
67+
if ($SkipTests -eq $false)
68+
{
69+
$testProjectPath = "$PSScriptRoot/test/Serilog.Sinks.MSSqlServer.Tests"
70+
try
71+
{
72+
Push-Location "$testProjectPath"
73+
74+
echo "build: Testing project in $testProjectPath"
75+
& dotnet test -c Release --collect "XPlat Code Coverage"
76+
if ($LASTEXITCODE -ne 0)
77+
{
78+
exit 2
79+
}
80+
81+
}
82+
finally
83+
{
84+
Pop-Location
85+
}
86+
}
87+
88+
if ($SkipPerfTests -eq $false)
89+
{
90+
# The performance benchmark tests should at least build without errors during PR validation
91+
$perfTestProjectPath = "$PSScriptRoot/test/Serilog.Sinks.MSSqlServer.PerformanceTests"
92+
try
93+
{
94+
Push-Location "$perfTestProjectPath"
95+
96+
echo "build: Building performance test project in $perfTestProjectPath"
97+
& dotnet build -c Release
98+
if ($LASTEXITCODE -ne 0)
99+
{
100+
exit 3
101+
}
102+
}
103+
finally
104+
{
105+
Pop-Location
106+
}
107+
}
55108

56-
echo "build: Building performance test project in $perfTestProjectPath"
57-
& dotnet build -c Release
109+
if ($SkipSamples -eq $false)
110+
{
111+
foreach ($src in Get-ChildItem "$PSScriptRoot/sample/*.csproj" -File -Recurse)
112+
{
113+
try
114+
{
115+
Push-Location $src.DirectoryName
116+
117+
echo "build: Building sample project $( $src.FullName )"
118+
& dotnet build -c Release -o ..\..\artifacts
119+
if ($LASTEXITCODE -ne 0)
120+
{
121+
echo "Error returned by dotnet build. Aborting build."
122+
exit 4
123+
}
124+
}
125+
finally
126+
{
127+
Pop-Location
128+
}
129+
}
130+
}
58131

132+
}
133+
finally
134+
{
59135
Pop-Location
60136
}
61-
62-
Pop-Location

CHANGES.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# 8.0.0
2+
* Updated to .NET 8
3+
* Updated nearly all dependencies
4+
* Improved build script (build samples, fail on vulns, ...)
5+
* Removed some obsolete vulnerability fix dependencies
6+
* Fixed missing dependency in AppConfigDemo sample
7+
18
# 7.0.2
29
* Fixed issue #580: Removed deprecated transitive dependency on Microsoft.NETCore.Targets by removing runtime identifier (thanks to @david-brink-talogy)
310
* Fixed issues #540 and #541 in README

Directory.Packages.props

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,22 @@
44
</PropertyGroup>
55
<ItemGroup>
66
<PackageVersion Include="BenchmarkDotNet" Version="0.14.0" />
7-
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
8-
<PackageVersion Include="System.Configuration.ConfigurationManager" Version="6.0.1" />
9-
<PackageVersion Include="System.Formats.Asn1" Version="8.0.1" />
10-
<PackageVersion Include="System.Private.Uri" Version="4.3.2" />
11-
<PackageVersion Include="Microsoft.Data.SqlClient" Version="5.1.6" />
12-
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="6.0.1" />
13-
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" />
14-
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="6.0.1" />
15-
<PackageVersion Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="6.0.0" />
16-
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="1.1.1" />
7+
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
8+
<PackageVersion Include="System.Configuration.ConfigurationManager" Version="8.0.1" />
9+
<PackageVersion Include="Microsoft.Data.SqlClient" Version="5.2.2" />
10+
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
11+
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="8.0.1" />
12+
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="8.0.1" />
13+
<PackageVersion Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="8.0.0" />
14+
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
1715
<PackageVersion Include="coverlet.collector" Version="3.2.0" />
18-
<PackageVersion Include="FluentAssertions" Version="6.7.0" />
19-
<PackageVersion Include="Dapper.StrongName" Version="2.0.123" />
16+
<PackageVersion Include="FluentAssertions" Version="6.12.1" />
17+
<PackageVersion Include="Dapper.StrongName" Version="2.1.35" />
2018
<PackageVersion Include="Moq" Version="4.18.2" />
21-
<PackageVersion Include="xunit" Version="2.9.0" />
19+
<PackageVersion Include="xunit" Version="2.9.2" />
2220
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.2" />
23-
<PackageVersion Include="Serilog" Version="4.0.0" />
24-
<PackageVersion Include="Serilog.Extensions.Hosting" Version="5.0.1" />
25-
<PackageVersion Include="Serilog.Settings.Configuration" Version="3.4.0" />
21+
<PackageVersion Include="Serilog" Version="4.1.0" />
22+
<PackageVersion Include="Serilog.Extensions.Hosting" Version="8.0.0" />
23+
<PackageVersion Include="Serilog.Settings.Configuration" Version="8.0.4" />
2624
</ItemGroup>
2725
</Project>

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ Because of the way external configuration has been implemented in various .NET f
9191
| .NET Framework 4.6.2+ | `net462` | app or library | _System.Configuration_ |
9292
| .NET Framework 4.6.2+ | `net462` | app or library | _Microsoft.Extensions.Configuration_ |
9393
| .NET Standard 2.0 | `netstandard2.0` | library only | _Microsoft.Extensions.Configuration_ |
94-
| .NET 6.0+ | `net6.0` | app or library | _System.Configuration_ |
95-
| .NET 6.0+ | `net6.0` | app or library | _Microsoft.Extensions.Configuration_ |
94+
| .NET 8.0+ | `net8.0` | app or library | _System.Configuration_ |
95+
| .NET 8.0+ | `net8.0` | app or library | _Microsoft.Extensions.Configuration_ |
9696

9797
Although it's possible to use both XML and _M.E.C_ configuration with certain frameworks, this is not supported, unintended consequences are possible, and a warning will be emitted to `SelfLog`. If you actually require multiple configuration sources, the _M.E.C_ builder-pattern is designed to support this, and your syntax will be consistent across configuration sources.
9898

RunPerfTests.ps1

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,37 @@ param (
77

88
echo "perf: Performance tests started with Filter = $Filter"
99

10-
Push-Location $PSScriptRoot
10+
try
11+
{
12+
Push-Location $PSScriptRoot
1113

12-
$artifactsPath = "$PSScriptRoot\artifacts\perftests"
14+
$artifactsPath = "$PSScriptRoot\artifacts\perftests"
1315

14-
if (Test-Path "$artifactsPath") {
15-
echo "perf: Cleaning $artifactsPath"
16-
Remove-Item "$artifactsPath" -Force -Recurse
17-
}
16+
if (Test-Path "$artifactsPath")
17+
{
18+
echo "perf: Cleaning $artifactsPath"
19+
Remove-Item "$artifactsPath" -Force -Recurse
20+
}
1821

19-
New-Item -Path "$artifactsPath" -ItemType Directory
22+
New-Item -Path "$artifactsPath" -ItemType Directory
2023

21-
$perfTestProjectPath = "$PSScriptRoot/test/Serilog.Sinks.MSSqlServer.PerformanceTests"
22-
Push-Location "$perfTestProjectPath"
24+
$perfTestProjectPath = "$PSScriptRoot/test/Serilog.Sinks.MSSqlServer.PerformanceTests"
25+
try
26+
{
27+
Push-Location "$perfTestProjectPath"
2328

24-
echo "perf: Running performance test project in $perfTestProjectPath"
25-
& dotnet run -c Release -- -f $Filter
29+
echo "perf: Running performance test project in $perfTestProjectPath"
30+
& dotnet run -c Release -- -f $Filter
2631

27-
cp ".\BenchmarkDotNet.Artifacts\results\*.*" "$artifactsPath\"
28-
Pop-Location
32+
cp ".\BenchmarkDotNet.Artifacts\results\*.*" "$artifactsPath\"
33+
}
34+
finally
35+
{
36+
Pop-Location
37+
}
2938

30-
Pop-Location
39+
}
40+
finally
41+
{
42+
Pop-Location
43+
}

sample/AppConfigDemo/App.config

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@
1111
<BatchPostingLimit Value="13" />
1212
<BatchPeriod Value="00:00:15" />
1313
<EagerlyEmitFirstEvent Value="true" />
14-
14+
15+
<AutoCreateSqlDatabase Value="true" />
16+
<AutoCreateSqlTable Value="true" />
17+
1518
<AddStandardColumns>
1619
<add Name="LogEvent" />
1720
</AddStandardColumns>

0 commit comments

Comments
 (0)