Skip to content

fix: reject invalid binary event (resolve #357) (#358) #107

fix: reject invalid binary event (resolve #357) (#358)

fix: reject invalid binary event (resolve #357) (#358) #107

Workflow file for this run

name: Bencher
on:
push:
branches: main
workflow_dispatch:
jobs:
benchmark_base:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bencherdev/bencher@main
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Base branch benchmarks
run: |
bencher run \
--branch main \
--testbed ubuntu-latest \
--err
env:
BENCHER_API_TOKEN: ${{ secrets.BENCHER_API_TOKEN }}
BENCHER_CMD: cargo bench --all-features
BENCHER_PROJECT: socketioxide
RUSTFLAGS: --cfg=socketioxide_test
benchmark_pr:
if: github.event_name == 'workflow_dispatch' && github.event.pull_request.head.repo.full_name == github.repository
permissions:
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: bencherdev/bencher@main
- name: PR benchmarks
run: |
bencher run \
--branch '${{ github.head_ref }}' \
--branch-start-point '${{ github.base_ref }}' \
--testbed ubuntu-latest \
--err \
--github-actions '${{ secrets.GITHUB_TOKEN }}'
env:
BENCHER_API_TOKEN: ${{ secrets.BENCHER_API_TOKEN }}
BENCHER_CMD: cargo bench --all-features
BENCHER_PROJECT: socketioxide
RUSTFLAGS: --cfg=socketioxide_test