Add benchmark test action #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: Install cibuildwheel | ||
run: pip install -U cibuildwheel | ||
- name: Build wheels | ||
run: | | ||
python -m cibuildwheel --output-dir dist | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: wheels | ||
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: wheels | ||
path .dist/ | ||
- uses: actions/setup-python@v4 | ||
name: Install Python | ||
with: | ||
python-version: '3.12' | ||
- name: Install wheel | ||
run: pip install dist/*.whl | ||
- name: Install pytest | ||
run: pip install pytest | ||
- name: Run benchmarks | ||
run: pytest benchmarks |