Add CI/CD benchmarking
This commit is contained in:
@@ -74,4 +74,56 @@ jobs:
|
||||
with:
|
||||
token: ${{secrets.PAT}}
|
||||
repository: ${{env.PLUGIN_REPO}}
|
||||
event-type: new-release
|
||||
event-type: new-release
|
||||
|
||||
bench:
|
||||
runs-on: windows-latest
|
||||
env:
|
||||
DOTNET_CLI_TELEMETRY_OPTOUT: true
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v3
|
||||
with:
|
||||
dotnet-version: '7.0'
|
||||
|
||||
- name: Download Dalamud
|
||||
run: |
|
||||
Invoke-WebRequest -Uri https://goatcorp.github.io/dalamud-distrib/stg/latest.zip -OutFile latest.zip
|
||||
Expand-Archive -Force latest.zip "$env:AppData\XIVLauncher\addon\Hooks\dev\"
|
||||
|
||||
- name: Restore
|
||||
run: |
|
||||
dotnet restore -r win
|
||||
|
||||
- name: Benchmark
|
||||
run: |
|
||||
dotnet run --configuration Release --project Benchmark -- -e json html github csv -f * -d -m --counters BranchMispredictions+CacheMisses+TotalCycles
|
||||
|
||||
- name: Cache Benchmark Data
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ./bench-cache
|
||||
key: ${{runner.os}}-${{ github.head_ref || github.ref_name }}-benchmark
|
||||
|
||||
- name: Publish Benchmarks
|
||||
uses: rhysd/github-action-benchmark@v1
|
||||
with:
|
||||
tool: benchmarkdotnet
|
||||
output-file-path: BenchmarkDotNet.Artifacts/results/Craftimizer.Benchmark-report-full-compressed.json
|
||||
external-data-json-path: ./bench-cache/external.json
|
||||
github-token: ${{secrets.GITHUB_TOKEN}}
|
||||
comment-always: true
|
||||
alert-threshold: '150%'
|
||||
alert-comment-cc-users: '@${{github.actor}}'
|
||||
|
||||
- name: Upload Test Results
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: BenchmarkResults
|
||||
path: BenchmarkDotNet.Artifacts/results
|
||||
Reference in New Issue
Block a user