push-in-khepri #320
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: Benchmark | |
concurrency: | |
group: ${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
push: | |
branches: | |
- '*' | |
repository_dispatch: | |
types: [push-in-khepri] | |
jobs: | |
Benchmark: | |
name: Benchmark Khepri | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout khepri-benchmark | |
uses: actions/checkout@v4 | |
- name: Checkout khepri | |
uses: actions/checkout@v4 | |
with: | |
repository: rabbitmq/khepri | |
# _checkouts/<dependency> overrides the dependency version defined in | |
# rebar.config for a rebar3 project | |
# https://rebar3.readme.io/docs/dependencies#checkout-dependencies | |
path: _checkouts/khepri | |
- uses: erlef/setup-beam@v1 | |
id: install-erlang | |
with: | |
otp-version: 26 | |
rebar3-version: '3.22.1' | |
- name: Upgrade Erlang dependencies | |
run: rebar3 upgrade -a | |
- name: Compile | |
run: rebar3 escriptize | |
- name: Short benchmark | |
if: ${{ github.ref != 'refs/heads/main' }} | |
run: _build/default/bin/khepri-benchmark --max-workers=1 | |
- name: Benchmark | |
if: ${{ github.ref == 'refs/heads/main' }} | |
run: _build/default/bin/khepri-benchmark | |
- name: Publish | |
uses: peaceiris/actions-gh-pages@v4 | |
if: ${{ github.ref == 'refs/heads/main' }} | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./public |