From bfa3c7f3aae9bec581de05da641e547a0b840eff Mon Sep 17 00:00:00 2001 From: Joshua Klein Date: Mon, 20 May 2024 21:47:48 -0400 Subject: [PATCH] wheel-build-test --- .github/workflows/test-wheels.yaml | 54 ++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/test-wheels.yaml diff --git a/.github/workflows/test-wheels.yaml b/.github/workflows/test-wheels.yaml new file mode 100644 index 0000000..c469d05 --- /dev/null +++ b/.github/workflows/test-wheels.yaml @@ -0,0 +1,54 @@ +# This workflow will install Python dependencies, run tests and lint with a variety of Python versions +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions + +name: Test Build Wheels + +on: [push] + +jobs: + build-wheels: + if: ${{ contains(github.event.head_commit.message, 'wheel-build-test') }} + name: Build wheels on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + python-version: ['3.10'] + os: [ubuntu-latest, windows-latest, mac-latest] + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + pip install --upgrade pip setuptools wheel + pip install coverage pytest pytest-cov -U + pip install Cython + pip install -r requirements.txt + pip install . + - name: Test with pytest + run: | + make test + - name: Build source distributions + run: | + python setup.py build sdist + - name: Install cibuildwheel + run: python -m pip install cibuildwheel + - name: Build wheels + run: python -m cibuildwheel --output-dir dist/ + env: + CIBW_BUILD: "cp38* cp39* cp310* cp311*" + CIBW_SKIP: "*_i686 *win32 *musllinux* pp*" + CIBW_MANYLINUX_X86_64_IMAGE: "manylinux2014" + CIBW_TEST_REQUIRES: "pytest" + CIBW_BUILD_VERBOSITY: 5 + CIBW_ARCHS: "auto" + - name: Upload Distributions + uses: actions/upload-artifact@v3 + with: + name: dist + path: | + dist/*.whl + dist/*.tar.gz + retention-days: 1