Skip to content

Add GitHub Actions workflow for benchmarks#98

Merged
dazinator merged 7 commits into
developfrom
copilot/add-benchmarks-workflow
Nov 15, 2025
Merged

Add GitHub Actions workflow for benchmarks#98
dazinator merged 7 commits into
developfrom
copilot/add-benchmarks-workflow

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Nov 15, 2025

  • Explore repository structure and understand benchmark setup
  • Create .github/workflows directory
  • Create a GitHub Actions workflow file for running benchmarks
  • Configure workflow to:
    • Install .NET Core 2.1 and .NET 8.0 SDKs
    • Disable the broken gitversiontemp NuGet source
    • Build the benchmarks project without assembly signing
    • Run the benchmarks
    • Upload benchmark results as artifacts
  • Fix YAML linting issues
  • Add explicit permissions for security (contents: read)
  • Add HTML and CSV exporters for visualizations and charts
  • Remove accidentally added .nuget/nuget.exe binary
  • Complete implementation
Original prompt

This section details on the original issue you should resolve

<issue_title>Github actions workflow to run benchmarks</issue_title>
<issue_description>Let's get a github actions workflow in place to run benchmarks on the github actions runner vm. It's better than nothing!</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits November 15, 2025 01:58
Co-authored-by: dazinator <3176632+dazinator@users.noreply.github.com>
Co-authored-by: dazinator <3176632+dazinator@users.noreply.github.com>
@dazinator
Copy link
Copy Markdown
Owner

@copilot any way we can get some visualisations of the benchmarks uploaded as artifacts like charts etc? Can benchmarkdotnet output that?

Co-authored-by: dazinator <3176632+dazinator@users.noreply.github.com>
Copilot AI changed the title [WIP] Add GitHub Actions workflow to run benchmarks Add GitHub Actions workflow for benchmarks Nov 15, 2025
Copilot AI requested a review from dazinator November 15, 2025 02:03
Co-authored-by: dazinator <3176632+dazinator@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Nov 15, 2025

@copilot any way we can get some visualisations of the benchmarks uploaded as artifacts like charts etc? Can benchmarkdotnet output that?

Yes! I've added HTML and CSV exporters to the benchmark configuration. BenchmarkDotNet will now generate:

  • HTML files with formatted tables and charts for easy viewing in a browser
  • CSV files with raw data for further analysis in Excel or other tools

These will be included in the uploaded artifacts alongside the markdown reports. Commit: 70e0873

Co-authored-by: dazinator <3176632+dazinator@users.noreply.github.com>
Copilot AI requested a review from dazinator November 15, 2025 02:09
@dazinator dazinator marked this pull request as ready for review November 15, 2025 02:10
Copy link
Copy Markdown
Owner

@dazinator dazinator left a comment

Choose a reason for hiding this comment

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

@copilot feedback for you

Comment thread .nuget/nuget.exe Outdated
Co-authored-by: dazinator <3176632+dazinator@users.noreply.github.com>
@dazinator dazinator requested a review from Copilot November 15, 2025 02:29
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a GitHub Actions workflow to automate benchmark execution for the DotNet.Glob project. The workflow enables running benchmarks on push/PR events or manually via workflow dispatch, addressing the need for automated performance testing.

Key Changes:

  • Created a new GitHub Actions workflow that installs required .NET versions, builds and runs benchmarks with appropriate configurations
  • Enhanced benchmark output by adding HTML and CSV exporters for better visualization and analysis of results
  • Configured the workflow to handle project-specific requirements like disabling broken NuGet sources and assembly signing

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
.github/workflows/benchmarks.yml New workflow file that orchestrates benchmark execution with multi-version .NET setup, dependency management, and artifact uploads
src/DotNet.Glob.Benchmarks/Program.cs Updated to configure benchmark exporters (HTML/CSV) and apply configuration to all benchmark runs

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/benchmarks.yml
@dazinator
Copy link
Copy Markdown
Owner

@copilot see pr bot feedback

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Nov 15, 2025

@copilot see pr bot feedback

The bot's feedback about multiple frameworks doesn't apply here - the benchmarks project only targets netcoreapp2.1 (see line 4 of the .csproj). We install both .NET versions for different purposes:

  • .NET 8.0 SDK: For building (modern tooling)
  • .NET Core 2.1 runtime: Required to run the netcoreapp2.1 benchmarks

The hardcoded framework is correct and intentional since there's only one target framework in the project.

@dazinator dazinator merged commit a473559 into develop Nov 15, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Github actions workflow to run benchmarks

3 participants