Skip to content

Commit

Permalink
Merge branch 'release/5.0.0' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
charliefoxtwo committed Jul 9, 2024
2 parents 1ae0126 + 091e722 commit 0815944
Show file tree
Hide file tree
Showing 32 changed files with 818 additions and 745 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: .NET 6 CI build
name: .NET 8 CI build

on:
push:
Expand All @@ -12,11 +12,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.400
dotnet-version: 8.0.206
- name: Install dependencies
run: dotnet restore
- name: Build
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/nuget-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ jobs:
name: build, pack & publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Setup .NET Core
uses: actions/setup-dotnet@v1
- name: Setup .NET
uses: actions/setup-dotnet@v14
with:
dotnet-version: 6.0.400
dotnet-version: 8.0.206

# Publish
- name: publish on version change
Expand All @@ -22,11 +22,11 @@ jobs:
with:
# Filepath of the project to be packaged, relative to root of repository
PROJECT_FILE_PATH: DcsBiosCommunicator/DcsBiosCommunicator.csproj

# NuGet package id, used for version detection & defaults to project name
PACKAGE_NAME: DcsBios.Communicator

# Regex pattern to extract version info in a capturing group
VERSION_REGEX: ^\s*<PackageVersion>(.*)<\/PackageVersion>\s*$

NUGET_KEY: ${{secrets.NUGET_API_KEY}}
18 changes: 18 additions & 0 deletions Benchmark/Benchmark.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.13.12" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\DcsBiosCommunicator\DcsBiosCommunicator.csproj" />
</ItemGroup>

</Project>
32 changes: 32 additions & 0 deletions Benchmark/DataParserBenchmarkTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Jobs;
using DcsBios.Communicator.DataParsers;

namespace Benchmark;

[SimpleJob(RuntimeMoniker.Net80, baseline: true)]
public class DataParserBenchmarkTests
{
private readonly StringParser _stringParser = new(0, 2, "ID");
private readonly IntegerParser _intParser = new(8, 3, "ID");

private const int TestStringData = 'a' | ('b' << 8);
private const int ClearStringData = ' ' | (' ' << 8);

[Benchmark]
public void TestString()
{
_stringParser.AddData(0, TestStringData);
_stringParser.AddData(0, ClearStringData);
}

private const int TestIntData = 16;
private const int ClearIntData = 0;

[Benchmark]
public void TestInt()
{
_intParser.AddData(0, TestIntData);
_intParser.AddData(0, ClearIntData);
}
}
4 changes: 4 additions & 0 deletions Benchmark/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
using Benchmark;
using BenchmarkDotNet.Running;

BenchmarkRunner.Run<DataParserBenchmarkTests>();
6 changes: 6 additions & 0 deletions DcsBiosCommunicator.sln
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DcsBiosCommunicator", "DcsB
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DcsBiosCommunicatorTest", "DcsBiosCommunicatorTest\DcsBiosCommunicatorTest.csproj", "{C5174822-0248-45C4-BA9C-C0881D8A3E0E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Benchmark", "Benchmark\Benchmark.csproj", "{2353AC32-1318-4EAB-B713-E78A182E919E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -18,5 +20,9 @@ Global
{C5174822-0248-45C4-BA9C-C0881D8A3E0E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C5174822-0248-45C4-BA9C-C0881D8A3E0E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C5174822-0248-45C4-BA9C-C0881D8A3E0E}.Release|Any CPU.Build.0 = Release|Any CPU
{2353AC32-1318-4EAB-B713-E78A182E919E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2353AC32-1318-4EAB-B713-E78A182E919E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2353AC32-1318-4EAB-B713-E78A182E919E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2353AC32-1318-4EAB-B713-E78A182E919E}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
Loading

0 comments on commit 0815944

Please sign in to comment.