Update github actions #48
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 | |
on: [push, pull_request] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Install testing framework | |
run: python -m pip install pytest | |
- name: Run pure python tests | |
run: pytest | |
- name: Install Cython | |
run: python -m pip install -r requirements-cython.txt | |
- name: Run pure python tests with Cython installed | |
run: pytest | |
- name: Build the extension | |
run: python setup_cython.py build_ext --inplace --force | |
- name: Run Cythonized library tests | |
run: pytest | |
- name: Run performance test | |
run: python testconfig.py | |
make_sdist: | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Make Sdist | |
run: python setup.py sdist | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: dist/*.tar.gz | |
build_wheels: | |
name: Build wheels on ${{ matrix.os }} | |
needs: test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macOS-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
# Used to host cibuildwheel | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
env: | |
PIP_DISABLE_PIP_VERSION_CHECK: 1 | |
- name: Install cibuildwheel | |
run: python -m pip install cibuildwheel | |
- name: Build wheels | |
run: python -m cibuildwheel --output-dir wheelhouse | |
env: | |
CIBW_BEFORE_BUILD: pip install -r requirements-cython.txt | |
CIBW_SKIP: pp* | |
CIBW_TEST_REQUIRES: pytest | |
CIBW_TEST_COMMAND: pytest {project} | |
CIBW_TEST_SKIP: "cp38-macosx_*:arm64" | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: ./wheelhouse/*.whl | |
# upload_all: | |
# needs: [ build_wheels, make_sdist ] | |
# runs-on: ubuntu-latest | |
# if: github.event_name == 'release' && github.event.action == 'published' | |
# steps: | |
# - uses: actions/download-artifact@v3 | |
# with: | |
# name: artifact | |
# path: dist | |
# | |
# - uses: pypa/[email protected] | |
# with: | |
# user: __token__ | |
# password: ${{ secrets.pypi_password }} |