Skip to content

Commit

Permalink
Add benchmark test action
Browse files Browse the repository at this point in the history
Signed-off-by: Johannes Mueller <[email protected]>
  • Loading branch information
johannes-mueller committed Oct 1, 2024
1 parent 766441c commit c70bf6a
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 1 deletion.
62 changes: 62 additions & 0 deletions .github/workflows/wheelbuild-benchmark-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Build wheels and perform benchmarks

on:
pull_request:
branches: [develop, master]

env:
CIBW_BUILD: cp37-* cp38-* cp39-* cp310-* cp311-* cp312-*
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_MANYLINUX_I686_IMAGE: manylinux2014

jobs:
build_wheels:
name: Build wheels on for various systems
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest] #, windows-latest]

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.12'

- name: Build wheels
run: |
pip wheel --no-deps -w dist .
- uses: actions/upload-artifact@v4
with:
name: wheel
path: dist/

benchmark:
name: Benchmark tests
needs: [build_wheels]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/download-artifact@v4
with:
name: wheel
path: dist/
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.12'
- name: Install wheel
run: pip install $(ls -1 dist/*.whl)
- name: Install pytest
run: pip install pytest pytest-cov
- name: Generate test signal
run: python benchmarks/generate_time_signal.py
- name: Run benchmarks
run: pytest --no-cov -rP benchmarks
2 changes: 1 addition & 1 deletion tools/odbclient/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[build-system]
# AVOID CHANGING REQUIRES: IT WILL BE UPDATED BY PYSCAFFOLD!
requires = ["setuptools>=46.1.0", "setuptools_scm[toml]>=5", "wheel"]
requires = ["setuptools>=46.1.0", "setuptools_scm[toml]>=5", "wheel", "cython"]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
Expand Down

0 comments on commit c70bf6a

Please sign in to comment.