Skip to content

GHA pipeline rewrite for ease and speed #14

GHA pipeline rewrite for ease and speed

GHA pipeline rewrite for ease and speed #14

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@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 #v3.1.3
with:
name: ${{ matrix.runtimes }}-weights
path: runtime/${{ matrix.runtimes }}/src/weights/