-
Notifications
You must be signed in to change notification settings - Fork 8
82 lines (71 loc) · 2.06 KB
/
benchmarks.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
80
81
82
name: Benchmarks
on:
push:
branches: [main]
pull_request:
schedule:
- cron: '5 1 * * *' # every day at 01:05
workflow_dispatch:
inputs:
dataset:
description: "Dataset Size"
required: false
default: "small"
type: choice
options:
- tiny
- small
- large
- mnist
env:
DVC_TEST: "true"
FORCE_COLOR: "1"
DATASET: ${{ github.event.inputs.dataset || ( github.event_name == 'schedule' && 'mnist' || 'small' ) }}
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read
pull-requests: write
jobs:
bench:
timeout-minutes: 45
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
pyv: ["3.10"]
steps:
- uses: iterative/setup-cml@v1
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.pyv }}
cache: 'pip'
cache-dependency-path: setup.cfg
- name: install
run: |
pip install --upgrade pip wheel
pip install -e ".[tests]"
pip install "dvc[testing] @ git+https://github.com/iterative/dvc"
- name: run benchmarks
timeout-minutes: 180
run: pytest --dist no --benchmark-save benchmarks-s3 --benchmark-group-by func --dvc-revs main,2.45.0,2.41.1,2.40.0,2.39.0,2.18.1,2.11.0 --size ${DATASET} dvc_s3/tests/benchmarks.py --dvc-install-deps s3
- name: upload raw results
uses: actions/upload-artifact@v3
with:
name: .benchmarks
path: .benchmarks
- name: create md
env:
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: ${{ github.event_name == 'pull_request' && ! github.event.pull_request.head.repo.fork }}
run: |
echo '```' > report.md
PY_COLORS=0 py.test-benchmark compare --group-by func --sort name >> report.md
echo '```' >> report.md
cml comment create report.md