-
Notifications
You must be signed in to change notification settings - Fork 3
62 lines (52 loc) · 2.17 KB
/
benchmarks.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
54
55
56
57
58
59
60
61
62
name: Googlebenchmark
on:
push:
branches:
- main
permissions:
# deployments permission to deploy GitHub pages website
deployments: write
# contents permission to update benchmark contents in gh-pages branch
contents: write
jobs:
benchmark:
name: Performance regression check
runs-on: ubuntu-latest
steps:
- name: Checkout Loki
uses: actions/checkout@v2
- name: Checkout Google Benchmark
uses: actions/checkout@v2
with:
repository: google/benchmark
path: 'benchmark'
ref: '4575fc415f17c45911f7df7aacbf83a378c5565a' # they plan to add a dependency to abseil soon that we want to avoid
- name: Build and Install Google Benchmark
run: |
cd benchmark
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DBENCHMARK_ENABLE_GTEST_TESTS=OFF -DCMAKE_INSTALL_PREFIX=benchmark-install
cmake --build build
cmake --install build
- name: Download and extract boost, no building required
run: |
wget --no-check-certificate 'https://archives.boost.io/release/1.84.0/source/boost_1_84_0.tar.gz'
tar xf boost_1_84_0.tar.gz
- name: Configure CMake
run: cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_BENCHMARKING:BOOL=TRUE -DCMAKE_PREFIX_PATH="$GITHUB_WORKSPACE/benchmark-install;$GITHUB_WORKSPACE/boost_1_84_0" -S . -B build
- name: Build Loki
run: export CXXFLAGS="-Werror" && cmake --build build
# Run benchmark and store the output to a file
- name: Run benchmark
run: build/benchmarks/persistent_factory --benchmark_format=json | tee benchmark_result.json
# Run `github-action-benchmark` action
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
# What benchmark tool the output.txt came from
tool: 'googlecpp'
# Where the output from the benchmark tool is stored
output-file-path: benchmark_result.json
# Access token to deploy GitHub Pages branch
github-token: ${{ secrets.GITHUB_TOKEN }}
# Push and deploy GitHub pages branch automatically
auto-push: true