Skip to content

Commit

Permalink
Add optional state parameters to AsyncHelper (PHNX-12680) (#4)
Browse files Browse the repository at this point in the history
Motivation
----------
In some scenarios this can reduce heap allocations of closures.

Modifications
-------------
Add the optional state parameter and matching unit tests.

Drop .NET 5 target since it is EOL and target .NET 6.

https://centeredge.atlassian.net/browse/PHNX-12680
  • Loading branch information
brantburnett committed Jun 13, 2023
1 parent 6f692d4 commit fb29bb3
Show file tree
Hide file tree
Showing 7 changed files with 851 additions and 73 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,29 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x

- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0.9.10
uses: gittools/actions/gitversion/setup@v0.9.15
with:
versionSpec: "5.8.0"

- name: Determine Version
id: gitversion
uses: gittools/actions/gitversion/execute@v0.9.10
uses: gittools/actions/gitversion/execute@v0.9.15
with:
useConfigFile: true
configFilePath: "GitVersion.yml"

- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x

# Cache packages for faster subsequent runs
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
Expand All @@ -44,7 +44,7 @@ jobs:
- name: Restore
working-directory: ./src
run: >-
dotnet nuget add source --username USERNAME --password ${{ secrets.GH_PACKAGES_TOKEN }} --store-password-in-clear-text --name github https://nuget.pkg.github.com/CenterEdge/index.json
dotnet nuget add source --name github https://nuget.pkg.github.com/CenterEdge/index.json
&& dotnet restore ./CenterEdge.Async.sln
- name: Build
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/cleanup-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ jobs:
packages: write

steps:
- uses: actions/delete-package-versions@v2
- uses: actions/delete-package-versions@v4
with:
package-name: CenterEdge.Async
package-type: nuget
min-versions-to-keep: 30
ignore-versions: ^(?!.*ci-pr).*$
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.13.0" />
<PackageReference Include="BenchmarkDotNet.Diagnostics.Windows" Version="0.13.0" />
<PackageReference Include="BenchmarkDotNet" Version="0.13.5" />
<PackageReference Include="BenchmarkDotNet.Diagnostics.Windows" Version="0.13.5" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\CenterEdge.Async\CenterEdge.Async.csproj" />
Expand Down
Loading

0 comments on commit fb29bb3

Please sign in to comment.