Skip to content

Commit 101669b

Browse files
committed
Import StructuredFieldValues and HttpSignatures libraries, restructure as monorepo
- Add Http.StructuredFieldValues: RFC 8941/9651 parser, serializer, and POCO mapper - Add Http.HttpSignatures: RFC 9421 HTTP Message Signatures (ECDSA, HMAC, RSA, Ed25519 stub) - Add unified http-lib.slnx solution and Directory.Build.props - Add unified CI and per-package release workflows - Restructure docs: lean root README linking to 4 per-project READMEs - Update all 4 csproj files with PackageReadmeFile for NuGet packaging - Remove stale files from pre-merge era (old solution, NCrunch config, DotSettings)
1 parent 2873458 commit 101669b

244 files changed

Lines changed: 60672 additions & 645 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,61 +11,67 @@ on:
1111
jobs:
1212
build-and-test:
1313
runs-on: ubuntu-latest
14-
14+
1515
steps:
1616
- uses: actions/checkout@v4
17-
17+
with:
18+
fetch-depth: 0
19+
1820
- name: Setup .NET
1921
uses: actions/setup-dotnet@v4
2022
with:
2123
dotnet-version: '10.0.x'
22-
24+
2325
- name: Restore dependencies
24-
run: dotnet restore
25-
26+
run: dotnet restore http-lib.slnx
27+
2628
- name: Build
27-
run: dotnet build --no-restore --configuration Release
28-
29+
run: dotnet build http-lib.slnx --no-restore --configuration Release
30+
2931
- name: Run tests
3032
run: |
31-
dotnet run --project test/HttpHybridCacheHandler.Tests/HttpHybridCacheHandler.Tests.csproj --no-build --configuration Release
32-
dotnet run --project test/FileDistributedCache.Tests/FileDistributedCache.Tests.csproj --no-build --configuration Release
33-
33+
dotnet run --project structured-field-values/test/Http.StructuredFieldValues.Tests.csproj --no-build --configuration Release
34+
dotnet run --project signatures/test/Http.HttpSignatures.Tests.csproj --no-build --configuration Release
35+
dotnet run --project hybrid-cache-handler/test/HttpHybridCacheHandler.Tests.csproj --no-build --configuration Release
36+
dotnet run --project file-distributed-cache/test/FileDistributedCache.Tests.csproj --no-build --configuration Release
37+
3438
- name: Run benchmarks
3539
run: |
36-
cd benchmarks
40+
cd hybrid-cache-handler/benchmarks
3741
dotnet run --project Benchmarks.csproj --configuration Release --no-build -- --exporters json
3842
continue-on-error: true
39-
43+
4044
- name: Add benchmark results to summary
4145
if: always()
4246
run: |
4347
echo "## Benchmark Results" >> $GITHUB_STEP_SUMMARY
44-
if [ -f "benchmarks/BenchmarkDotNet.Artifacts/results/Benchmarks-report.json" ]; then
48+
if [ -f "hybrid-cache-handler/benchmarks/BenchmarkDotNet.Artifacts/results/Benchmarks-report.json" ]; then
4549
echo "Benchmark completed successfully. Full results available in artifacts." >> $GITHUB_STEP_SUMMARY
4650
else
4751
echo "Benchmark execution completed with warnings or errors." >> $GITHUB_STEP_SUMMARY
4852
fi
49-
53+
5054
- name: Upload benchmark results
5155
if: always()
5256
uses: actions/upload-artifact@v4
5357
with:
5458
name: benchmark-results
55-
path: benchmarks/BenchmarkDotNet.Artifacts/
59+
path: hybrid-cache-handler/benchmarks/BenchmarkDotNet.Artifacts/
5660
if-no-files-found: ignore
57-
61+
5862
- name: Build NuGet packages
5963
run: |
60-
dotnet pack src/HttpHybridCacheHandler/HttpHybridCacheHandler.csproj --no-build --configuration Release --output ./packages
61-
dotnet pack src/FileDistributedCache/FileDistributedCache.csproj --no-build --configuration Release --output ./packages
62-
64+
dotnet pack structured-field-values/src/Http.StructuredFieldValues.csproj --no-build --configuration Release --output ./packages
65+
dotnet pack signatures/src/Http.HttpSignatures.csproj --no-build --configuration Release --output ./packages
66+
dotnet pack hybrid-cache-handler/src/HttpHybridCacheHandler.csproj --no-build --configuration Release --output ./packages
67+
dotnet pack file-distributed-cache/src/FileDistributedCache.csproj --no-build --configuration Release --output ./packages
68+
6369
- name: Upload NuGet packages
6470
uses: actions/upload-artifact@v4
6571
with:
6672
name: nuget-packages
6773
path: ./packages/*.nupkg
68-
74+
6975
- name: Add build summary
7076
if: always()
7177
run: |

.github/workflows/release.yml

Lines changed: 52 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@ name: release
33
on:
44
workflow_dispatch:
55
inputs:
6+
package:
7+
description: 'Package to release'
8+
required: true
9+
type: choice
10+
options:
11+
- DamianH.Http.StructuredFieldValues
12+
- DamianH.Http.HttpSignatures
13+
- DamianH.HttpHybridCacheHandler
14+
- DamianH.FileDistributedCache
615
version:
716
description: 'Version number (x.y.z or x.y.z-prerelease.1)'
817
required: true
@@ -20,73 +29,94 @@ jobs:
2029
permissions:
2130
contents: write
2231
packages: write
23-
32+
2433
steps:
2534
- uses: actions/checkout@v4
2635
with:
2736
fetch-depth: 0
28-
37+
2938
- name: Setup .NET
3039
uses: actions/setup-dotnet@v4
3140
with:
3241
dotnet-version: '10.0.x'
33-
42+
43+
- name: Determine tag prefix and project path
44+
id: package-info
45+
run: |
46+
case "${{ inputs.package }}" in
47+
"DamianH.Http.StructuredFieldValues")
48+
echo "tag_prefix=sfv-v" >> $GITHUB_OUTPUT
49+
echo "project_path=structured-field-values/src/Http.StructuredFieldValues.csproj" >> $GITHUB_OUTPUT
50+
;;
51+
"DamianH.Http.HttpSignatures")
52+
echo "tag_prefix=sig-v" >> $GITHUB_OUTPUT
53+
echo "project_path=signatures/src/Http.HttpSignatures.csproj" >> $GITHUB_OUTPUT
54+
;;
55+
"DamianH.HttpHybridCacheHandler")
56+
echo "tag_prefix=cache-v" >> $GITHUB_OUTPUT
57+
echo "project_path=hybrid-cache-handler/src/HttpHybridCacheHandler.csproj" >> $GITHUB_OUTPUT
58+
;;
59+
"DamianH.FileDistributedCache")
60+
echo "tag_prefix=fdc-v" >> $GITHUB_OUTPUT
61+
echo "project_path=file-distributed-cache/src/FileDistributedCache.csproj" >> $GITHUB_OUTPUT
62+
;;
63+
esac
64+
3465
- name: Validate version format
3566
run: |
3667
if ! echo "${{ inputs.version }}" | grep -E '^[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9]+\.[0-9]+)?$'; then
3768
echo "Invalid version format. Expected: x.y.z or x.y.z-prerelease.1"
3869
exit 1
3970
fi
40-
71+
4172
- name: Remove existing tag if present
4273
run: |
43-
TAG="v${{ inputs.version }}"
74+
TAG="${{ steps.package-info.outputs.tag_prefix }}${{ inputs.version }}"
4475
if git rev-parse "$TAG" >/dev/null 2>&1; then
4576
echo "Tag $TAG exists, removing it"
4677
git tag -d "$TAG"
4778
git push origin ":refs/tags/$TAG" || true
4879
fi
49-
80+
5081
- name: Create and push tag
5182
run: |
52-
TAG="v${{ inputs.version }}"
83+
TAG="${{ steps.package-info.outputs.tag_prefix }}${{ inputs.version }}"
5384
git config user.name "github-actions[bot]"
5485
git config user.email "github-actions[bot]@users.noreply.github.com"
55-
git tag -a "$TAG" -m "Release ${{ inputs.version }}"
86+
git tag -a "$TAG" -m "Release ${{ inputs.package }} ${{ inputs.version }}"
5687
git push origin "$TAG"
57-
88+
5889
- name: Restore dependencies
59-
run: dotnet restore
60-
90+
run: dotnet restore http-lib.slnx
91+
6192
- name: Build
62-
run: dotnet build --configuration Release --no-restore
93+
run: dotnet build http-lib.slnx --configuration Release --no-restore
6394

64-
- name: Pack NuGet packages
95+
- name: Pack NuGet package
6596
run: |
66-
dotnet pack src/HttpHybridCacheHandler/HttpHybridCacheHandler.csproj --configuration Release --no-build --output ./packages
67-
dotnet pack src/FileDistributedCache/FileDistributedCache.csproj --configuration Release --no-build --output ./packages
68-
97+
dotnet pack ${{ steps.package-info.outputs.project_path }} --configuration Release --no-build --output ./packages
98+
6999
- name: Push to GitHub Packages
70100
run: |
71101
dotnet nuget add source --username ${{ github.repository_owner }} --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" || true
72102
dotnet nuget push "./packages/*.nupkg" --source "github" --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate
73-
103+
74104
- name: Push to NuGet.org
75105
if: ${{ inputs.push_to_nuget }}
76106
run: |
77107
dotnet nuget push "./packages/*.nupkg" --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_ORG_APIKEY }} --skip-duplicate
78-
108+
79109
- name: Upload packages as artifacts
80110
uses: actions/upload-artifact@v4
81111
with:
82-
name: nuget-packages-${{ inputs.version }}
112+
name: nuget-packages-${{ inputs.package }}-${{ inputs.version }}
83113
path: ./packages/*.nupkg
84-
114+
85115
- name: Create GitHub Release
86116
uses: softprops/action-gh-release@v2
87117
with:
88-
tag_name: v${{ inputs.version }}
89-
name: Release ${{ inputs.version }}
118+
tag_name: ${{ steps.package-info.outputs.tag_prefix }}${{ inputs.version }}
119+
name: ${{ inputs.package }} ${{ inputs.version }}
90120
draft: false
91121
prerelease: ${{ contains(inputs.version, '-') }}
92122
generate_release_notes: true

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,3 +418,10 @@ FodyWeavers.xsd
418418
*.msp
419419
nul
420420
*.ncrunchsolution
421+
*.ncrunchproject
422+
423+
# ReSharper/Rider solution settings
424+
*.DotSettings
425+
426+
# Weave plan directory
427+
.weave/
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
<?xml version="1.0" encoding="utf-8"?>
21
<Project>
32
<PropertyGroup>
4-
<AnalysisLevel>latest</AnalysisLevel>
5-
<EnableNETAnalyzers>true</EnableNETAnalyzers>
6-
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
3+
<TargetFramework>net10.0</TargetFramework>
4+
<LangVersion>preview</LangVersion>
75
<ImplicitUsings>enable</ImplicitUsings>
86
<Nullable>enable</Nullable>
9-
<TargetFramework>net10.0</TargetFramework>
7+
<AnalysisLevel>latest</AnalysisLevel>
8+
<EnableNETAnalyzers>true</EnableNETAnalyzers>
9+
<EnforceCodeStyleInBuild>false</EnforceCodeStyleInBuild>
1010
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
1111
</PropertyGroup>
1212
</Project>

HttpHybridCacheHandler.slnx

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

HybridCacheHttpHandler.sln.DotSettings

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

0 commit comments

Comments
 (0)