Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .docfx/includes/availability-modern.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Availability: .NET 10 and .NET 9.0
Availability: .NET 11 and .NET 10
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This repository is part of the Codebelt .NET library estate. The instructions be
## Before you start

- Read the repository `README.md` and open an issue before starting a non-trivial feature or behavioral change.
- Use an installed .NET SDK that can build the target frameworks listed below. This repository currently targets: **net10.0, net9.0**.
- Use an installed .NET SDK that can build the target frameworks listed below. This repository currently targets: **net11.0, net10.0**.
- The solution is `Codebelt.Extensions.BenchmarkDotNet.slnx`. Central package versions are maintained in `Directory.Packages.props`.
- The shared build behavior is in `Directory.Build.props` and `Directory.Build.targets`; repository-specific TFMs, package references and metadata remain local to this library.

Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/ci-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ jobs:
configuration: [Debug, Release]
uses: codebeltnet/jobs-dotnet-build/.github/workflows/default.yml@v3
with:
include-preview: true
configuration: ${{ matrix.configuration }}
strong-name-key-filename: ${{ needs.init.outputs.strong-name-key-filename }}
build-switches: ${{ needs.init.outputs.build-switches }}
Expand All @@ -74,6 +75,7 @@ jobs:
configuration: [Debug, Release]
uses: codebeltnet/jobs-dotnet-pack/.github/workflows/default.yml@v3
with:
include-preview: true
configuration: ${{ matrix.configuration }}
version: ${{ needs.build.outputs.version }}
download-build-artifact-pattern: build-${{ matrix.configuration }}-X64
Expand All @@ -88,6 +90,7 @@ jobs:
arch: [X64, ARM64]
uses: codebeltnet/jobs-dotnet-test/.github/workflows/default.yml@v3
with:
include-preview: true
runs-on: ${{ matrix.arch == 'ARM64' && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }}
configuration: ${{ matrix.configuration }}
build-switches: -p:SkipSignAssembly=true
Expand All @@ -105,6 +108,7 @@ jobs:
arch: [X64, ARM64]
uses: codebeltnet/jobs-dotnet-test/.github/workflows/default.yml@v3
with:
include-preview: true
runs-on: ${{ matrix.arch == 'ARM64' && 'windows-11-arm' || 'windows-2025' }}
configuration: ${{ matrix.configuration }}
build-switches: -p:SkipSignAssembly=true
Expand All @@ -123,6 +127,7 @@ jobs:
configuration: [Debug, Release]
uses: codebeltnet/jobs-dotnet-test/.github/workflows/default.yml@v3
with:
include-preview: true
runs-on: ${{ matrix.arch == 'ARM64' && 'macos-26' || 'macos-26-intel' }}
configuration: ${{ matrix.configuration }}
build-switches: -p:SkipSignAssembly=true
Expand Down Expand Up @@ -180,6 +185,7 @@ jobs:
needs: [init, build, test_qualitygate]
uses: codebeltnet/jobs-sonarcloud/.github/workflows/default.yml@v3
with:
include-preview: true
organization: geekle
projectKey: benchmarkdotnet
version: ${{ needs.build.outputs.version }}
Expand All @@ -199,6 +205,8 @@ jobs:
name: call-codeql
needs: [init, build, test_qualitygate]
uses: codebeltnet/jobs-codeql/.github/workflows/default.yml@v3
with:
include-preview: true
permissions:
security-events: write

Expand Down
95 changes: 82 additions & 13 deletions .github/workflows/service-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true

- name: Resolve trigger inputs
id: trigger
Expand All @@ -42,13 +43,68 @@ jobs:

- name: Determine new version for this repo
id: newver
shell: bash
run: |
CURRENT=$(grep -oP '(?<=## \[)[\d.]+(?=\])' CHANGELOG.md | head -1)
NEW=$(echo "$CURRENT" | awk -F. '{printf "%s.%s.%d", $1, $2, $3+1}')
BRANCH="v${NEW}/service-update"
echo "current=$CURRENT" >> $GITHUB_OUTPUT
echo "new=$NEW" >> $GITHUB_OUTPUT
echo "branch=$BRANCH" >> $GITHUB_OUTPUT
python3 - <<'PY'
import os
import re
import subprocess
import sys

tag_pattern = re.compile(r"^v(\d+)\.(\d+)\.(\d+)$")
tags = subprocess.check_output(["git", "tag", "--list"], text=True).splitlines()
stable_tags = []
for tag in tags:
match = tag_pattern.fullmatch(tag)
if match:
version = tuple(int(part) for part in match.groups())
stable_tags.append((version, tag))

if not stable_tags:
print("::error::No stable vMAJOR.MINOR.PATCH Git tag was found.")
sys.exit(1)

_, latest_tag = max(stable_tags, key=lambda item: item[0])
latest_version = latest_tag[1:]
major, minor, patch = (int(part) for part in latest_version.split("."))
next_version = f"{major}.{minor}.{patch + 1}"

with open("CHANGELOG.md", encoding="utf-8") as changelog_file:
changelog = changelog_file.read()

heading = re.search(r"(?m)^## \[(\d+\.\d+\.\d+)\] - ([^\r\n]+)[ \t]*$", changelog)
if not heading:
print("::error::CHANGELOG.md has no versioned heading to compare with Git tags.")
sys.exit(1)

current_version, current_status = heading.groups()
current_status = current_status.strip()
if current_status.upper() != "TBD" and not re.fullmatch(r"\d{4}-\d{2}-\d{2}", current_status):
print(f"::error::Unsupported CHANGELOG.md version status: {current_status}")
sys.exit(1)

if current_version == next_version and current_status.upper() == "TBD":
# Reuse an already pending next release, such as [5.0.13] - TBD.
new_version = next_version
Comment on lines +86 to +88

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Pending package notes repeat

When CHANGELOG.md already has the next patch marked TBD, this branch now reuses that version. But the release-note step still always prepends a new entry. If the pending release already has package notes, the generated PR adds a second Version: block for the same release in both packages. Reuse the existing package-note entry too, preserving its changes.

Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/service-update.yml
Line: 86-88

Comment:
**Pending package notes repeat**

When `CHANGELOG.md` already has the next patch marked `TBD`, this branch now reuses that version. But the release-note step still always prepends a new entry. If the pending release already has package notes, the generated PR adds a second `Version:` block for the same release in both packages. Reuse the existing package-note entry too, preserving its changes.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Fix in Codex

elif current_version == latest_version and current_status.upper() != "TBD":
# The changelog is at the latest released tag; start the next patch release.
new_version = next_version
else:
print(
f"::error::CHANGELOG.md starts at {current_version} ({current_status}), "
f"but the latest stable Git tag is {latest_tag}. Expected either "
f"[{latest_version}] with a release date or [{next_version}] - TBD."
)
sys.exit(1)

branch = f"v{new_version}/service-update"
print(f"Latest stable Git tag: {latest_tag}")
print(f"Latest CHANGELOG.md version: {current_version} ({current_status})")
print(f"Service update version: {new_version}")
with open(os.environ["GITHUB_OUTPUT"], "a", encoding="utf-8") as output:
output.write(f"current={current_version}\n")
output.write(f"new={new_version}\n")
output.write(f"branch={branch}\n")

- name: Generate codebelt-aicia token
id: app-token
Expand All @@ -69,7 +125,7 @@ jobs:
NEW="${{ steps.newver.outputs.new }}"
for f in .nuget/*/PackageReleaseNotes.txt; do
[ -f "$f" ] || continue
TFM=$(grep -m1 "^Availability:" "$f" | sed 's/Availability: //' || echo ".NET 10, .NET 9 and .NET Standard 2.0")
TFM=$(grep -m1 "^Availability:" "$f" | sed 's/Availability: //' || echo ".NET 11 and .NET 10")
ENTRY="Version: ${NEW}\nAvailability: ${TFM}\n\n# ALM\n- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs)\n\n"
{ printf "$ENTRY"; cat "$f"; } > "$f.tmp" && mv "$f.tmp" "$f"
done
Expand All @@ -81,14 +137,27 @@ jobs:
from datetime import date
new_ver = os.environ['NEW_VERSION']
today = date.today().isoformat()
entry = f"## [{new_ver}] - {today}\n\nThis is a service update that focuses on package dependencies.\n\n"
with open("CHANGELOG.md") as f:
service_note = "This release also includes a service update focused on package dependencies."
with open("CHANGELOG.md", encoding="utf-8") as f:
content = f.read()
idx = content.find("## [")
content = (content[:idx] + entry + content[idx:]) if idx != -1 else (content + entry)
with open("CHANGELOG.md", "w") as f:
heading = re.search(r"(?m)^## \[(\d+\.\d+\.\d+)\] - (TBD|\d{4}-\d{2}-\d{2})[ \t]*$", content)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Pending changelog section repeats

The version check accepts lowercase tbd through current_status.upper(), but this lookup only accepts uppercase TBD. With a pending heading such as [1.3.6] - tbd, the first step succeeds, then this step inserts another heading for 1.3.6 instead of updating it. Use the same status matching in both steps.

Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/service-update.yml
Line: 143

Comment:
**Pending changelog section repeats**

The version check accepts lowercase `tbd` through `current_status.upper()`, but this lookup only accepts uppercase `TBD`. With a pending heading such as `[1.3.6] - tbd`, the first step succeeds, then this step inserts another heading for `1.3.6` instead of updating it. Use the same status matching in both steps.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Fix in Codex

if heading and heading.group(1) == new_ver:
if heading.group(2) == "TBD":
content = content[:heading.start(2)] + today + content[heading.end(2):]
heading = re.search(r"(?m)^## \[(\d+\.\d+\.\d+)\] - \d{4}-\d{2}-\d{2}[ \t]*$", content)
section_end = re.search(r"(?m)^## \[", content[heading.end():])
end = heading.end() + section_end.start() if section_end else len(content)
if service_note not in content[heading.end():end]:
remainder = content[heading.end():]
content = content[:heading.end()] + "\n\n" + service_note + "\n\n" + remainder.lstrip("\r\n")
print(f"Updated existing CHANGELOG entry for v{new_ver}")
else:
entry = f"## [{new_ver}] - {today}\n\nThis is a service update that focuses on package dependencies.\n\n"
idx = content.find("## [")
content = (content[:idx] + entry + content[idx:]) if idx != -1 else (content + entry)
print(f"Added CHANGELOG entry for v{new_ver}")
with open("CHANGELOG.md", "w", encoding="utf-8") as f:
f.write(content)
print(f"CHANGELOG updated for v{new_ver}")
EOF
env:
NEW_VERSION: ${{ steps.newver.outputs.new }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,33 +1,39 @@
Version: 1.3.5
Availability: .NET 10 and .NET 9

# ALM
- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs)

Version: 1.3.4
Availability: .NET 10 and .NET 9

# ALM
- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs)

Version: 1.3.3
Availability: .NET 10 and .NET 9

# ALM
- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs)

Version: 1.3.2
Availability: .NET 10 and .NET 9

# ALM
- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs)

Version: 1.3.1
Availability: .NET 10 and .NET 9

# ALM
- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs)

Version: 2.0.0
Availability: .NET 11 and .NET 10

# ALM
- CHANGED Target frameworks by adding .NET 11 (net11.0) and removing .NET 9 (net9.0), so the package now targets .NET 11 and .NET 10

Version: 1.3.5
Availability: .NET 10 and .NET 9

# ALM
- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs)

Version: 1.3.4
Availability: .NET 10 and .NET 9

# ALM
- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs)

Version: 1.3.3
Availability: .NET 10 and .NET 9

# ALM
- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs)

Version: 1.3.2
Availability: .NET 10 and .NET 9

# ALM
- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs)

Version: 1.3.1
Availability: .NET 10 and .NET 9

# ALM
- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs)

Version: 1.3.0
Availability: .NET 10 and .NET 9

Expand Down
66 changes: 36 additions & 30 deletions .nuget/Codebelt.Extensions.BenchmarkDotNet/PackageReleaseNotes.txt
Original file line number Diff line number Diff line change
@@ -1,33 +1,39 @@
Version: 1.3.5
Availability: .NET 10 and .NET 9

# ALM
- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs)

Version: 1.3.4
Availability: .NET 10 and .NET 9

# ALM
- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs)

Version: 1.3.3
Availability: .NET 10 and .NET 9

# ALM
- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs)

Version: 1.3.2
Availability: .NET 10 and .NET 9

# ALM
- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs)

Version: 1.3.1
Availability: .NET 10 and .NET 9

# ALM
- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs)

Version: 2.0.0
Availability: .NET 11 and .NET 10

# ALM
- CHANGED Target frameworks by adding .NET 11 (net11.0) and removing .NET 9 (net9.0), so the package now targets .NET 11 and .NET 10

Version: 1.3.5
Availability: .NET 10 and .NET 9

# ALM
- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs)

Version: 1.3.4
Availability: .NET 10 and .NET 9

# ALM
- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs)

Version: 1.3.3
Availability: .NET 10 and .NET 9

# ALM
- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs)

Version: 1.3.2
Availability: .NET 10 and .NET 9

# ALM
- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs)

Version: 1.3.1
Availability: .NET 10 and .NET 9

# ALM
- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs)

Version: 1.3.0
Availability: .NET 10 and .NET 9

Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This document provides guidance for AI agents working in this repository.

## Project Overview

Codebelt.Extensions.BenchmarkDotNet is a .NET library that provides a uniform, opinionated, and extensible way of working with BenchmarkDotNet. The solution targets .NET 10.0 and .NET 9.0.
Codebelt.Extensions.BenchmarkDotNet is a .NET library that provides a uniform, opinionated, and extensible way of working with BenchmarkDotNet. The solution targets .NET 11.0 and .NET 10.0.

## Coding Standards

Expand Down
6 changes: 3 additions & 3 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</PropertyGroup>

<PropertyGroup Condition="'$(IsSourceProject)' == 'true'">
<TargetFrameworks>net10.0;net9.0</TargetFrameworks>
<TargetFrameworks>net11.0;net10.0</TargetFrameworks>
<Copyright>Copyright © Geekle 2025-2026. All rights reserved.</Copyright>
<Authors>gimlichael</Authors>
<Company>Geekle</Company>
Expand Down Expand Up @@ -56,7 +56,7 @@
</ItemGroup>

<PropertyGroup Condition="'$(IsTestProject)' == 'true'">
<TargetFrameworks>net10.0;net9.0</TargetFrameworks>
<TargetFrameworks>net11.0;net10.0</TargetFrameworks>
<IsPackable>false</IsPackable>
<OutputType>Exe</OutputType>
<RunAnalyzers>false</RunAnalyzers>
Expand Down Expand Up @@ -94,7 +94,7 @@
</ItemGroup>

<PropertyGroup Condition="'$(IsBenchmarkProject)' == 'true'">
<TargetFrameworks>net10.0;net9.0</TargetFrameworks>
<TargetFrameworks>net11.0;net10.0</TargetFrameworks>
<IsPackable>false</IsPackable>
<RunAnalyzers>false</RunAnalyzers>
<RunAnalyzersDuringBuild>false</RunAnalyzersDuringBuild>
Expand Down
6 changes: 3 additions & 3 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="Codebelt.Coverlet.MTP" Version="10.1.0" />
<PackageVersion Include="Codebelt.Coverlet.MTP" Version="10.1.1" />
<PackageVersion Include="BenchmarkDotNet" Version="0.15.8" />
<PackageVersion Include="BenchmarkDotNet.Diagnostics.Windows" Version="0.15.8" />
<PackageVersion Include="Codebelt.Bootstrapper.Console" Version="5.2.2" />
<PackageVersion Include="Codebelt.Bootstrapper.Console" Version="5.2.3" />
<PackageVersion Include="Codebelt.Extensions.Xunit.App" Version="12.0.2" />
<PackageVersion Include="Cuemon.Core" Version="10.8.1" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.11.0" />
Expand All @@ -16,4 +16,4 @@
<PackageVersion Include="xunit.v3.runner.console" Version="4.0.2" />
<PackageVersion Include="xunit.runner.visualstudio" Version="4.0.1" />
</ItemGroup>
</Project>
</Project>
Loading
Loading