Skip to content

Run benchmarks for a day #212

Run benchmarks for a day

Run benchmarks for a day #212

Workflow file for this run

name: Run benchmarks for a day
on:
workflow_dispatch:
permissions:
contents: read
actions: read
jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Parse branch name
id: parse_branch
run: |
echo "day=$(echo $GITHUB_REF | awk -F/ '{print $NF}')" >> "$GITHUB_OUTPUT"
- name: Get input
working-directory: ./rust-runner
run: |
wget "${{ secrets.DATA_URL }}" -O data.tgz
tar -xzf data.tgz
- name: Setup rust toolchain, cache and cargo-codspeed binary
uses: moonrepo/setup-rust@v1
with:
cache-target: release
bins: cargo-codspeed
profile: minimal
- name: Build the benches
working-directory: ./rust-runner
env:
DAY_NUMBER: ${{ steps.parse_branch.outputs.day }}
run: cargo codspeed build
- name: Run the benchmarks
uses: CodSpeedHQ/[email protected]
with:
working-directory: ./rust-runner
token: ${{ secrets.CODSPEED_TOKEN }}
run: |
cargo codspeed run bench_part1
cargo codspeed run bench_part2