Skip to content

GHA pipeline rewrite for ease and speed #11

GHA pipeline rewrite for ease and speed

GHA pipeline rewrite for ease and speed #11

name: Run benchmarks
# ToDo: add an arbitrary label to keep this cache separate from the builds
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]
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 }}
- 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/