-
Notifications
You must be signed in to change notification settings - Fork 0
Add benchmark evidence reporter and automation #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| name: Benchmark Evidence | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| include_synthetic: | ||
| description: "Include synthetic fixtures in report generation" | ||
| required: false | ||
| default: false | ||
| type: boolean | ||
| schedule: | ||
| - cron: "0 5 * * 1" | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| benchmark-evidence: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup .NET | ||
| uses: actions/setup-dotnet@v4 | ||
| with: | ||
| dotnet-version: 8.0.x | ||
|
|
||
| - name: Restore | ||
| run: dotnet restore GauntletCI.slnx | ||
|
|
||
| - name: Build benchmark reporter | ||
| run: dotnet build src/GauntletCI.BenchmarkReporter/GauntletCI.BenchmarkReporter.csproj --configuration Release --no-restore | ||
|
|
||
| - name: Generate benchmark evidence artifacts | ||
| shell: bash | ||
| run: | | ||
| set -euo pipefail | ||
| args=("--repo-root" "${GITHUB_WORKSPACE}" "--output-dir" "${GITHUB_WORKSPACE}/docs/benchmarks") | ||
| if [ "${{ github.event.inputs.include_synthetic || 'false' }}" = "true" ]; then | ||
| args+=("--include-synthetic") | ||
| fi | ||
| dotnet run --project src/GauntletCI.BenchmarkReporter/GauntletCI.BenchmarkReporter.csproj --configuration Release -- "${args[@]}" | ||
|
|
||
| - name: Upload benchmark evidence artifact | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: gauntletci-benchmark-evidence | ||
| path: | | ||
| docs/benchmarks/latest.json | ||
| docs/benchmarks/latest.csv | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| <Solution> | ||
| <Folder Name="/src/"> | ||
| <Project Path="src/GauntletCI.BenchmarkReporter/GauntletCI.BenchmarkReporter.csproj" /> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Add Useful? React with 👍 / 👎. |
||
| <Project Path="src/GauntletCI.Cli/GauntletCI.Cli.csproj" /> | ||
| <Project Path="src/GauntletCI.Core/GauntletCI.Core.csproj" /> | ||
| <Project Path="src/GauntletCI.PrIntegration.Host/GauntletCI.PrIntegration.Host.csproj" /> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The workflow builds the reporter in Release (
dotnet build ... --no-restore) and then runs it viadotnet run, which will trigger another build unless--no-buildis specified. Consider adding--no-buildto thedotnet runinvocation to avoid redundant compilation and speed up scheduled runs.