-
Notifications
You must be signed in to change notification settings - Fork 342
36 lines (35 loc) · 1.23 KB
/
benchmark_pr.yml
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
on:
pull_request:
types: [opened, reopened, edited, synchronize]
jobs:
benchmark_pr_branch:
name: Continuous Benchmarking PRs 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-22.04
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: '3.9'
- uses: actions/cache@v2
with:
path: .venv
key: poetry-${{ hashFiles('poetry.lock') }}
- uses: bencherdev/bencher@main
- name: Track PR Benchmarks
run: |
. scripts/ci_install_deps
bencher run \
--project pyquil \
--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 }}' \
--testbed ci-runner-linux \
--err \
--github-actions '${{ secrets.GITHUB_TOKEN }}' \
--file results.json \
poetry run pytest --benchmark-json results.json test/benchmarks