Skip to content

Segregate compiler benchmarks into subfolders (#7) #38

Segregate compiler benchmarks into subfolders (#7)

Segregate compiler benchmarks into subfolders (#7) #38

Workflow file for this run

name: "Benchmarks"
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
permissions:
deployments: write
contents: write
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
compiler: ['g++', 'clang++']
steps:
- uses: actions/checkout@v3
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DWITH_BENCHMARKS=ON -DCMAKE_CXX_COMPILER=${{matrix.compiler}} -DCMAKE_CXX_FLAGS="-O3"
- name: Build
working-directory: ${{github.workspace}}/build
run: cmake --build . -j $(nproc)
- name: Bench
working-directory: ${{github.workspace}}/build
run: ./bench_test --benchmark_format=json | tee benchmark_results_${{matrix.compiler}}.txt
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
name: Benchmark
tool: 'googlecpp'
summary-always: true
output-file-path: ${{github.workspace}}/build/benchmark_results_${{matrix.compiler}}.txt
fail-on-alert: true
github-token: ${{ secrets.GITHUB_TOKEN }}
comment-on-alert: true
alert-threshold: 150%
gh-pages-branch: gh-pages
benchmark-data-dir-path: benchmarks/${{matrix.compiler}}
auto-push: true