-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (39 loc) · 1.39 KB
/
benchmark_all.yml
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
name: benchmark_all
on:
push:
branches: [main]
permissions:
contents: write
jobs:
build_and_benchmark:
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [ubuntu-latest]
build_type: [Release]
subdir: [core, dagnabbit]
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v2
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.build_type}}
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}} --target ${{matrix.subdir}}_benchmarks
- name: Run Benchmarks
working-directory: ${{github.workspace}}/build/${{matrix.subdir}}/
run: ./${{matrix.subdir}}_benchmarks --benchmark_format=json --benchmark_out=benchmark_result.json
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
name: ${{matrix.subdir}} Benchmark
tool: 'googlecpp'
output-file-path: ${{github.workspace}}/build/${{matrix.subdir}}/benchmark_result.json
github-token: ${{secrets.GITHUB_TOKEN}}
auto-push: true
benchmark-data-dir-path: dev/bench/${{matrix.subdir}}
alert-threshold: '200%'
comment-on-alert: true
fail-on-alert: true
alert-comment-cc-users: '@charliehuge'