Skip to content

Commit 050f808

Browse files
committed
#10 - build/test scripts and project layout from serilog/serilog; .NET Core (netstandard1.3) support; BlockingCollection-based implementation.
1 parent 2e42383 commit 050f808

File tree

62 files changed

+502
-1986
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+502
-1986
lines changed

.gitattributes

Lines changed: 2 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,3 @@
1-
###############################################################################
2-
# Set default behavior to automatically normalize line endings.
3-
###############################################################################
4-
* text=auto
5-
6-
###############################################################################
7-
# Set default behavior for command prompt diff.
8-
#
9-
# This is need for earlier builds of msysgit that does not have it on by
10-
# default for csharp files.
11-
# Note: This is only used by command line
12-
###############################################################################
13-
#*.cs diff=csharp
14-
15-
###############################################################################
16-
# Set the merge driver for project and solution files
17-
#
18-
# Merging from the command prompt will add diff markers to the files if there
19-
# are conflicts (Merging from VS is not affected by the settings below, in VS
20-
# the diff markers are never inserted). Diff markers may cause the following
21-
# file extensions to fail to load in VS. An alternative would be to treat
22-
# these files as binary and thus will always conflict and require user
23-
# intervention with every merge. To do so, just uncomment the entries below
24-
###############################################################################
25-
#*.sln merge=binary
26-
#*.csproj merge=binary
27-
#*.vbproj merge=binary
28-
#*.vcxproj merge=binary
29-
#*.vcproj merge=binary
30-
#*.dbproj merge=binary
31-
#*.fsproj merge=binary
32-
#*.lsproj merge=binary
33-
#*.wixproj merge=binary
34-
#*.modelproj merge=binary
35-
#*.sqlproj merge=binary
36-
#*.wwaproj merge=binary
1+
# Auto detect text files and perform LF normalization
372

38-
###############################################################################
39-
# behavior for image files
40-
#
41-
# image files are treated as binary by default.
42-
###############################################################################
43-
#*.jpg binary
44-
#*.png binary
45-
#*.gif binary
46-
47-
###############################################################################
48-
# diff behavior for common document formats
49-
#
50-
# Convert binary document formats to text before diffing them. This feature
51-
# is only available from the command line. Turn it on by uncommenting the
52-
# entries below.
53-
###############################################################################
54-
#*.doc diff=astextplain
55-
#*.DOC diff=astextplain
56-
#*.docx diff=astextplain
57-
#*.DOCX diff=astextplain
58-
#*.dot diff=astextplain
59-
#*.DOT diff=astextplain
60-
#*.pdf diff=astextplain
61-
#*.PDF diff=astextplain
62-
#*.rtf diff=astextplain
63-
#*.RTF diff=astextplain
3+
* text=auto

Build.ps1

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
echo "build: Build started"
2+
3+
Push-Location $PSScriptRoot
4+
5+
if(Test-Path .\artifacts) {
6+
echo "build: Cleaning .\artifacts"
7+
Remove-Item .\artifacts -Force -Recurse
8+
}
9+
10+
& dotnet restore --no-cache
11+
12+
$branch = @{ $true = $env:APPVEYOR_REPO_BRANCH; $false = $(git symbolic-ref --short -q HEAD) }[$env:APPVEYOR_REPO_BRANCH -ne $NULL];
13+
$revision = @{ $true = "{0:00000}" -f [convert]::ToInt32("0" + $env:APPVEYOR_BUILD_NUMBER, 10); $false = "local" }[$env:APPVEYOR_BUILD_NUMBER -ne $NULL];
14+
$suffix = @{ $true = ""; $false = "$($branch.Substring(0, [math]::Min(10,$branch.Length)))-$revision"}[$branch -eq "master" -and $revision -ne "local"]
15+
16+
echo "build: Version suffix is $suffix"
17+
18+
foreach ($src in ls src/*) {
19+
Push-Location $src
20+
21+
echo "build: Packaging project in $src"
22+
23+
& dotnet pack -c Release -o ..\..\artifacts --version-suffix=$suffix
24+
if($LASTEXITCODE -ne 0) { exit 1 }
25+
26+
Pop-Location
27+
}
28+
29+
foreach ($test in ls test/*.PerformanceTests) {
30+
Push-Location $test
31+
32+
echo "build: Building performance test project in $test"
33+
34+
& dotnet build -c Release
35+
if($LASTEXITCODE -ne 0) { exit 2 }
36+
37+
Pop-Location
38+
}
39+
40+
foreach ($test in ls test/*.Tests) {
41+
Push-Location $test
42+
43+
echo "build: Testing project in $test"
44+
45+
& dotnet test -c Release
46+
if($LASTEXITCODE -ne 0) { exit 3 }
47+
48+
Pop-Location
49+
}
50+
51+
Pop-Location

appveyor.yml

Lines changed: 26 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,29 @@
1-
version: 1.0.{build}
2-
clone_depth: 5
3-
force_https_clone: true
4-
environment:
5-
REPO_CLONE_ATTEMPTS: 5
6-
REPO_CLONE_TIMEOUT: 180
7-
REPO_CLONE_PROTOCOL: https
8-
buildconfig: Release
9-
matrix:
10-
- test_type: Unit.Testing
11-
test_assemblies: Serilog.Sinks.Async.UnitTests\bin\$env:buildconfig\Serilog.Sinks.Async.UnitTests.dll
12-
test_category: Unit
13-
test_settings:
14-
- test_type: Integration.Testing
15-
test_assemblies: Serilog.Sinks.Async.IntTests\bin\$env:buildconfig\Serilog.Sinks.Async.IntTests.dll
16-
test_category: Integration
17-
test_settings:
18-
- test_type: Perf.Testing
19-
test_assemblies: Serilog.Sinks.Async.IntTests\bin\$env:buildconfig\Serilog.Sinks.Async.IntTests.dll
20-
test_category: Integration.Perf
21-
test_settings:
22-
matrix:
23-
fast_finish: false
24-
init:
25-
#- ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
26-
clone_script:
27-
- ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/clone-repo-retry.ps1'))
1+
version: '{build}'
2+
skip_tags: true
3+
image: Visual Studio 2015
4+
configuration: Release
5+
install:
6+
- ps: mkdir -Force ".\build\" | Out-Null
7+
- ps: Invoke-WebRequest "https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0-preview2/scripts/obtain/dotnet-install.ps1" -OutFile ".\build\installcli.ps1"
8+
- ps: $env:DOTNET_INSTALL_DIR = "$pwd\.dotnetcli"
9+
- ps: '& .\build\installcli.ps1 -InstallDir "$env:DOTNET_INSTALL_DIR" -NoPath -Version 1.0.0-preview2-003121'
10+
- ps: $env:Path = "$env:DOTNET_INSTALL_DIR;$env:Path"
2811
build_script:
29-
- cd src
30-
- msbuild.exe Serilog.Sinks.Async.sln /t:Rebuild /p:Configuration=%buildconfig% /verbosity:minimal
31-
- cd..
32-
after_build:
33-
- cd src
34-
- cd Serilog.Sinks.Async
35-
- ..\.nuget\nuget.exe pack Serilog.Sinks.Async.csproj -Symbols -IncludeReferencedProjects -Properties Configuration=%buildconfig%
36-
- cd..
37-
- cd..
38-
- appveyor PushArtifact src\Serilog.Sinks.Async\Serilog.Sinks.Async.1.0.0.nupkg
39-
- appveyor PushArtifact src\Serilog.Sinks.Async\Serilog.Sinks.Async.1.0.0.symbols.nupkg
40-
test_script:
41-
- ps: >-
42-
cd src
43-
44-
$env:test_assemblies.Split(';') | % {
45-
$assemblyName = $ExecutionContext.InvokeCommand.ExpandString($_)
46-
47-
if ($env:test_settings){
48-
&vstest.console $assemblyName /InIsolation /logger:AppVeyor /settings:$env:test_settings /testcasefilter:`"TestCategory=$env:test_category`"
49-
} else {
50-
&vstest.console $assemblyName /InIsolation /logger:AppVeyor /testcasefilter:`"TestCategory=$env:test_category`"
51-
}
52-
53-
if ($global:LASTEXITCODE -ne 0){
54-
$host.SetShouldExit($global:LASTEXITCODE)
55-
break
56-
}
57-
}
58-
59-
cd..
12+
- ps: ./Build.ps1
13+
test: off
14+
artifacts:
15+
- path: artifacts/Serilog.*.nupkg
6016
deploy:
61-
provider: NuGet
17+
- provider: NuGet
6218
api_key:
63-
secure: ouXO+JncruHh/QCmfUIrxaho6E8wocItwEWxePF9uziuEWe0jruLGyuFxzcoUKy3
64-
skip_symbols: false
19+
secure: nvZ/z+pMS91b3kG4DgfES5AcmwwGoBYQxr9kp4XiJHj25SAlgdIxFx++1N0lFH2x
20+
skip_symbols: true
21+
on:
22+
branch: /^(master|dev)$/
23+
- provider: GitHub
24+
auth_token:
25+
secure: p4LpVhBKxGS5WqucHxFQ5c7C8cP74kbNB0Z8k9Oxx/PMaDQ1+ibmoexNqVU5ZlmX
26+
artifact: /Serilog.*\.nupkg/
27+
tag: v$(appveyor_build_version)
28+
on:
29+
branch: master

assets/Serilog.snk

596 Bytes
Binary file not shown.

ci/set-version-from-assemblyinformationalversion.ps1

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

global.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"projects": [ "src", "test" ],
3+
"sdk": {
4+
"version": "1.0.0-preview2-003121"
5+
}
6+
}

serilog-sinks-async.sln

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 14
4+
VisualStudioVersion = 14.0.25420.1
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{76C9F320-3DBC-4613-83AA-3CCD0D9012D9}"
7+
EndProject
8+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{C36755AA-CED6-482B-B7B1-AE483BC3D273}"
9+
EndProject
10+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "global", "global", "{154C7C14-E737-40DF-A631-B1673FE76187}"
11+
ProjectSection(SolutionItems) = preProject
12+
appveyor.yml = appveyor.yml
13+
Build.ps1 = Build.ps1
14+
global.json = global.json
15+
LICENSE = LICENSE
16+
README.md = README.md
17+
EndProjectSection
18+
EndProject
19+
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Serilog.Sinks.Async", "src\Serilog.Sinks.Async\Serilog.Sinks.Async.xproj", "{803CD13A-D54B-4CEC-A55F-E22AE3D93B3C}"
20+
EndProject
21+
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Serilog.Sinks.Async.Tests", "test\Serilog.Sinks.Async.Tests\Serilog.Sinks.Async.Tests.xproj", "{3C2D8E01-5580-426A-BDD9-EC59CD98E618}"
22+
EndProject
23+
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Serilog.Sinks.Async.PerformanceTests", "test\Serilog.Sinks.Async.PerformanceTests\Serilog.Sinks.Async.PerformanceTests.xproj", "{D7A37F73-BBA3-4DAE-9648-1A753A86F968}"
24+
EndProject
25+
Global
26+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
27+
Debug|Any CPU = Debug|Any CPU
28+
Release|Any CPU = Release|Any CPU
29+
EndGlobalSection
30+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
31+
{803CD13A-D54B-4CEC-A55F-E22AE3D93B3C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
32+
{803CD13A-D54B-4CEC-A55F-E22AE3D93B3C}.Debug|Any CPU.Build.0 = Debug|Any CPU
33+
{803CD13A-D54B-4CEC-A55F-E22AE3D93B3C}.Release|Any CPU.ActiveCfg = Release|Any CPU
34+
{803CD13A-D54B-4CEC-A55F-E22AE3D93B3C}.Release|Any CPU.Build.0 = Release|Any CPU
35+
{3C2D8E01-5580-426A-BDD9-EC59CD98E618}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
36+
{3C2D8E01-5580-426A-BDD9-EC59CD98E618}.Debug|Any CPU.Build.0 = Debug|Any CPU
37+
{3C2D8E01-5580-426A-BDD9-EC59CD98E618}.Release|Any CPU.ActiveCfg = Release|Any CPU
38+
{3C2D8E01-5580-426A-BDD9-EC59CD98E618}.Release|Any CPU.Build.0 = Release|Any CPU
39+
{D7A37F73-BBA3-4DAE-9648-1A753A86F968}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
40+
{D7A37F73-BBA3-4DAE-9648-1A753A86F968}.Debug|Any CPU.Build.0 = Debug|Any CPU
41+
{D7A37F73-BBA3-4DAE-9648-1A753A86F968}.Release|Any CPU.ActiveCfg = Release|Any CPU
42+
{D7A37F73-BBA3-4DAE-9648-1A753A86F968}.Release|Any CPU.Build.0 = Release|Any CPU
43+
EndGlobalSection
44+
GlobalSection(SolutionProperties) = preSolution
45+
HideSolutionNode = FALSE
46+
EndGlobalSection
47+
GlobalSection(NestedProjects) = preSolution
48+
{803CD13A-D54B-4CEC-A55F-E22AE3D93B3C} = {76C9F320-3DBC-4613-83AA-3CCD0D9012D9}
49+
{3C2D8E01-5580-426A-BDD9-EC59CD98E618} = {C36755AA-CED6-482B-B7B1-AE483BC3D273}
50+
{D7A37F73-BBA3-4DAE-9648-1A753A86F968} = {C36755AA-CED6-482B-B7B1-AE483BC3D273}
51+
EndGlobalSection
52+
EndGlobal

src/.nuget/NuGet.Config

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

src/.nuget/NuGet.exe

-3.77 MB
Binary file not shown.

0 commit comments

Comments
 (0)