-
Notifications
You must be signed in to change notification settings - Fork 3
45 lines (37 loc) · 1.28 KB
/
benchmark_fork_run.yml
File metadata and controls
45 lines (37 loc) · 1.28 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
name: "Run Benchmarks"
on:
pull_request:
types: [opened, reopened, edited, synchronize]
paths:
- '.github/workflows/benchmark*.yml'
- 'Cargo.toml'
- 'benches/**'
- 'src/**'
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@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
- name: Install Rust
uses: dtolnay/rust-toolchain@f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561 # 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@v6
with:
name: benchmark_results.log
path: ./benchmark_results.log
- name: Upload GitHub Pull Request Event
uses: actions/upload-artifact@v6
with:
name: event.json
path: ${{ github.event_path }}