-
Notifications
You must be signed in to change notification settings - Fork 3
50 lines (41 loc) · 1.51 KB
/
benchmark_fork_run.yml
File metadata and controls
50 lines (41 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: "Run Benchmarks"
on:
pull_request:
types: [opened, reopened, edited, synchronize]
paths:
- '.github/workflows/benchmark*.yml'
- 'Cargo.toml'
- 'benches/**'
- 'crates/**'
jobs:
benchmark_fork_pr_branch:
if: "github.event.pull_request.head.repo.full_name != github.repository"
name: Run Fork PR Benchmarks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Install protobuf-compiler
run: |
sudo apt-get update
sudo apt-get install -y protobuf-compiler
- name: Install Rust
uses: dtolnay/rust-toolchain@efa25f7f19611383d5b0ccf2d1c8914531636bf9 # stable
with:
toolchain: stable
targets: ${{ matrix.target }}
- name: Rust Cache
uses: swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2.8.0
- uses: bencherdev/bencher@main
- name: Track base branch benchmarks with Bencher
run: |
cargo bench --features bench_internals > benchmark_results.log
- name: Upload Benchmark Results
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: benchmark_results.log
path: ./benchmark_results.log
- name: Upload GitHub Pull Request Event
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: event.json
path: ${{ github.event_path }}