Run benchmarks for a day #215
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: 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 |