Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,9 @@ jobs:
- name: Test with pytest
run: |
spin test -- --doctest-modules
- name: Smoke test benchmarks
# Runs a single benchmark in asv dry-run mode so that CI catches
# future incompatibilities between spin bench, spin and asv.
run: |
asv machine --yes
spin bench --quick
6 changes: 5 additions & 1 deletion .spin/cmds.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,16 @@
@click.command()
@click.option('--tests', '-t', multiple=True,
help='Select benchmarks by name or regular expression.')
@click.option('--quick', '-q', is_flag=True, default=False,
help="Run each benchmark only once (timings won't be accurate).")
@meson.build_dir_option
@click.pass_context
def bench(ctx, tests, build_dir):
def bench(ctx, tests, quick, build_dir):
"""Run benchmarks against the local build without saving results."""
args = [sys.executable, '-m', 'asv', 'run', '--python=same',
'--dry-run', '--show-stderr']
if quick:
args.append('--quick')
for test in tests:
args.extend(['--bench', test])
ctx.invoke(meson.build, build_dir=build_dir)
Expand Down
Loading