-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (42 loc) · 1.36 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
name: Benchmark
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
benchmark:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y gcc g++ cmake lcov gcovr
sudo apt-get install -y libgtest-dev
sudo apt install -y libbenchmark-dev=1.8.3
cd /usr/src/gtest
sudo cmake CMakeLists.txt
sudo make
sudo cp ./lib/libgtest*.a /usr/lib
- name: Configure CMake
run: cmake -S . -B build -DBUILD_PERF=ON
- name: Build
run: cmake --build build --config Release
- name: Run benchmark
run: |
cd build/test/perftest
./cpp-oasvalidator-perftests > --benchmark_out=benchmark_result.json --benchmark_format=json > benchmark_result.json
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Generate HTML Page
run: python .github/workflows/convert_json_to_html.py
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build/test/perftest/benchmark_report.html