Skip to content

Commit

Permalink
sync benchmarks with upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
skshetry committed Aug 21, 2024
1 parent e3b4af9 commit 26361fb
Showing 1 changed file with 29 additions and 9 deletions.
38 changes: 29 additions & 9 deletions .github/workflows/benchmarks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,43 +38,63 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
pyv: ["3.10"]
pyv: ["3.12"]

steps:
- uses: iterative/setup-cml@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
path: dvc-s3

- uses: actions/checkout@v4
with:
fetch-depth: 0
repository: iterative/dvc
path: dvc

- uses: actions/checkout@v4
with:
fetch-depth: 0
repository: iterative/dvc-bench
path: dvc-bench

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.pyv }}
cache: 'pip'
cache-dependency-path: setup.cfg
cache-dependency-path: |
pyproject.toml
dvc/pyproject.toml
- name: install
run: |
pip install --upgrade pip wheel
pip install -e ".[tests]"
pip install "dvc[testing] @ git+https://github.com/iterative/dvc"
run: pip install -e "./dvc[testing]" -e "./dvc-s3[tests]"

- name: run benchmarks
timeout-minutes: 180
run: pytest --dist no --benchmark-save benchmarks-s3 --benchmark-group-by func --dvc-revs main,3.10.0,2.58.2 --dataset ${DATASET} dvc_s3/tests/benchmarks.py --dvc-install-deps s3
working-directory: dvc-s3/
run: >
pytest --benchmark-save benchmarks-s3 --benchmark-group-by func
dvc_s3/tests/benchmarks.py
--dvc-revs main,3.10.0,2.58.2
--dataset ${DATASET}
--dvc-install-deps s3
--dvc-bench-repo ../dvc-bench --dvc-repo ../dvc
- name: upload raw results
uses: actions/upload-artifact@v4
with:
name: .benchmarks
path: .benchmarks
path: dvc-s3/.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
PY_COLORS=0 pytest-benchmark compare --group-by func --sort name >> report.md
echo '```' >> report.md
cml comment create report.md
working-directory: dvc-s3

0 comments on commit 26361fb

Please sign in to comment.