Skip to content

Run benchmarks

Run benchmarks #26

Workflow file for this run

name: Run benchmarks
on:
workflow_dispatch: # Manually triggered by an authorized repo contributor.
pull_request:
paths:
- '.github/workflows/run-benchmarks.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.head.label || github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
benchmark:
permissions:
contents: read
id-token: write
runs-on: ubuntu-latest-8-cores
strategy:
matrix:
runtimes: [centrifuge, altair, development]
steps:
- name: Checkout code
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4
- name: Prep build on Ubuntu
uses: ./.github/actions/prep-ubuntu
with:
cache: enabled
# Cache needs Google credentials:
GWIP: ${{ secrets.GWIP_SCCACHE }}
GSA: ${{ secrets.GSA_SCCACHE }}
- name: Run Benchmark ${{ matrix.runtimes }}
run: ./scripts/runtime_benchmarks.sh ${{ matrix.runtimes }}
env:
RUSTC_WRAPPER: "sccache"
- run: echo "NOW=$(date -u +%Y-%m-%d)" >> $GITHUB_ENV
- name: Upload artifact
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 #v4.3.0
with:
name: ${{ matrix.runtimes }}-weights
path: runtime/${{ matrix.runtimes }}/src/weights/