Add CI/CD benchmarking
This commit is contained in:
@@ -75,3 +75,55 @@ jobs:
|
|||||||
token: ${{secrets.PAT}}
|
token: ${{secrets.PAT}}
|
||||||
repository: ${{env.PLUGIN_REPO}}
|
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
|
||||||
@@ -16,7 +16,8 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="BenchmarkDotNet" Version="0.13.8" />
|
<PackageReference Include="BenchmarkDotNet" Version="0.13.10" />
|
||||||
|
<PackageReference Include="BenchmarkDotNet.Diagnostics.Windows" Version="0.13.10" />
|
||||||
<PackageReference Include="Meziantou.Analyzer" Version="2.0.92">
|
<PackageReference Include="Meziantou.Analyzer" Version="2.0.92">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
|
|||||||
Reference in New Issue
Block a user