-
Notifications
You must be signed in to change notification settings - Fork 2
56 lines (48 loc) · 1.79 KB
/
Copy pathbenchmark.yml
File metadata and controls
56 lines (48 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: benchmark
# Manual-only: BenchmarkDotNet runs are too slow and CPU-noisy to gate every PR on. Trigger this on a
# branch to capture serialization numbers; results are printed in the job log.
on:
workflow_dispatch:
inputs:
filter:
description: "BenchmarkDotNet filter (e.g. '*Serialize*')"
required: false
default: "*"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
benchmark:
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: read
actions: read
id-token: write
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
# Bind the workflow input to an env var so it is never interpolated into the run script text
# (avoids shell injection); the run steps reference it as a normal, quoted shell variable.
FILTER: ${{ inputs.filter }}
steps:
- name: CargoWall
uses: code-cargo/cargowall-action@78f9fbcb3561c6ad9289e5b740616216e8cbd232 # v1.3.5
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: Setup dotnet
uses: actions/setup-dotnet@26b0ec14cb23fa6904739307f278c14f94c95bf1 # v5.4.0
with:
cache: true
cache-dependency-path: '**/packages.linux-x64.lock.json'
dotnet-version: |
8.x
10.x
- name: Serialized size report
run: dotnet run -c Release --project util/Benchmarks -f net10.0 -- --sizes
- name: Benchmarks (net10.0)
run: dotnet run -c Release --project util/Benchmarks -f net10.0 -- --filter "${FILTER:-*}"
- name: Benchmarks (net8.0)
run: dotnet run -c Release --project util/Benchmarks -f net8.0 -- --filter "${FILTER:-*}"