Skip to content

Commit

Permalink
chore(ci): run benchmarks on base branch first
Browse files Browse the repository at this point in the history
  • Loading branch information
SOF3 authored Oct 19, 2023
1 parent eff4ecc commit bad108e
Showing 1 changed file with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions .github/workflows/bench-branch.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,38 @@
on:
push:
branches-ignore:
- "dependabot/**"
branches:
- "master"
tags:
- "*"
pull_request:
name: benchmark
jobs:
runBenchmark:
name: run benchmark
runs-on: ubuntu-latest
if: "!startsWith(github.head_ref, 'dependabot/')"
steps:
- uses: actions/checkout@v3
- name: Check out base
if: github.event_name == 'pull_request'
uses: actions/checkout@v3
with:
ssh-key: ${{secrets.API_KEY}}
repo: ${{github.event.pull_request.base.repo.full_name}}
ref: ${{github.event.pull_request.base.ref}}
- name: Run benchmarks on base for comparison
if: github.event_name == 'pull_request'
run: cargo bench --features internal-bench

- name: Check out head
uses: actions/checkout@v3
if: github.event_name == 'pull_request'
with:
ssh-key: ${{secrets.API_KEY}}
repo: ${{github.event.pull_request.head.repo.full_name}}
ref: ${{github.event.pull_request.head.ref}}
- name: Check out head
uses: actions/checkout@v3
if: github.event_name == 'push'
with:
ssh-key: ${{secrets.API_KEY}}

Expand Down

0 comments on commit bad108e

Please sign in to comment.