fix pos #244
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 flatmemory | |
uses: actions/checkout@v2 | |
with: | |
ref: main | |
- name: Configure, Build, and Install Dependencies | |
run: | | |
cd dependencies | |
cmake -S . -B build -DCMAKE_INSTALL_PREFIX="$GITHUB_WORKSPACE/dependencies/installs" | |
cmake --build build -j$(nproc) | |
- name: Configure, and Build flatmemory | |
run: | | |
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_BENCHMARKS=ON -S . -B build -DCMAKE_PREFIX_PATH="$GITHUB_WORKSPACE/dependencies/installs" | |
cmake --build build -j$(nproc) | |
# Run benchmarks and store the output to a file | |
- name: Run benchmark bitset_builder | |
run: build/benchmarks/bitset_builder --benchmark_format=json | tee benchmark_result_bitset_builder.json | |
- name: Run benchmark bitset_view | |
run: build/benchmarks/bitset_view --benchmark_format=json | tee benchmark_result_bitset_view.json | |
# Combine outputs to a single file | |
- name: Combine JSON files | |
run: python3 benchmarks/combine_results.py benchmark_result_bitset_builder.json benchmark_result_bitset_view.json > 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 |