Skip to content

Commit

Permalink
Merge pull request #444 from gosub-browser/jaytaph-patch-1
Browse files Browse the repository at this point in the history
Update bencher.yaml
  • Loading branch information
jaytaph authored Apr 25, 2024
2 parents e07b133 + cef9b6d commit db587fe
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 7 deletions.
22 changes: 15 additions & 7 deletions .github/workflows/bencher.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
name: Bencher.dev benchmarks

on:
push:
branches:
- * # All branches
pull_request:
types: [opened, reopened, edited, synchronize]

jobs:
benchmark_with_bencher:
name: Continuous Benchmarking with Bencher
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
permissions:
pull-requests: write
runs-on: ubuntu-latest
env:
BENCHER_PROJECT: gosub-engine
Expand All @@ -16,10 +18,16 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: bencherdev/bencher@main
- name: Track Benchmarks with Bencher
- name: Track PR Benchmarks with Bencher
run: |
bencher run \
--branch "$GITHUB_REF_NAME" \
--project gosub-engine \
--token "${{ secrets.BENCHER_API_TOKEN }}" \
--err \
cargo bench --all
--branch '${{ github.head_ref }}' \
--branch-start-point '${{ github.base_ref }}' \
--branch-start-point-hash '${{ github.event.pull_request.base.sha }}' \
--testbed ubuntu-latest \
--adapter json \
--err \
--github-actions '${{ secrets.GITHUB_TOKEN }}' \
cargo bench --all
21 changes: 21 additions & 0 deletions .github/workflows/bencher_baseline.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
on:
push:
branches: main

jobs:
benchmark_base_branch:
name: Continuous Benchmarking with Bencher
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bencherdev/bencher@main
- name: Track base branch benchmarks with Bencher
run: |
bencher run \
--project gosub-engine \
--token '${{ secrets.BENCHER_API_TOKEN }}' \
--branch main \
--testbed ubuntu-latest \
--adapter json \
--err \
cargo bench --all

0 comments on commit db587fe

Please sign in to comment.