Skip to content

Commit 29b04fe

Browse files
committed
chore(ci): Attempt to benchmark binary size
1 parent 2e5c744 commit 29b04fe

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/bench-baseline.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Benchmark Baseline
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
push:
8+
branches: master
9+
10+
env:
11+
RUNNER: buildjet-8vcpu-ubuntu-2204
12+
13+
jobs:
14+
bench:
15+
name: Binary Size
16+
runs-on: "${{ env.RUNNER}}"
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
- name: Install Rust
21+
uses: dtolnay/rust-toolchain@stable
22+
with:
23+
toolchain: stable
24+
- uses: Swatinem/rust-cache@v2
25+
- name: Install Bencher
26+
uses: bencherdev/bencher@main
27+
- name: Build
28+
run: "cargo build --package clap --example git-derive -F derive --release"
29+
env:
30+
CARGO_PROFILE_RELEASE_STRIP: true
31+
- name: Report
32+
run: |
33+
bencher run \
34+
--project "${{ github.repository }}" \
35+
--branch "${{ github.ref_name }}" \
36+
--testbed "${{ env.RUNNER}}" \
37+
--token '${{ secrets.BENCHER_API_TOKEN }}' \
38+
--github-actions '${{ secrets.GITHUB_TOKEN }}' \
39+
--adapter json \
40+
--file-size target/release/examples/git-derive
41+
permissions:
42+
checks: write

0 commit comments

Comments
 (0)