Skip to content

Commit cabc70a

Browse files
authored
Merge pull request #74 from progaudi/migrate/netcoreapp2.0
Migrate/netcoreapp2.0
2 parents dea30f4 + afa4326 commit cabc70a

18 files changed

+96
-90
lines changed

.dockerignore

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

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@ Debug
1616
Release
1717
.idea
1818
bin
19-
obj
19+
obj
20+
/.vs

.travis.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,17 @@ matrix:
33
- os: linux # Ubuntu 14.04
44
dist: trusty
55
sudo: required
6-
- os: linux # Ubuntu 14.04
7-
dist: trusty
8-
env: BUILD_DOCKER=true
96
- os: osx # OSX 10.12
107
osx_image: xcode8.2
118

129
before_install:
13-
- if [[ "$TRAVIS_OS_NAME" == "linux" && "$BUILD_DOCKER" != true ]]; then sudo ./scripts/ubuntu-prereqs.sh ; fi
10+
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo ./scripts/ubuntu-prereqs.sh ; fi
1411
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ./scripts/mac-prereqs.sh ; fi
1512

1613
install:
17-
- if [[ "$BUILD_DOCKER" != true ]]; then ./scripts/dotnet-install.sh ; fi
18-
- if [[ "$BUILD_DOCKER" != true ]]; then PATH=$PATH:$HOME/.dotnet && export PATH ; fi
14+
- ./scripts/dotnet-install.sh
15+
- PATH=$PATH:$HOME/.dotnet && export PATH
1916

2017
script:
21-
- if [[ "$BUILD_DOCKER" != true ]]; then ./scripts/build-netcore.sh ; fi
22-
- if [[ "$BUILD_DOCKER" != true ]]; then ./scripts/test-netcore.sh ; fi
23-
- if [[ "$BUILD_DOCKER" == true ]]; then docker build . ; fi
18+
- ./scripts/build-netcore.sh
19+
- ./scripts/test-netcore.sh

Dockerfile

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

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"sdk": {
3-
"version": "1.0.3"
3+
"version": "2.0.0"
44
}
55
}

msgpack.sln

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
Microsoft Visual Studio Solution File, Format Version 12.00
22
# Visual Studio 15
3-
VisualStudioVersion = 15.0.26403.7
3+
VisualStudioVersion = 15.0.26730.10
44
MinimumVisualStudioVersion = 10.0.40219.1
55
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{024302AB-8703-44C5-A563-05F893163AF0}"
66
ProjectSection(SolutionItems) = preProject
77
.travis.yml = .travis.yml
8+
global.json = global.json
89
EndProjectSection
910
EndProject
10-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "msgpack.light", "src\msgpack.light\msgpack.light.csproj", "{04D4E761-F756-43D8-B31C-79B1B0671243}"
11+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "msgpack.light", "src\msgpack.light\msgpack.light.csproj", "{04D4E761-F756-43D8-B31C-79B1B0671243}"
1112
EndProject
12-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "msgpack.light.tests", "tests\msgpack.light.tests\msgpack.light.tests.csproj", "{4DD9051D-548F-4E11-86EA-746F443CEA67}"
13+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "msgpack.light.tests", "tests\msgpack.light.tests\msgpack.light.tests.csproj", "{4DD9051D-548F-4E11-86EA-746F443CEA67}"
1314
EndProject
14-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "msgpack.light.benchmark", "src\msgpack.light.benchmark\msgpack.light.benchmark.csproj", "{62C5CC43-A029-4529-BBCA-6D8CC69E6B11}"
15+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "msgpack.light.benchmark", "src\msgpack.light.benchmark\msgpack.light.benchmark.csproj", "{62C5CC43-A029-4529-BBCA-6D8CC69E6B11}"
1516
EndProject
1617
Global
1718
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -35,4 +36,7 @@ Global
3536
GlobalSection(SolutionProperties) = preSolution
3637
HideSolutionNode = FALSE
3738
EndGlobalSection
39+
GlobalSection(ExtensibilityGlobals) = postSolution
40+
SolutionGuid = {E31E76EC-C676-45F6-BFBD-448D4436C3C3}
41+
EndGlobalSection
3842
EndGlobal

scripts/build-netcore.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ cd ..
88

99
dotnet restore
1010
dotnet build -c Release -f netstandard1.1 src/msgpack.light/msgpack.light.csproj
11+
dotnet build -c Release -f netstandard2.0 src/msgpack.light/msgpack.light.csproj
1112
dotnet build -c Release -f netcoreapp1.0 tests/msgpack.light.tests/msgpack.light.tests.csproj
1213
dotnet build -c Release -f netcoreapp1.1 tests/msgpack.light.tests/msgpack.light.tests.csproj
14+
dotnet build -c Release -f netcoreapp2.0 tests/msgpack.light.tests/msgpack.light.tests.csproj
1315

1416
popd

scripts/dotnet-install.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ set -ev
44

55
curl -o ./dotnet-install.sh -fL https://raw.githubusercontent.com/dotnet/cli/master/scripts/obtain/dotnet-install.sh
66
chmod +x ./dotnet-install.sh
7-
version=$(jq -r .sdk.version global.json)
8-
./dotnet-install.sh --version $version
7+
./dotnet-install.sh --version 1.0.4
8+
./dotnet-install.sh --version 2.0.0

scripts/test-netcore.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ cd ..
88

99
dotnet test -c Release -f netcoreapp1.0 --no-build tests/msgpack.light.tests/msgpack.light.tests.csproj -- -parallel assemblies
1010
dotnet test -c Release -f netcoreapp1.1 --no-build tests/msgpack.light.tests/msgpack.light.tests.csproj -- -parallel assemblies
11+
dotnet test -c Release -f netcoreapp2.0 --no-build tests/msgpack.light.tests/msgpack.light.tests.csproj -- -parallel assemblies
1112

1213
popd

src/msgpack.light.benchmark/BeerDeserializeBenchmark.cs

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
using BenchmarkDotNet.Attributes;
55

6+
using MessagePack;
7+
68
using ProGaudi.MsgPack.Light.Benchmark.Data;
79

810
namespace ProGaudi.MsgPack.Light.Benchmark
@@ -61,6 +63,19 @@ public void MPCli_Array()
6163
var beer = Serializers.MsgPack.GetSerializer<Beer>().UnpackSingleObject(_msgPackArray);
6264
}
6365

66+
[Benchmark]
67+
public void MPSharp_Stream()
68+
{
69+
_msgPack.Seek(0, SeekOrigin.Begin);
70+
var beer = MessagePackSerializer.Deserialize<Beer>(_msgPack);
71+
}
72+
73+
[Benchmark]
74+
public void MPSharp_Array()
75+
{
76+
var beer = MessagePackSerializer.Deserialize<Beer>(_msgPackArray);
77+
}
78+
6479
[Benchmark]
6580
public void MPLight_Stream()
6681
{
@@ -112,18 +127,5 @@ public void MPLightH_Array_AutoMap()
112127
{
113128
var beer = MsgPackSerializer.Deserialize<Beer>(_msgPackArray, Serializers.MsgPackLightMapAutoGeneration);
114129
}
115-
116-
[Benchmark]
117-
public void MPLightH_Stream_AutoArray()
118-
{
119-
_msgPack.Seek(0, SeekOrigin.Begin);
120-
var beer = MsgPackSerializer.Deserialize<Beer>(_msgPack, Serializers.MsgPackLightArrayAutoGeneration);
121-
}
122-
123-
[Benchmark]
124-
public void MPLightH_Array_AutoArray()
125-
{
126-
var beer = MsgPackSerializer.Deserialize<Beer>(_msgPackArray, Serializers.MsgPackLightArrayAutoGeneration);
127-
}
128130
}
129131
}

0 commit comments

Comments
 (0)