-
-
Notifications
You must be signed in to change notification settings - Fork 144
79 lines (65 loc) · 1.9 KB
/
asv.yaml
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: benchmarks
on:
push:
branches:
- master
jobs:
benchmarks:
name: Run benchmarks
runs-on: ubuntu-latest
steps:
- name: Check out mitiq
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Run benchmarks
run: |
pip install asv virtualenv
asv machine --machine ghrunner
asv run --attribute rounds=4
cp asv.conf.json results
- name: Upload benchmark results results
uses: actions/upload-artifact@v3
with:
name: asv_new_results
path: results
publish-results:
name: Publish benchmark results
needs: benchmarks
runs-on: ubuntu-latest
steps:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install ASV
run: pip install asv
- name: Checkout mitiq-bench repo
uses: actions/checkout@v3
with:
repository: unitaryfund/mitiq-bench
token: ${{ secrets.BENCH_PAT }}
- name: Download benchmark data
uses: actions/download-artifact@v3
with:
name: asv_new_results
path: new_results
- name: Move data to correct location
run: |
cp -vr new_results/* results
mv results/asv.conf.json .
- name: Push new data to benchmark repo
uses: EndBug/add-and-commit@v9
with:
add: "['results', 'asv.conf.json']"
default_author: github_actions
message: new benchmark data
- name: Publish results
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
asv publish
git fetch origin gh-pages:gh-pages
asv gh-pages