-
Notifications
You must be signed in to change notification settings - Fork 3
60 lines (49 loc) · 1.77 KB
/
Copy pathperf.yml
File metadata and controls
60 lines (49 loc) · 1.77 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
57
58
59
60
name: perf
on:
push:
branches: [ main, dev, CI, perf ]
pull_request:
branches: [ main, dev, CI, perf ]
jobs:
benchmark:
# The type of runner that the job will run on
runs-on: ubuntu-latest
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_NOLOGO: true
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- uses: actions/cache@v2.1.1
name: Cache nuget
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
restore-keys: |
${{ runner.os }}-nuget-
- uses: actions/setup-dotnet@v1.8.2
with:
dotnet-version: '3.1.x' # SDK Version to use; x will use the latest version of the 3.1 channel
- name: Restore using netcore
run: dotnet restore
timeout-minutes: 5
- name: Run the benchmarks
if: success() && github.ref == 'refs/heads/perf'
run: dotnet run -c Release --project Maxisoft.Utils.Benchmarks --no-restore -- --job default --filter "*"
- name: Run the benchmarks
if: success() && github.ref != 'refs/heads/perf'
run: dotnet run -c Release --project Maxisoft.Utils.Benchmarks --no-restore -- --job short --filter "*"
- uses: actions/upload-artifact@v2
name: Artifact with Release Build
with:
name: Release Build
path: Maxisoft.Utils/bin/Release/*/Maxisoft.Utils.*
- uses: actions/upload-artifact@v2
name: Artifact with Benchmark results
with:
name: Benchmarks
path: BenchmarkDotNet.Artifacts/*