-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
75 additions
and
52 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Bencher | ||
|
||
on: | ||
pull_request: | ||
types: [opened, reopened, edited, synchronize] | ||
|
||
jobs: | ||
benchmark_pr_branch: | ||
name: Continuous Benchmarking PRs 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: Track PR Benchmarks with Bencher | ||
run: | | ||
bencher run \ | ||
--project geom2d \ | ||
--token '${{ secrets.BENCHER_TOKEN }}' \ | ||
--branch "$GITHUB_HEAD_REF" \ | ||
--start-point "$GITHUB_BASE_REF" \ | ||
--start-point-hash '${{ github.event.pull_request.base.sha }}' \ | ||
--start-point-clone-thresholds \ | ||
--start-point-reset \ | ||
--testbed ubuntu-latest \ | ||
--err \ | ||
--adapter go_bench "go test -bench ." \ | ||
--github-actions '${{ secrets.GITHUB_TOKEN }}' \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Bencher (on push to main) | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
benchmark_base_branch: | ||
name: Bencher (on push to main) | ||
permissions: | ||
checks: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
# Checkout repo | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
# Setup Go with caching | ||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
cache: 'true' | ||
cache-dependency-path: ./go.sum | ||
check-latest: 'true' | ||
go-version-file: ./go.mod | ||
|
||
# Install bencher | ||
- uses: bencherdev/bencher@main | ||
- name: Track base branch benchmarks with Bencher | ||
run: | | ||
bencher run \ | ||
--project geom2d \ | ||
--token '${{ secrets.BENCHER_TOKEN }}' \ | ||
--branch main \ | ||
--testbed ubuntu-latest \ | ||
--threshold-measure latency \ | ||
--threshold-test t_test \ | ||
--threshold-max-sample-size 64 \ | ||
--threshold-upper-boundary 0.99 \ | ||
--thresholds-reset \ | ||
--err \ | ||
--adapter go_bench "go test -bench ." \ | ||
--github-actions '${{ secrets.GITHUB_TOKEN }}' |