-
Notifications
You must be signed in to change notification settings - Fork 40
53 lines (51 loc) · 2.2 KB
/
benchmark.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
51
52
53
name: Continuous Benchmark
on:
push:
jobs:
benchmark:
name: Run SI benchmarks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: install dependencies
run: |
sudo -H pip3 install setuptools wheel
sudo -H pip3 install conan
conan profile detect --force
sudo apt-get install -y ninja-build
- name: Build and run benchmarks with Catch2
run: |
conan install . --output-folder=build --build=missing --settings=build_type=Release
cmake --preset=ci-ninja-release
cmake --build build --target SI_unit_benchmarks
./build/test/SI_unit_benchmarks | tee ./build/benchmark_result.txt
- name: Store benchmark result
if: github.ref == 'refs/heads/main'
uses: rhysd/[email protected]
with:
name: Catch2 Benchmark
tool: "catch2"
output-file-path: build/benchmark_result.txt
# Use personal access token instead of GITHUB_TOKEN due to https://github.community/t5/GitHub-Actions/Github-action-not-triggering-gh-pages-upon-push/td-p/26869/highlight/false
github-token: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
auto-push: true
# Show alert with commit comment on detecting possible performance regression
alert-threshold: "200%"
comment-on-alert: true
fail-on-alert: true
alert-comment-cc-users: "@bernedom"
- name: Run benchmark - no store
if: github.ref != 'refs/heads/main'
uses: rhysd/[email protected]
with:
name: Catch2 Benchmark
tool: "catch2"
output-file-path: build/benchmark_result.txt
# Use personal access token instead of GITHUB_TOKEN due to https://github.community/t5/GitHub-Actions/Github-action-not-triggering-gh-pages-upon-push/td-p/26869/highlight/false
github-token: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
auto-push: false
# Show alert with commit comment on detecting possible performance regression
alert-threshold: "200%"
comment-on-alert: true
fail-on-alert: true
alert-comment-cc-users: "@bernedom"