2024-11-12 20:43:07 +00:00
|
|
|
name: Benchmark Baseline
|
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: master
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
bench:
|
|
|
|
name: Binary Size
|
2024-11-12 20:47:27 +00:00
|
|
|
permissions:
|
|
|
|
checks: write
|
2024-11-12 20:46:25 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
build: [linux]
|
|
|
|
include:
|
|
|
|
- build: linux
|
|
|
|
os: buildjet-8vcpu-ubuntu-2204
|
|
|
|
runs-on: "${{ matrix.os }}"
|
2024-11-12 20:43:07 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install Rust
|
|
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
with:
|
|
|
|
toolchain: stable
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
|
|
- name: Install Bencher
|
|
|
|
uses: bencherdev/bencher@main
|
|
|
|
- name: Build
|
|
|
|
run: "cargo build --package clap --example git-derive -F derive --release"
|
|
|
|
env:
|
|
|
|
CARGO_PROFILE_RELEASE_STRIP: true
|
|
|
|
- name: Report
|
|
|
|
run: |
|
|
|
|
bencher run \
|
2024-11-25 03:06:39 +00:00
|
|
|
--project $(echo "${{ github.repository }}" | sed 's/\//-/g') \
|
2024-11-12 20:43:07 +00:00
|
|
|
--branch "${{ github.ref_name }}" \
|
2024-11-12 20:46:25 +00:00
|
|
|
--testbed "${{ matrix.os }}" \
|
2024-11-12 20:43:07 +00:00
|
|
|
--token '${{ secrets.BENCHER_API_TOKEN }}' \
|
|
|
|
--github-actions '${{ secrets.GITHUB_TOKEN }}' \
|
|
|
|
--adapter json \
|
|
|
|
--file-size target/release/examples/git-derive
|