-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(upgrade): Upgraded to .NET8 (#39)
* feat(upgrade): Upgraded to .NET8 Migrated to new Interop patterns. Expanded on Performance Validations. * feat(build): Updated build files and framework versions. * feat(build): Added missing .NET Workload. * feat(version): Bumped new minor Version. +semver: minor
- Loading branch information
Showing
28 changed files
with
1,056 additions
and
856 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,27 +11,37 @@ jobs: | |
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: '0' | ||
|
||
- name: Install GitVersion | ||
uses: gittools/actions/gitversion/[email protected] | ||
with: | ||
versionSpec: '5.x' | ||
|
||
- name: Use GitVersion | ||
id: gitversion # step id used as reference for output values | ||
uses: gittools/actions/gitversion/[email protected] | ||
with: | ||
additionalArguments: '/updateAssemblyInfo' | ||
|
||
- run: | | ||
echo "NuGetVersionV2: ${{ steps.gitversion.outputs.NuGetVersionV2 }}" | ||
- name: Setup .NET Core | ||
uses: actions/setup-dotnet@v1 | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: '6.0.x' | ||
dotnet-version: '8.0.x' | ||
|
||
- name: Install .NET Workloads | ||
run: dotnet workload install wasm-tools | ||
|
||
- name: Build with dotnet | ||
run: dotnet build --configuration Release ./EventHorizon.Blazor.Interop/EventHorizon.Blazor.Interop.csproj | ||
|
||
- name: Pack with dotnet | ||
run: dotnet pack EventHorizon.Blazor.Interop/EventHorizon.Blazor.Interop.csproj --output nuget-packages --configuration Release -p:PackageVersion=${{ steps.gitversion.outputs.NuGetVersionV2 }} | ||
|
||
- name: Push with dotnet | ||
run: dotnet nuget push nuget-packages/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,20 +9,24 @@ jobs: | |
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: '0' | ||
|
||
- name: Install GitVersion | ||
uses: gittools/actions/gitversion/[email protected] | ||
with: | ||
versionSpec: '5.x' | ||
|
||
- name: Use GitVersion | ||
id: gitversion # step id used as reference for output values | ||
uses: gittools/actions/gitversion/[email protected] | ||
|
||
- run: | | ||
echo "NuGetVersionV2: ${{ steps.gitversion.outputs.NuGetVersionV2 }}" | ||
- name: Bump version and push tag | ||
uses: anothrNick/github-tag-action@1.17.2 | ||
uses: anothrNick/github-tag-action@1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# We want to push to nuget the same version we tag | ||
|
13 changes: 7 additions & 6 deletions
13
EventHorizon.Blazor.Interop.Sample/EventHorizon.Blazor.Interop.Sample.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
...or.Interop.Sample/Pages/Testing/InteropTesting/GetPerformance/InteropSetDecimalTest.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
@using System.Diagnostics | ||
@using EventHorizon.Blazor.Interop; | ||
|
||
<div> | ||
<h3>Interop Set Decimal Test</h3> | ||
<div class="--lighter">Interop Set</div> | ||
<ReportTimeTaken Runs="_max" TimeTaken="TimeTaken" /> | ||
<button class="run-btn" @onclick="HandleRunTest">Run</button> | ||
</div> | ||
|
||
@code { | ||
public TimeSpan TimeTaken { get; set; } | ||
|
||
const int _max = 1_000; | ||
private void HandleRunTest() | ||
{ | ||
var s1 = Stopwatch.StartNew(); | ||
for (int i = 0; i < _max; i++) | ||
{ | ||
|
||
RunTest(); | ||
} | ||
s1.Stop(); | ||
TimeTaken = s1.Elapsed; | ||
Console.WriteLine(((double)(s1.ElapsedMilliseconds * 1000000) / _max).ToString("0.00 ns")); | ||
} | ||
|
||
public void RunTest() | ||
{ | ||
EventHorizonBlazorInterop.Set( | ||
"setPrimitive", | ||
"setNumber", | ||
999.99m | ||
); | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
...azor.Interop.Sample/Pages/Testing/InteropTesting/GetPerformance/InteropSetFloatTest.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
@using System.Diagnostics | ||
@using EventHorizon.Blazor.Interop; | ||
|
||
<div> | ||
<h3>Interop Set Float Test</h3> | ||
<div class="--lighter">Interop Set</div> | ||
<ReportTimeTaken Runs="_max" TimeTaken="TimeTaken" /> | ||
<button class="run-btn" @onclick="HandleRunTest">Run</button> | ||
</div> | ||
|
||
@code { | ||
public TimeSpan TimeTaken { get; set; } | ||
|
||
const int _max = 1_000; | ||
private void HandleRunTest() | ||
{ | ||
var s1 = Stopwatch.StartNew(); | ||
for (int i = 0; i < _max; i++) | ||
{ | ||
RunTest(); | ||
} | ||
s1.Stop(); | ||
TimeTaken = s1.Elapsed; | ||
Console.WriteLine(((double)(s1.ElapsedMilliseconds * 1000000) / _max).ToString("0.00 ns")); | ||
} | ||
|
||
public void RunTest() | ||
{ | ||
EventHorizonBlazorInterop.Set( | ||
"setPrimitive", | ||
"setNumber", | ||
99.99f | ||
); | ||
} | ||
} |
Oops, something went wrong.