fix for azure build #1004
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: Run Benchmarks | |
on: | |
pull_request: | |
branches: | |
- master | |
- 'releases/**' | |
env: | |
VCPKG_DEFAULT_BINARY_CACHE: ${{github.workspace}}/vcpkg_binary_cache | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.sha }} | |
cancel-in-progress: true | |
jobs: | |
benchmark: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
deployments: write | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- run: git -C ${{ github.workspace }}/ext_libs/vcpkg fetch --unshallow | |
- uses: lukka/get-cmake@latest | |
- run: echo "VCPKG_COMMIT=$(git rev-parse :ext_libs/vcpkg)" >> $GITHUB_ENV | |
shell: bash | |
- run: mkdir -p ${{ env.VCPKG_DEFAULT_BINARY_CACHE }} | |
- uses: actions/cache@v3 | |
env: | |
cache-name: vcpkg-cache | |
with: | |
path: ${{ env.VCPKG_DEFAULT_BINARY_CACHE }}/* | |
key: ubuntu-latest-build-${{ env.cache-name }}-${{ hashFiles('vcpkg.json') }}-${{ env.VCPKG_COMMIT }}" | |
- uses: lukka/run-vcpkg@v10 | |
with: | |
vcpkgDirectory: '${{ github.workspace }}/ext_libs/vcpkg' | |
vcpkgJsonGlob: "${{ github.workspace }}/vcpkg.json" | |
- name: Configure | |
run: cmake --preset vcpkg-release -DRL_BUILD_BENCHMARKS=ON | |
- name: Build | |
run: cmake --build build --target rl_benchmarks | |
- name: Run benchmarks | |
run: > | |
./build/benchmarks/rl_benchmarks | |
--benchmark_min_time=2 | |
--benchmark_format=console | |
--benchmark_out_format=json | |
--benchmark_out=benchmark_results.json | |
- uses: benchmark-action/github-action-benchmark@v1 | |
with: | |
tool: 'googlecpp' | |
output-file-path: benchmark_results.json | |
alert-threshold: '150%' | |
fail-on-alert: true | |
comment-on-alert: true | |
auto-push: false | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Push results to gh-pages branch | |
if: ${{ github.event_name == 'push' && github.ref_name == 'master' }} | |
run: git push 'https://VowpalWabbit:${{ secrets.GITHUB_TOKEN }}@github.com/VowpalWabbit/reinforcement_learning.git' gh-pages:gh-pages |