diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml new file mode 100644 index 0000000..3d44958 --- /dev/null +++ b/.github/workflows/wheels.yml @@ -0,0 +1,15 @@ +name: wheels + +on: [push, pull_request] + +jobs: + wheels: + runs-on: ubuntu-latest + strategy: + matrix: + image: ["manylinux_2_28_x86_64"] + python_version: [ {cp: cp39-cp39, py: 39}, {cp: cp310-cp310, py: 3.10}, {cp: cp311-cp311, py: 3.11}, {cp: cp312-cp312, py: 3.12} ] + steps: + - uses: actions/checkout@v4 + - name: Building wheel + run: docker run -e PYPATH=/opt/python/${{ matrix.python_version.cp }} -e PYTHON_VERSION=${{ matrix.python_version.py }} --rm -v `pwd`:/project quay.io/pypa/${{ matrix.image }} /project/scripts/build-manylinux-wheel.sh diff --git a/scripts/build-manylinux-wheel.sh b/scripts/build-manylinux-wheel.sh new file mode 100755 index 0000000..c29ffc9 --- /dev/null +++ b/scripts/build-manylinux-wheel.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +set -ex + +if [ -x /usr/bin/yum ]; then + yum install -y python${PYTHON_VERSION}-devel.x86_64 clang libffi-devel eigen3-devel +fi + +if [ -e /tmp/wheels ]; then + echo "/tmp/wheels should not exist!" + exit 1 +fi + +mkdir -p /tmp/wheels + +${PYPATH}/bin/python -m pip wheel -v /project -w /tmp/wheels --no-deps +wheel=$(ls /tmp/wheels/*.whl) + +# Apply fixups. +auditwheel repair ${wheel} -w /project/dist