Skip to content

perf: cibench workflow #1

perf: cibench workflow

perf: cibench workflow #1

Workflow file for this run

name: CI Benchmarks
on:
pull_request:
branches: [master]
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "-C target-cpu=native"
jobs:
benchmark:
name: Run benchmarks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Install critcmp
run: cargo install critcmp
- name: Run benchmarks (master)
run: |
git checkout master
cargo bench --bench parse -- --save-baseline master
- name: Run benchmarks (PR)
run: |
git checkout ${{ github.event.pull_request.head.sha }}
cargo bench --bench parse -- --save-baseline pr
- name: Compare benchmarks
run: |
critcmp master pr-${{ github.event.pull_request.number }}
benchmark-simd:
name: Run SIMD benchmarks
runs-on: ubuntu-latest
strategy:
matrix:
feature: [swar, sse42, avx2]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Install critcmp
run: cargo install critcmp
- name: Run benchmarks (master)
run: |
git checkout master
cargo bench --bench parse --features ${{ matrix.feature }} -- --save-baseline master-${{ matrix.feature }}
- name: Run benchmarks (PR)
run: |
git checkout ${{ github.event.pull_request.head.sha }}
cargo bench --bench parse --features ${{ matrix.feature }} -- --save-baseline pr-${{ matrix.feature }}
- name: Compare benchmarks
run: |
critcmp master-${{ matrix.feature }} pr-${{ matrix.feature }}-${{ github.event.pull_request.number }}
benchmark-aarch64:
name: Run aarch64/neon benchmarks
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Install critcmp
run: cargo install critcmp
- name: Run benchmarks (master)
run: |
git checkout master
cargo bench --bench parse --features neon -- --save-baseline master-aarch64
- name: Run benchmarks (PR)
run: |
git checkout ${{ github.event.pull_request.head.sha }}
cargo bench --bench parse --features neon -- --save-baseline pr-aarch64
- name: Compare benchmarks
run: |
critcmp master-aarch64 pr-aarch64-${{ github.event.pull_request.number }}