-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (42 loc) · 1.53 KB
/
benchmark.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
name: cml
on:
push:
jobs:
benchmark:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
- uses: actions/setup-node@v1
with:
node-version: '16'
- uses: iterative/setup-cml@v1
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Install package
run: |
poetry install --no-interaction
- name: Run pytest
run: |
poetry run python --version
poetry run pytest --benchmark-histogram benchmark -m benchmark
- name: Create report
env:
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo '# Benchmark' >> report.md
echo '## Write: Varying number of images' >> report.md
echo '![](./benchmark-write-count.svg "Write benchmark, varying count")' >> report.md
echo '## Write: Varying number of atoms' >> report.md
echo '![](./benchmark-write-size.svg "Write benchmark, varying size")' >> report.md
echo '## Read: Varying number of images' >> report.md
echo '![](./benchmark-read-count.svg "Read benchmark, varying count")' >> report.md
echo '## Read: Varying number of atoms' >> report.md
echo '![](./benchmark-read-size.svg "Read benchmark, varying size")' >> report.md
cml comment update report.md