Skip to content

Commit d2ec20e

Browse files
committed
feat: update MsgPack.Light & CI
Signed-off-by: Anatoly Popov <[email protected]>
1 parent c783473 commit d2ec20e

File tree

13 files changed

+158
-91
lines changed

13 files changed

+158
-91
lines changed

.azure/build.yml

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

.azure/test.yml

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

.azure/tests.yml

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

.github/workflows/ci.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Build, Test & Publish nuget
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
tags: ['*']
7+
pull_request:
8+
types: [ opened, synchronize ]
9+
branches: [ "master" ]
10+
11+
env:
12+
NuGetDirectory: ${{ github.workspace }}/nuget
13+
14+
jobs:
15+
build_test_and_pack:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v3
19+
with:
20+
fetch-depth: 0 # Fetches entire history, so we can analyze commits since last tag
21+
- name: Setup .net core
22+
uses: actions/setup-dotnet@v3
23+
with:
24+
dotnet-version: |
25+
3.1.x
26+
6.0.x
27+
28+
- name: Restore dependencies
29+
run: dotnet restore
30+
- name: Build
31+
run: dotnet build -c Release --no-restore
32+
33+
- name: Docker build
34+
run: docker-compose build
35+
36+
- name: Docker pull
37+
run: docker-compose pull
38+
39+
- name: Docker-compose run
40+
run: docker-compose up -d
41+
42+
- name: Tests
43+
run: dotnet test -c Release --no-build --verbosity normal
44+
45+
- name: Pack nuget
46+
if: success()
47+
run: |
48+
set +x
49+
NUGET_VERSION=$(git describe --tags --abbrev=1 | sed 's/-/./')
50+
dotnet pack -c Release --no-build -v minimal -o ${{ env.NuGetDirectory }} -p:PackageVersion=$NUGET_VERSION
51+
- name: Publish NuGet package
52+
if: success() && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository)
53+
run: dotnet nuget push "${{ env.NuGetDirectory }}/*.nupkg" --api-key "${{ secrets.NUGET_PUSH }}" --source https://api.nuget.org/v3/index.json --skip-duplicate
54+
- name: Upload files to a GitHub release
55+
if: success() && github.ref_type == 'tag' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository)
56+
uses: xresloader/[email protected]
57+
with:
58+
file: ${{ env.NuGetDirectory }}/*.nupkg
59+
tags: true
60+
overwrite: true
61+
tag_name: ${{ github.ref_name }}

.vscode/tasks.json

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,37 @@
11
{
22
// See https://go.microsoft.com/fwlink/?LinkId=733558
33
// for the documentation about the tasks.json format
4-
"version": "0.1.0",
4+
"version": "2.0.0",
55
"command": "dotnet",
6-
"isShellCommand": true,
76
"args": [],
87
"tasks": [
98
{
10-
"taskName": "build",
11-
"args": [ "progaudi.tarantool.sln"],
12-
"isBuildCommand": true,
13-
"showOutput": "silent",
14-
"problemMatcher": "$msCompile"
9+
"label": "build",
10+
"type": "shell",
11+
"command": "dotnet",
12+
"args": [
13+
"build",
14+
"progaudi.tarantool.sln"
15+
],
16+
"problemMatcher": "$msCompile",
17+
"group": {
18+
"_id": "build",
19+
"isDefault": false
20+
}
1521
},
1622
{
17-
"taskName": "test",
18-
"args": [ "tests/progaudi.tarantool.tests/progaudi.tarantool.tests.csproj"],
19-
"isTestCommand": true,
20-
"showOutput": "silent",
21-
"problemMatcher": "$msCompile"
23+
"label": "test",
24+
"type": "shell",
25+
"command": "dotnet",
26+
"args": [
27+
"test",
28+
"tests/progaudi.tarantool.tests/progaudi.tarantool.tests.csproj"
29+
],
30+
"problemMatcher": "$msCompile",
31+
"group": {
32+
"_id": "test",
33+
"isDefault": false
34+
}
2235
}
2336
]
2437
}

Directory.Build.props

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<Project>
2+
<PropertyGroup>
3+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
4+
<MSBuildTreatWarningsAsErrors>true</MSBuildTreatWarningsAsErrors>
5+
<IsPublishable>false</IsPublishable>
6+
<NoWarn>NETSDK1138</NoWarn>
7+
</PropertyGroup>
8+
</Project>

Directory.Packages.props

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<Project>
2+
<PropertyGroup>
3+
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
4+
</PropertyGroup>
5+
<ItemGroup>
6+
<PackageVersion Include="MsgPack.Light" Version="2.0.1" />
7+
<PackageVersion Include="System.Net.NameResolution" Version="4.3.0" />
8+
<PackageVersion Include="System.Threading.Thread" Version="4.3.0" />
9+
10+
<!-- benchmark -->
11+
<PackageVersion Include="BenchmarkDotNet" Version="0.10.12" />
12+
<PackageVersion Include="StackExchange.Redis" Version="1.2.6" />
13+
14+
<!-- tests -->
15+
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="15.8.0" />
16+
<PackageVersion Include="xunit" Version="2.4.0" />
17+
<PackageVersion Include="xunit.runner.visualstudio" Version="2.4.0" />
18+
<PackageVersion Include="JetBrains.Annotations" Version="2018.2.1" />
19+
<PackageVersion Include="Shouldly" Version="3.0.1" />
20+
</ItemGroup>
21+
</Project>

docker-compose.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ version: '3.2'
22

33
services:
44
tarantool_1_7:
5-
image: progaudi/tarantool:1.7.5-184-g5be3a82be # same version as tarantool in homebrew on mac os
5+
build:
6+
context: tarantool
7+
dockerfile: docker/Dockerfile.1.7
68
command: tarantool /usr/local/share/tarantool/tarantool.docker.lua
7-
volumes:
8-
- $PWD/tarantool:/usr/local/share/tarantool
99
ports:
1010
- "3301:3301"
1111
environment:
@@ -14,10 +14,10 @@ services:
1414
TARANTOOL_SLAB_ALLOC_ARENA: 0.1
1515

1616
tarantool_1_8:
17-
image: progaudi/tarantool:1.8.2-288-g99128d7d3
17+
build:
18+
context: tarantool
19+
dockerfile: docker/Dockerfile.1.8
1820
command: tarantool /usr/local/share/tarantool/tarantool.docker.lua
19-
volumes:
20-
- $PWD/tarantool:/usr/local/share/tarantool
2121
ports:
2222
- "3302:3301"
2323
environment:

src/progaudi.tarantool.benchmark/progaudi.tarantool.benchmark.csproj

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

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFrameworks>netcoreapp1.1;netcoreapp2.0</TargetFrameworks>
5+
<TargetFrameworks>netcoreapp3.1;net6.0</TargetFrameworks>
66
<WarningsAsErrors>true</WarningsAsErrors>
77

88
<AssemblyName>progaudi.tarantool.benchmark</AssemblyName>
@@ -12,8 +12,8 @@
1212
</PropertyGroup>
1313

1414
<ItemGroup>
15-
<PackageReference Include="BenchmarkDotNet" Version="0.10.12" />
16-
<PackageReference Include="StackExchange.Redis" Version="1.2.6" />
15+
<PackageReference Include="BenchmarkDotNet" />
16+
<PackageReference Include="StackExchange.Redis" />
1717
</ItemGroup>
1818

1919
<ItemGroup>

src/progaudi.tarantool/progaudi.tarantool.csproj

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
22
<PropertyGroup Condition=" '$(OS)' == 'Windows_NT' ">
3-
<TargetFrameworks>net46;netstandard1.4;netstandard2.0</TargetFrameworks>
3+
<TargetFrameworks>net462;netstandard2.0;net60</TargetFrameworks>
44
</PropertyGroup>
55
<PropertyGroup Condition=" '$(OS)' != 'Windows_NT' ">
6-
<TargetFrameworks>netstandard1.4;netstandard2.0</TargetFrameworks>
6+
<TargetFrameworks>netstandard2.0;net60</TargetFrameworks>
77
</PropertyGroup>
88
<PropertyGroup>
99
<PatchLevelVersion Condition=" '$(BuildNumber)' == '' ">0</PatchLevelVersion>
@@ -16,21 +16,23 @@
1616
<AssemblyName>progaudi.tarantool</AssemblyName>
1717
<RootNamespace>ProGaudi.Tarantool.Client</RootNamespace>
1818
<Product>progaudi.tarantool</Product>
19-
<Copyright>Copyright © 2016-2018</Copyright>
19+
<Copyright>Copyright © 2016-2023</Copyright>
2020

2121
<PackageTags>tarantool;csharp</PackageTags>
2222
<PackageProjectUrl>https://github.com/progaudi/progaudi.tarantool</PackageProjectUrl>
23-
<PackageLicenseUrl>https://raw.githubusercontent.com/progaudi/progaudi.tarantool/master/LICENSE</PackageLicenseUrl>
23+
24+
<PackageReadmeFile>README.md</PackageReadmeFile>
25+
<PackageLicenseFile>LICENSE</PackageLicenseFile>
2426

2527
<GenerateAssemblyTitleAttribute>true</GenerateAssemblyTitleAttribute>
2628
<GenerateAssemblyProductAttribute>true</GenerateAssemblyProductAttribute>
2729
<GenerateAssemblyCopyrightAttribute>true</GenerateAssemblyCopyrightAttribute>
2830
</PropertyGroup>
2931

3032
<ItemGroup>
31-
<PackageReference Include="MsgPack.Light" Version="1.6.2" />
32-
<PackageReference Include="System.Net.NameResolution" Version="4.3.0" />
33-
<PackageReference Include="System.Threading.Thread" Version="4.3.0" />
33+
<PackageReference Include="MsgPack.Light" />
34+
<PackageReference Include="System.Net.NameResolution" />
35+
<PackageReference Include="System.Threading.Thread" />
3436
</ItemGroup>
3537

3638
<ItemGroup>
@@ -83,4 +85,9 @@
8385
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.4' ">
8486
<DefineConstants>$(DefineConstants);PROGAUDI_NETCORE</DefineConstants>
8587
</PropertyGroup>
88+
89+
<ItemGroup>
90+
<None Include="..\..\LICENSE" Pack="true" PackagePath="\"/>
91+
<None Include="..\..\README.md" Pack="true" PackagePath="\"/>
92+
</ItemGroup>
8693
</Project>

tarantool/docker/Dockerfile.1.7

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FROM progaudi/tarantool:1.7.5-184-g5be3a82be
2+
3+
RUN set -x \
4+
&& mkdir -p /usr/local/share/tarantool
5+
6+
COPY --chown=tarantool:tarantool *.lua /usr/local/share/tarantool/

tarantool/docker/Dockerfile.1.8

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FROM progaudi/tarantool:1.8.2-288-g99128d7d3
2+
3+
RUN set -x \
4+
&& mkdir -p /usr/local/share/tarantool
5+
6+
COPY --chown=tarantool:tarantool *.lua /usr/local/share/tarantool/

tests/progaudi.tarantool.tests/progaudi.tarantool.tests.csproj

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
<PropertyGroup>
33
<Description>progaudi.tarantool Class Library tests</Description>
44
<OutputType>Exe</OutputType>
5-
<TargetFrameworks>netcoreapp1.0;netcoreapp1.1;netcoreapp2.0</TargetFrameworks>
5+
<TargetFrameworks>netcoreapp3.1;net6.0</TargetFrameworks>
66
<WarningsAsErrors>true</WarningsAsErrors>
77

88
<AssemblyName>progaudi.tarantool.tests</AssemblyName>
99
<RootNamespace>ProGaudi.Tarantool.Client.Tests</RootNamespace>
1010
<Product>progaudi.tarantool</Product>
11-
<Copyright>Copyright © 2016-2017</Copyright>
11+
<Copyright>Copyright © 2016-2023</Copyright>
1212

1313
<PackageTags>tarantool;csharp;tests</PackageTags>
1414
<PackageProjectUrl>https://github.com/progaudi/progaudi.tarantool</PackageProjectUrl>
@@ -22,12 +22,12 @@
2222
</PropertyGroup>
2323

2424
<ItemGroup>
25-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.8.0" />
26-
<PackageReference Include="StackExchange.Redis" Version="1.2.6" />
27-
<PackageReference Include="xunit" Version="2.4.0" />
28-
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" />
29-
<PackageReference Include="JetBrains.Annotations" Version="2018.2.1" />
30-
<PackageReference Include="Shouldly" Version="3.0.1" />
25+
<PackageReference Include="Microsoft.NET.Test.Sdk" />
26+
<PackageReference Include="StackExchange.Redis" />
27+
<PackageReference Include="xunit" />
28+
<PackageReference Include="xunit.runner.visualstudio" />
29+
<PackageReference Include="JetBrains.Annotations" />
30+
<PackageReference Include="Shouldly" />
3131
<ProjectReference Include="..\..\src\progaudi.tarantool\progaudi.tarantool.csproj" />
3232
</ItemGroup>
3333

0 commit comments

Comments
 (0)