Skip to content

benchmark

benchmark #220

Workflow file for this run

name: benchmark
env:
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_NOLOGO: true
DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION: 1
NUGET_XMLDOC_MODE: skip
TERM: xterm
on:
push:
branches:
- main
- dotnet-vnext
- dotnet-nightly
paths-ignore:
- '**/*.gitattributes'
- '**/*.gitignore'
- '**/*.md'
schedule:
- cron: '0 1 * * MON-FRI'
workflow_dispatch:
permissions:
contents: read
jobs:
benchmark:
name: benchmark
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup .NET SDK
uses: actions/setup-dotnet@3951f0dfe7a07e2313ec93c75700083e2005cbab # v4.3.0
- name: Run benchmarks
shell: pwsh
run: ./benchmark.ps1
- name: Publish BenchmarkDotNet artifacts
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
if: ${{ !cancelled() }}
with:
name: artifacts
path: ./BenchmarkDotNet.Artifacts/results/*
if-no-files-found: error
- name: Get repository name
id: get-repo-name
shell: pwsh
run: |
$repoName = ${env:GITHUB_REPOSITORY}.Split("/")[-1]
"repo-name=${repoName}" >> ${env:GITHUB_OUTPUT}
- name: Publish results
uses: martincostello/benchmarkdotnet-results-publisher@2090db9dca99a23ff464351db28aa6c6bf1a4746 # v1.0.1
with:
branch: ${{ github.ref_name }}
comment-on-threshold: true
output-file-path: '${{ steps.get-repo-name.outputs.repo-name }}/data.json'
repo: '${{ github.repository_owner }}/benchmarks'
repo-token: ${{ secrets.BENCHMARKS_TOKEN }}