-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (33 loc) · 1.03 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
name: Benchmark
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
benchmark:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake g++ libgtest-dev
- name: Build and Install GTest
run: |
cd /usr/src/gtest
sudo cmake CMakeLists.txt
sudo make
sudo cp lib/*.a /usr/lib
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release
- name: Build
run: cmake --build ${{github.workspace}}/build --config Release
- name: Run benchmarks
working-directory: ${{github.workspace}}/build
run: ./benchmark_vector --benchmark_format=console --benchmark_out=benchmark_results.txt
- name: Upload benchmark results
uses: actions/upload-artifact@v2
with:
name: benchmark-results
path: ${{github.workspace}}/build/benchmark_results.txt