Skip to content

Commit

Permalink
Bencher v0.4.21
Browse files Browse the repository at this point in the history
  • Loading branch information
epompeii committed Oct 6, 2024
1 parent 5910b93 commit 35acd03
Show file tree
Hide file tree
Showing 8 changed files with 68 additions and 54 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/base_benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ jobs:
--token '${{ secrets.BENCHER_API_TOKEN }}' \
--branch main \
--testbed ubuntu-latest \
--adapter json \
--threshold-measure latency \
--threshold-test t_test \
--threshold-max-sample-size 64 \
--threshold-upper-boundary 0.99 \
--thresholds-reset \
--err \
--adapter json \
--github-actions '${{ secrets.GITHUB_TOKEN }}' \
bencher mock
19 changes: 19 additions & 0 deletions .github/workflows/fork_pr_benchmarks_closed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
on:
pull_request:
types: [closed]

jobs:
archive_fork_pr_branch:
name: Archive closed fork PR branch with Bencher
permissions:
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bencherdev/bencher@main
- name: Archive closed fork PR branch with Bencher
run: |
bencher archive \
--project example \
--token '${{ secrets.BENCHER_API_TOKEN }}' \
--branch '${{ github.head_ref }}'
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Run and Cache Benchmarks
name: Run Benchmarks

on:
pull_request:
Expand All @@ -22,4 +22,4 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: event.json
path: ${{ github.event_path }}
path: ${{ github.event_path }}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Track Benchmarks with Bencher

on:
workflow_run:
workflows: [Run and Cache Benchmarks]
workflows: [Run Benchmarks]
types: [completed]

jobs:
Expand Down Expand Up @@ -40,12 +40,13 @@ jobs:
--project example \
--token '${{ secrets.BENCHER_API_TOKEN }}' \
--branch '${{ env.PR_HEAD }}' \
--branch-start-point '${{ env.PR_BASE }}' \
--branch-start-point-hash '${{ env.PR_BASE_SHA }}' \
--branch-reset \
--start-point '${{ env.PR_BASE }}' \
--start-point-hash '${{ env.PR_BASE_SHA }}' \
--start-point-clone-thresholds \
--start-point-reset \
--testbed ubuntu-latest \
--adapter json \
--err \
--adapter json \
--github-actions '${{ secrets.GITHUB_TOKEN }}' \
--ci-number '${{ env.PR_NUMBER }}' \
--file "$BENCHMARK_RESULTS"
11 changes: 6 additions & 5 deletions .github/workflows/pr_benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@ jobs:
--project example \
--token '${{ secrets.BENCHER_API_TOKEN }}' \
--branch '${{ github.head_ref }}' \
--branch-start-point '${{ github.base_ref }}' \
--branch-start-point-hash '${{ github.event.pull_request.base.sha }}' \
--branch-reset \
--start-point '${{ github.base_ref }}' \
--start-point-hash '${{ github.event.pull_request.base.sha }}' \
--start-point-clone-thresholds \
--start-point-reset \
--testbed ubuntu-latest \
--adapter json \
--err \
--adapter json \
--github-actions '${{ secrets.GITHUB_TOKEN }}' \
bencher mock
bencher mock
21 changes: 21 additions & 0 deletions .github/workflows/pr_benchmarks_closed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
on:
pull_request:
types: [closed]

jobs:
archive_pr_branch:
name: Archive closed PR branch with Bencher
# DO NOT REMOVE: For handling Fork PRs see Pull Requests from Forks
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
permissions:
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bencherdev/bencher@main
- name: Archive closed PR branch with Bencher
run: |
bencher archive \
--project example \
--token '${{ secrets.BENCHER_API_TOKEN }}' \
--branch '${{ github.head_ref }}'
36 changes: 0 additions & 36 deletions .github/workflows/pr_target_benchmarks.yml

This file was deleted.

12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
The `.github` directory contains example workflows from [how to use Bencher in GitHub Actions](https://bencher.dev/docs/how-to/github-actions/).

- [Benchmark pushes to `main` branch](.github/workflows/base_benchmarks.yml)
- [Benchmark pull requests from branches](.github/workflows/pr_benchmarks.yml)
- Benchmark fork pull requests and upload from default branch
- [Run benchmarks and cache](.github/workflows/run_fork_pr_benchmarks.yml)
- [Track benchmarks](.github/workflows/track_fork_pr_benchmarks.yml)
- [Benchmark fork pull requests with Required Reviewers](.github/workflows/pr_target_benchmarks.yml)
- Benchmark pull requests
- [Run and track benchmarks](.github/workflows/pr_benchmarks.yml)
- [Archive branches for closed pull requests](.github/workflows/pr_benchmarks_closed.yml)
- Benchmark pull requests from forks
- [Run benchmarks](.github/workflows/fork_pr_benchmarks_run.yml)
- [Track benchmarks](.github/workflows/fork_pr_benchmarks_track.yml)
- [Archive branches for closed pull requests from forks](.github/workflows/fork_pr_benchmarks_closed.yml)

0 comments on commit 35acd03

Please sign in to comment.