Skip to content

Commit

Permalink
update github action for benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
omaraflak committed Aug 28, 2023
1 parent 4fb77b6 commit d0b1cd5
Showing 1 changed file with 20 additions and 11 deletions.
31 changes: 20 additions & 11 deletions .github/workflows/cmake-single-platform.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# This starter workflow is for a CMake project running on a single platform. There is a different starter workflow if you need cross-platform coverage.
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-multi-platform.yml
name: CMake on a single platform
name: CI

on:
push:
Expand Down Expand Up @@ -36,19 +34,30 @@ jobs:
- name: Test
run: ${{github.workspace}}/build/banana_test

benchmark:
if: github.ref == 'refs/heads/master'

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
submodules: true

- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}

- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

- name: Run benchmark
run: ${{github.workspace}}/build/benchmarks --benchmark_format=json > ${{github.workspace}}/benchmarks/benchmark_results.json

- name: Store benchmark results
uses: benchmark-action/github-action-benchmark@v1
with:
name: C++ Benchmark
name: Banana Benchmark
tool: 'googlecpp'
output-file-path: ${{github.workspace}}/benchmarks/benchmark_results.json
github-token: ${{ secrets.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: '@omaraflak'
github-token: ${{secrets.GITHUB_TOKEN}}
auto-push: true

0 comments on commit d0b1cd5

Please sign in to comment.