Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: build-wheels

on:
push:
tags:
- 'v**'

jobs:
build-and-deploy-linux:
name: Build wheels (manylinux) – ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12"]
services:
docker:
image: docker:20.10.16
options: --privileged
env:
CIBW_BUILD: "cp312-manylinux_x86_64"
CIBW_BEFORE_ALL: >
yum install -y openblas-devel
CIBW_BEFORE_BUILD: >
pip install torch==2.7.1 torchvision==0.22.1 torchaudio==2.7.1 --index-url https://download.pytorch.org/whl/cpu
&& pip install -r requirements.txt
CIBW_MANYLINUX_X86_64_IMAGE: "quay.io/pypa/manylinux2014_x86_64"
CIBW_REPAIR_WHEEL_COMMAND: >
auditwheel repair -w {dest_dir} {wheel} --exclude libtorch_python.so
steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Pull manylinux image
run: docker pull $CIBW_MANYLINUX_X86_64_IMAGE

- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.23.3

- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse

- name: Upload wheels (per version)
uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.python-version }}
path: wheelhouse/*.whl