Skip to content

Commit 7e22c2f

Browse files
authored
Merge pull request #14 from tabrath/feat/span
Use spans
2 parents df5eb65 + 1020de6 commit 7e22c2f

16 files changed

Lines changed: 694 additions & 624 deletions

.circleci/config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ jobs:
55
- image: microsoft/dotnet:1.1-sdk
66
steps:
77
- checkout
8-
- run: dotnet test -f netcoreapp1.1 test/BinaryEncoding.Tests/BinaryEncoding.Tests.csproj
8+
- run: dotnet test -f netcoreapp1.1 -c Release test/BinaryEncoding.Tests/BinaryEncoding.Tests.csproj
99
build:
1010
docker:
11-
- image: microsoft/dotnet:2.0-sdk
11+
- image: microsoft/dotnet:2.2-sdk
1212
steps:
1313
- checkout
14-
- run: dotnet test -f netcoreapp2.0 test/BinaryEncoding.Tests/BinaryEncoding.Tests.csproj
14+
- run: dotnet test -f netcoreapp2.2 -c Release test/BinaryEncoding.Tests/BinaryEncoding.Tests.csproj
1515

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
*.user
77
*.userosscache
88
*.sln.docstates
9+
*.binlog
10+
*.opencover.xml
911

1012
# User-specific files (MonoDevelop/Xamarin Studio)
1113
*.userprefs

.travis.yml

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,14 @@
11
language: csharp
22
solution: BinaryEncoding.sln
33

4-
matrix:
5-
include:
6-
- dotnet: 2.1.300-preview2-008533
7-
mono: none
8-
env: DOTNET=1
9-
os: linux
10-
- mono: latest
11-
env: MONO=1
12-
os: linux
13-
- dotnet: 2.1.300-preview2-008533
14-
mono: none
15-
env: DOTNET=1
16-
os: osx
17-
- mono: latest
18-
env: MONO=1
19-
os: osx
4+
sudo: required
5+
dist: xenial
6+
mono: latest
7+
dotnet: 2.2.300
8+
9+
os:
10+
- linux
11+
- osx
2012

2113
notifications:
2214
email:
@@ -32,15 +24,16 @@ cache:
3224
directories:
3325
- ./packages
3426
- /.dotnetcli
27+
- $HOME/.nuget/packages
3528
- $HOME/Library/Caches/Homebrew
3629

3730
before_install:
3831
- if test "$TRAVIS_OS_NAME" == "osx"; then brew update; brew install openssl; ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/; ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/; fi
3932

4033
install:
4134
- git config --global core.autocrlf input
42-
- chmod +x ./build.sh
4335

4436
script:
45-
- ./build.sh
46-
37+
- dotnet build -c Release
38+
- dotnet test -c Release -f netcoreapp2.2 --no-build --no-restore --blame
39+
- mono $HOME/.nuget/packages/xunit.runner.console/*/tools/net452/xunit.console.exe ./test/BinaryEncoding.Tests/bin/Release/net452/BinaryEncoding.Tests.dll

Directory.Build.props

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
<PropertyGroup>
3+
<!-- When compiling .NET SDK 2.0 projects targeting .NET 4.x on Mono using 'dotnet build' you -->
4+
<!-- have to teach MSBuild where the Mono copy of the reference asssemblies is -->
5+
<TargetIsMono Condition="$(TargetFramework.StartsWith('net4')) and '$(OS)' == 'Unix'">true</TargetIsMono>
6+
7+
<!-- Look in the standard install locations -->
8+
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND '$(TargetIsMono)' == 'true' AND EXISTS('/Library/Frameworks/Mono.framework/Versions/Current/lib/mono')">/Library/Frameworks/Mono.framework/Versions/Current/lib/mono</BaseFrameworkPathOverrideForMono>
9+
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND '$(TargetIsMono)' == 'true' AND EXISTS('/usr/lib/mono')">/usr/lib/mono</BaseFrameworkPathOverrideForMono>
10+
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND '$(TargetIsMono)' == 'true' AND EXISTS('/usr/local/lib/mono')">/usr/local/lib/mono</BaseFrameworkPathOverrideForMono>
11+
12+
<!-- If we found Mono reference assemblies, then use them -->
13+
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net45'">$(BaseFrameworkPathOverrideForMono)/4.5-api</FrameworkPathOverride>
14+
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net451'">$(BaseFrameworkPathOverrideForMono)/4.5.1-api</FrameworkPathOverride>
15+
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net452'">$(BaseFrameworkPathOverrideForMono)/4.5.2-api</FrameworkPathOverride>
16+
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net46'">$(BaseFrameworkPathOverrideForMono)/4.6-api</FrameworkPathOverride>
17+
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net461'">$(BaseFrameworkPathOverrideForMono)/4.6.1-api</FrameworkPathOverride>
18+
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net462'">$(BaseFrameworkPathOverrideForMono)/4.6.2-api</FrameworkPathOverride>
19+
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net47'">$(BaseFrameworkPathOverrideForMono)/4.7-api</FrameworkPathOverride>
20+
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net471'">$(BaseFrameworkPathOverrideForMono)/4.7.1-api</FrameworkPathOverride>
21+
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net472'">$(BaseFrameworkPathOverrideForMono)/4.7.2-api</FrameworkPathOverride>
22+
<EnableFrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != ''">true</EnableFrameworkPathOverride>
23+
24+
<!-- Add the Facades directory. Not sure how else to do this. Necessary at least for .NET 4.5 -->
25+
<AssemblySearchPaths Condition=" '$(BaseFrameworkPathOverrideForMono)' != '' ">{RawFileName};{CandidateAssemblyFiles};{HintPathFromItem};$(FrameworkPathOverride)/Facades;$(AssemblySearchPaths)</AssemblySearchPaths>
26+
<AssemblySearchPaths Condition=" $(TargetFramework.StartsWith('net45')) and '$(BaseFrameworkPathOverrideForMono)' != '' ">$(BaseFrameworkPathOverrideForMono)/4.5;$(BaseFrameworkPathOverrideForMono)/4.5/Facades;$(AssemblySearchPaths)</AssemblySearchPaths>
27+
</PropertyGroup>
28+
</Project>

appveyor.yml

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -38,47 +38,31 @@ init:
3838
- ps: Update-AppveyorBuild -Version $env:BUILD_VERSION
3939
- ps: Write-Host "Build version $env:BUILD_VERSION, NuGet version $env:NUGET_VERSION, Version suffix $env:VERSION_SUFFIX"
4040

41-
before_build:
42-
- appveyor-retry dotnet restore -v Minimal --runtime win10-x64
43-
4441
build_script:
4542
- ps: |
4643
if ($env:APPVEYOR_REPO_BRANCH -eq "master")
4744
{
48-
dotnet build "src\BinaryEncoding" -c $env:CONFIGURATION
45+
dotnet build -c $env:CONFIGURATION
4946
}
5047
else
5148
{
52-
dotnet build "src\BinaryEncoding" -c $env:CONFIGURATION --version-suffix $env:VERSION_SUFFIX
53-
}
54-
55-
after_build:
56-
- ps: |
57-
if ($env:APPVEYOR_REPO_BRANCH -eq "master")
58-
{
59-
dotnet pack "src\BinaryEncoding" -c $env:CONFIGURATION --no-build -o $env:APPVEYOR_BUILD_FOLDER\artifacts
60-
}
61-
else
62-
{
63-
dotnet pack "src\BinaryEncoding" -c $env:CONFIGURATION --no-build --version-suffix $env:VERSION_SUFFIX -o $env:APPVEYOR_BUILD_FOLDER\artifacts
49+
dotnet build -c $env:CONFIGURATION --version-suffix $env:VERSION_SUFFIX
6450
}
6551
6652
test: off
6753

6854
test_script:
69-
- dotnet test --configuration Debug --framework netcoreapp2.0 --logger trx;logfilename=TestResult.xml --results-directory "%APPVEYOR_BUILD_FOLDER%\test\BinaryEncoding.Tests\TestResults" /p:CollectCoverage=true /p:CoverletOutputFormat=opencover %APPVEYOR_BUILD_FOLDER%\test\BinaryEncoding.Tests\BinaryEncoding.Tests.csproj
70-
71-
after_test:
72-
- ps: |
73-
$wc = New-Object 'System.Net.WebClient'
74-
$wc.UploadFile("https://ci.appveyor.com/api/testresults/xunit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\test\BinaryEncoding.Tests\TestResults\TestResult.xml))
55+
- dotnet test -c %CONFIGURATION% -f netcoreapp2.2 /p:CollectCoverage=true %APPVEYOR_BUILD_FOLDER%\test\BinaryEncoding.Tests
7556

7657
on_success:
7758
- choco install codecov
78-
- codecov -f "%APPVEYOR_BUILD_FOLDER%\test\BinaryEncoding.Tests\coverage.xml"
59+
- codecov -f "%APPVEYOR_BUILD_FOLDER%\test\BinaryEncoding.Tests\coverage.opencover.xml"
7960

8061
artifacts:
81-
- path: artifacts\**\*.*
62+
- path: '**\*.nupkg'
63+
name: nupkg
64+
- path: '**\*.snupkg'
65+
name: snupkg
8266

8367
cache:
8468
- '%USERPROFILE%\.local'

build.sh

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

0 commit comments

Comments
 (0)