Skip to content

Commit 286108b

Browse files
Merge pull request #84 from progaudi/feature/netstandard
Update Msgpack.Light to latest version
2 parents 1cf700e + 2c232ca commit 286108b

33 files changed

+364
-165
lines changed

.travis.yml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,24 @@ matrix:
55
- os: linux # Ubuntu 14.04
66
dist: trusty
77
sudo: required
8-
dotnet: 1.0.0-preview2-003131
9-
- os: osx # OSX 10.11
10-
osx_image: xcode7.2
11-
dotnet: 1.0.0-preview2-003131
12-
13-
sudo: required
8+
dotnet: 1.0.0-preview4-004233
9+
env: BUILD_NAME=linux
10+
- os: linux # Ubuntu 14.04
11+
dist: trusty
12+
sudo: required
13+
env: BUILD_NAME=docker
14+
- os: osx # OSX 10.12
15+
osx_image: xcode7.3.1
16+
env: BUILD_NAME=osx
1417

1518
services:
1619
- docker
1720

1821
before_script:
19-
- .travis/$TRAVIS_OS_NAME/init.sh
20-
- dotnet restore
22+
- .travis/$BUILD_NAME/init.sh
2123

2224
script:
23-
- dotnet build -f netcoreapp1.0 src/tarantool.client
24-
- .travis/$TRAVIS_OS_NAME/test.sh
25+
- .travis/$BUILD_NAME/test.sh
26+
27+
after_script:
28+
- .travis/$BUILD_NAME/teardown.sh

.travis/docker/init.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env bash
2+
3+
echo 'Docker init script'
4+
5+
docker-compose -f docker-compose.yml -f docker-compose.tests.yml up -d tarantool

.travis/docker/teardown.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env bash
2+
3+
echo 'Docker teardown script'
4+
5+
docker-compose -f docker-compose.yml -f docker-compose.tests.yml down

.travis/docker/test.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env bash
2+
3+
echo 'Docker test script'
4+
5+
docker-compose -f docker-compose.yml -f docker-compose.tests.yml up --build tarantool-client

.travis/linux/init.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,15 @@
22

33
echo 'Linux init script'
44

5+
dotnet --info
6+
dotnet restore
7+
58
docker -v
6-
docker-compose down
9+
10+
docker-compose down
711
docker-compose up -d
12+
813
pushd samples/docker-compose
914
docker-compose down
1015
docker-compose up -d --build
11-
popd
16+
popd

.travis/linux/teardown.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/usr/bin/env bash
2+
3+
echo 'Linux teardown script'

.travis/linux/test.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,8 @@
22

33
echo 'Linux test script'
44

5-
dotnet test tests/tarantool.client.tests
5+
dotnet build -c Release -f netstandard1.4 src/tarantool.client/tarantool.client.csproj
6+
dotnet build -c Release -f netcoreapp1.0 tests/tarantool.client.tests/tarantool.client.tests.csproj
7+
dotnet test -c Release tests/tarantool.client.tests/tarantool.client.tests.csproj
8+
69
curl -o /dev/null --fail http://localhost:5000

.travis/osx/init.sh

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
#!/usr/bin/env bash
22

33
echo 'Mac init script'
4+
45
brew tap caskroom/cask
5-
brew cask install docker
6+
7+
mkdir -p /usr/local/lib
8+
ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/
9+
ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/
10+
curl -o "/tmp/dotnet.pkg" -fL https://dotnetcli.blob.core.windows.net/dotnet/Sdk/rel-1.0.0/dotnet-dev-osx-x64.latest.pkg
11+
sudo installer -pkg /tmp/dotnet.pkg -target /
12+
ln -s /usr/local/share/dotnet/dotnet /usr/local/bin/
13+
14+
brew install tarantool --HEAD
15+
16+
dotnet --info
17+
dotnet restore
18+
19+
tarantool tarantool/tarantool.lua &

.travis/osx/teardown.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/usr/bin/env bash
2+
3+
echo 'OSX teardown script'

.travis/osx/test.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
#!/usr/bin/env bash
22

3-
echo 'Mac test script'
3+
echo 'Mac test script'
4+
5+
dotnet build -c Release -f netstandard1.4 src/tarantool.client/tarantool.client.csproj
6+
dotnet build -c Release -f netcoreapp1.0 tests/tarantool.client.tests/tarantool.client.tests.csproj
7+
dotnet test -c Release tests/tarantool.client.tests/tarantool.client.tests.csproj

Dockerfile

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
FROM buildpack-deps:jessie-scm
2+
MAINTAINER roman-kozachenko
3+
4+
# Install .NET CLI dependencies
5+
RUN apt-get update \
6+
&& apt-get install -y --no-install-recommends \
7+
libc6 \
8+
libcurl3 \
9+
libgcc1 \
10+
libgssapi-krb5-2 \
11+
libicu52 \
12+
liblttng-ust0 \
13+
libssl1.0.0 \
14+
libstdc++6 \
15+
libunwind8 \
16+
libuuid1 \
17+
zlib1g \
18+
&& rm -rf /var/lib/apt/lists/*
19+
20+
# Install .NET Core
21+
ENV DOTNET_VERSION 1.1.0
22+
ENV DOTNET_DOWNLOAD_URL https://dotnetcli.blob.core.windows.net/dotnet/release/1.1.0/Binaries/$DOTNET_VERSION/dotnet-debian-x64.$DOTNET_VERSION.tar.gz
23+
24+
RUN curl -SL $DOTNET_DOWNLOAD_URL --output dotnet.tar.gz \
25+
&& mkdir -p /usr/share/dotnet \
26+
&& tar -zxf dotnet.tar.gz -C /usr/share/dotnet \
27+
&& rm dotnet.tar.gz \
28+
&& ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet
29+
30+
# Install .NET Core SDK
31+
ENV DOTNET_SDK_VERSION 1.0.0-preview4-004233
32+
ENV DOTNET_SDK_DOWNLOAD_URL https://dotnetcli.blob.core.windows.net/dotnet/Sdk/$DOTNET_SDK_VERSION/dotnet-dev-debian-x64.$DOTNET_SDK_VERSION.tar.gz
33+
34+
RUN curl -SL $DOTNET_SDK_DOWNLOAD_URL --output dotnet.tar.gz \
35+
&& tar -zxf dotnet.tar.gz -C /usr/share/dotnet \
36+
&& rm dotnet.tar.gz
37+
38+
# Trigger the population of the local package cache
39+
ENV NUGET_XMLDOC_MODE skip
40+
ENV DOTNET_SKIP_FIRST_TIME_EXPERIENCE true
41+
RUN mkdir warmup \
42+
&& cd warmup \
43+
&& dotnet new \
44+
# Projects created with .NET Core SDK preview3 target 1.0, replace with 1.1 to populate cache
45+
&& sed -i "s/1.0.1/1.1.0/;s/netcoreapp1.0/netcoreapp1.1/" ./warmup.csproj \
46+
&& dotnet restore \
47+
&& cd .. \
48+
&& rm -rf warmup \
49+
&& rm -rf /tmp/NuGetScratch
50+
51+
WORKDIR /app
52+
53+
# copy csproj and restore as distinct layers
54+
COPY . .
55+
RUN dotnet --version
56+
RUN dotnet restore
57+
RUN dotnet build -c Release -f netstandard1.4 src/tarantool.client/tarantool.client.csproj
58+
RUN dotnet build -c Release -f netcoreapp1.0 tests/tarantool.client.tests/tarantool.client.tests.csproj

docker-compose.tests.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: '2'
2+
3+
services:
4+
tarantool-client:
5+
build: .
6+
command: dotnet test -c Release tests/tarantool.client.tests/tarantool.client.tests.csproj
7+
environment:
8+
TARANTOOL_REPLICATION_SOURCE: "tarantool:3301"
9+
links:
10+
- tarantool

docker-compose.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,8 @@ services:
77
volumes:
88
- $PWD/tarantool:/usr/local/share/tarantool
99
ports:
10-
- "3301:3301"
10+
- "3301:3301"
11+
environment:
12+
TARANTOOL_USER_NAME: admin
13+
TARANTOOL_USER_PASSWORD: adminPassword
14+
TARANTOOL_SLAB_ALLOC_ARENA: 0.1

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"projects": ["src"],
33
"sdk": {
4-
"version": "1.0.0-preview2-003131"
4+
"version": "1.0.0-preview4-004233"
55
}
66
}

src/tarantool.client/Utils/StringEnum.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public static T Parse<T>(Type type, string stringValue, bool ignoreCase)
3030
{
3131

3232
//Look for our string value associated with fields in this enum
33-
foreach (var fi in type.GetFields())
33+
foreach (var fi in type.GetRuntimeFields())
3434
{
3535
//Check for our custom attribute
3636
var attrs = fi.GetCustomAttributes(typeof(StringValueAttribute), false) as StringValueAttribute[];

src/tarantool.client/project.json

Lines changed: 0 additions & 40 deletions
This file was deleted.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
2+
3+
<PropertyGroup>
4+
<Version>0.5.0</Version>
5+
<Description>arantool-client low-level client Library</Description>
6+
<TargetFrameworks>net46;netstandard1.4</TargetFrameworks>
7+
<WarningsAsErrors>true</WarningsAsErrors>
8+
9+
<AssemblyName>tarantool.csharp.tests</AssemblyName>
10+
<RootNamespace>ProGaudi.Tarantool.Client</RootNamespace>
11+
<Product>Tarantool.CSharp</Product>
12+
<Copyright>Copyright © 2016</Copyright>
13+
14+
<PackageTags>tarantool;csharp</PackageTags>
15+
<PackageProjectUrl>https://github.com/progaudi/tarantool-csharp</PackageProjectUrl>
16+
<PackageLicenseUrl>https://raw.githubusercontent.com/progaudi/tarantool-csharp/master/LICENSE</PackageLicenseUrl>
17+
18+
<GenerateAssemblyTitleAttribute>true</GenerateAssemblyTitleAttribute>
19+
<GenerateAssemblyProductAttribute>true</GenerateAssemblyProductAttribute>
20+
<GenerateAssemblyCopyrightAttribute>true</GenerateAssemblyCopyrightAttribute>
21+
</PropertyGroup>
22+
23+
<ItemGroup>
24+
<Compile Include="**\*.cs" />
25+
</ItemGroup>
26+
27+
<ItemGroup>
28+
<PackageReference Include="NETStandard.Library" Version="1.6" />
29+
<PackageReference Include="MsgPack.Light" Version="1.1.0" />
30+
<PackageReference Include="System.Net.NameResolution" Version="4.0.0" />
31+
</ItemGroup>
32+
33+
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.4' ">
34+
<DefineConstants>$(DefineConstants);PROGAUDI_NETCORE</DefineConstants>
35+
</PropertyGroup>
36+
</Project>

tarantool.client.sln

Lines changed: 32 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,46 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 14
4-
VisualStudioVersion = 14.0.25420.1
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.26009.0
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "tarantool.client", "src\tarantool.client\tarantool.client.xproj", "{DD19CE95-BBEE-4AFB-9CEC-8E23BD6F17AF}"
6+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "tarantool.client", "src\tarantool.client\tarantool.client.csproj", "{DD007E9F-FB2D-4351-AAB7-F2D367B295C4}"
77
EndProject
8-
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "tarantool.client.tests", "tests\tarantool.client.tests\tarantool.client.tests.xproj", "{9E3331CE-7B8A-4EFE-A3AC-F0EFAEBC5683}"
8+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "tarantool.client.tests", "tests\tarantool.client.tests\tarantool.client.tests.csproj", "{4C681801-9A6B-4CE9-8EAA-23F80917F046}"
99
EndProject
1010
Global
1111
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1212
Debug|Any CPU = Debug|Any CPU
13+
Debug|x64 = Debug|x64
14+
Debug|x86 = Debug|x86
1315
Release|Any CPU = Release|Any CPU
16+
Release|x64 = Release|x64
17+
Release|x86 = Release|x86
1418
EndGlobalSection
1519
GlobalSection(ProjectConfigurationPlatforms) = postSolution
16-
{DD19CE95-BBEE-4AFB-9CEC-8E23BD6F17AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
17-
{DD19CE95-BBEE-4AFB-9CEC-8E23BD6F17AF}.Debug|Any CPU.Build.0 = Debug|Any CPU
18-
{DD19CE95-BBEE-4AFB-9CEC-8E23BD6F17AF}.Release|Any CPU.ActiveCfg = Release|Any CPU
19-
{DD19CE95-BBEE-4AFB-9CEC-8E23BD6F17AF}.Release|Any CPU.Build.0 = Release|Any CPU
20-
{9E3331CE-7B8A-4EFE-A3AC-F0EFAEBC5683}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21-
{9E3331CE-7B8A-4EFE-A3AC-F0EFAEBC5683}.Debug|Any CPU.Build.0 = Debug|Any CPU
22-
{9E3331CE-7B8A-4EFE-A3AC-F0EFAEBC5683}.Release|Any CPU.ActiveCfg = Release|Any CPU
23-
{9E3331CE-7B8A-4EFE-A3AC-F0EFAEBC5683}.Release|Any CPU.Build.0 = Release|Any CPU
20+
{DD007E9F-FB2D-4351-AAB7-F2D367B295C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21+
{DD007E9F-FB2D-4351-AAB7-F2D367B295C4}.Debug|Any CPU.Build.0 = Debug|Any CPU
22+
{DD007E9F-FB2D-4351-AAB7-F2D367B295C4}.Debug|x64.ActiveCfg = Debug|x64
23+
{DD007E9F-FB2D-4351-AAB7-F2D367B295C4}.Debug|x64.Build.0 = Debug|x64
24+
{DD007E9F-FB2D-4351-AAB7-F2D367B295C4}.Debug|x86.ActiveCfg = Debug|x86
25+
{DD007E9F-FB2D-4351-AAB7-F2D367B295C4}.Debug|x86.Build.0 = Debug|x86
26+
{DD007E9F-FB2D-4351-AAB7-F2D367B295C4}.Release|Any CPU.ActiveCfg = Release|Any CPU
27+
{DD007E9F-FB2D-4351-AAB7-F2D367B295C4}.Release|Any CPU.Build.0 = Release|Any CPU
28+
{DD007E9F-FB2D-4351-AAB7-F2D367B295C4}.Release|x64.ActiveCfg = Release|x64
29+
{DD007E9F-FB2D-4351-AAB7-F2D367B295C4}.Release|x64.Build.0 = Release|x64
30+
{DD007E9F-FB2D-4351-AAB7-F2D367B295C4}.Release|x86.ActiveCfg = Release|x86
31+
{DD007E9F-FB2D-4351-AAB7-F2D367B295C4}.Release|x86.Build.0 = Release|x86
32+
{4C681801-9A6B-4CE9-8EAA-23F80917F046}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
33+
{4C681801-9A6B-4CE9-8EAA-23F80917F046}.Debug|Any CPU.Build.0 = Debug|Any CPU
34+
{4C681801-9A6B-4CE9-8EAA-23F80917F046}.Debug|x64.ActiveCfg = Debug|x64
35+
{4C681801-9A6B-4CE9-8EAA-23F80917F046}.Debug|x64.Build.0 = Debug|x64
36+
{4C681801-9A6B-4CE9-8EAA-23F80917F046}.Debug|x86.ActiveCfg = Debug|x86
37+
{4C681801-9A6B-4CE9-8EAA-23F80917F046}.Debug|x86.Build.0 = Debug|x86
38+
{4C681801-9A6B-4CE9-8EAA-23F80917F046}.Release|Any CPU.ActiveCfg = Release|Any CPU
39+
{4C681801-9A6B-4CE9-8EAA-23F80917F046}.Release|Any CPU.Build.0 = Release|Any CPU
40+
{4C681801-9A6B-4CE9-8EAA-23F80917F046}.Release|x64.ActiveCfg = Release|x64
41+
{4C681801-9A6B-4CE9-8EAA-23F80917F046}.Release|x64.Build.0 = Release|x64
42+
{4C681801-9A6B-4CE9-8EAA-23F80917F046}.Release|x86.ActiveCfg = Release|x86
43+
{4C681801-9A6B-4CE9-8EAA-23F80917F046}.Release|x86.Build.0 = Release|x86
2444
EndGlobalSection
2545
GlobalSection(SolutionProperties) = preSolution
2646
HideSolutionNode = FALSE

0 commit comments

Comments
 (0)