Skip to content

Commit 999fc55

Browse files
committed
test pyperformance
1 parent 749fc80 commit 999fc55

2 files changed

Lines changed: 21 additions & 8 deletions

File tree

.github/workflows/performance.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ concurrency:
1313

1414
jobs:
1515
perf-import:
16+
if: false
1617
runs-on: ${{ matrix.os }}
1718
strategy:
1819
fail-fast: false
@@ -28,7 +29,7 @@ jobs:
2829
- name: Install dependencies
2930
run: |
3031
python -m pip install --upgrade pip
31-
python -m pip install nox pyperf
32+
python -m pip install nox
3233
- name: Perf importing third-party packages
3334
continue-on-error: true
3435
env:
@@ -73,18 +74,28 @@ jobs:
7374
if: false
7475
runs-on: ${{ matrix.os }}
7576
strategy:
77+
fail-fast: false
7678
matrix:
79+
python: [ '3.8', '3.9', '3.10', '3.11', '3.12' ]
7780
os: [ ubuntu-latest, macOS-latest, windows-latest ]
7881

7982
steps:
8083
- uses: actions/checkout@v4
81-
- uses: s-weigand/setup-conda@v1
84+
- name: Set up Python ${{ matrix.python }}
85+
uses: actions/setup-python@v4
8286
with:
83-
conda-channels: conda-forge
87+
python-version: ${{ matrix.python }}
8488
- name: Install dependencies
8589
run: |
8690
python -m pip install --upgrade pip
87-
python -m pip install nox pyperf
91+
python -m pip install nox
8892
- name: Pyperformance tests against cds
93+
continue-on-error: true
94+
env:
95+
RUN: LONG
8996
run: |
90-
sh scripts/pyperformance.sh
97+
nox -s pyperformance
98+
- uses: actions/upload-artifact@v3
99+
with:
100+
name: pyperformance
101+
path: "*.json"

noxfile.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"""
44
import os
55
import platform
6+
import shutil
67
import typing as t
78

89
import nox
@@ -201,7 +202,8 @@ def test_import_third_party_perf(session: nox.Session, package):
201202
ci_session_cleanup()
202203

203204

204-
def _pyperformance(session: nox.Session, pyperformance_cmd=None):
205+
@nox.session(venv_backend='venv')
206+
def pyperformance(session: nox.Session, pyperformance_cmd=None):
205207
session.install(CDS_PYPERFORMANCE)
206208

207209
configs = [
@@ -224,9 +226,9 @@ def _pyperformance(session: nox.Session, pyperformance_cmd=None):
224226
cmd_exc = None
225227
for out, args in configs:
226228
if os.path.exists(out):
227-
session.run('mv', out, out + '.old')
229+
shutil.move(out, out + '.old')
228230
try:
229-
session.run(*(pyperformance_cmd + args), f'--out={out}')
231+
session.run(*(pyperformance_cmd + args), f'--out={repr(out)}')
230232
except CommandFailed as e:
231233
if cmd_exc is None:
232234
cmd_exc = e

0 commit comments

Comments
 (0)