Skip to content

ci: release whls

ci: release whls #10

Workflow file for this run

name: Wheel Build
on:
workflow_dispatch:
push:
branches:
- ci
jobs:
build-wheel:
name: Build (PyTorch ${{ matrix.torch_version }}, CUDA ${{ matrix.cuda_tag }})
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
include:
- torch_version: "2.10.0"
cuda_version: "13.0.0"
cuda_tag: "cu130"
- torch_version: "2.9.1"
cuda_version: "13.0.0"
cuda_tag: "cu130"
- torch_version: "2.9.1"
cuda_version: "12.8.1"
cuda_tag: "cu128"
- torch_version: "2.8.0"
cuda_version: "12.9.1"
cuda_tag: "cu129"
- torch_version: "2.8.0"
cuda_version: "12.8.1"
cuda_tag: "cu128"
- torch_version: "2.7.1"
cuda_version: "12.8.1"
cuda_tag: "cu128"
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install CUDA ${{ matrix.cuda_version }}
uses: Jimver/cuda-toolkit@v0.2.26
id: cuda-toolkit
with:
cuda: "${{ matrix.cuda_version }}"
linux-local-args: '["--toolkit"]'
method: "network"
- name: Install PyTorch & Build Dependencies
run: |
pip install --upgrade pip
pip install setuptools==68.0.0 ninja packaging wheel
pip install torch==${{ matrix.torch_version }} --index-url https://download.pytorch.org/whl/${{ matrix.cuda_tag }}
- name: Build Wheel
env:
MAX_JOBS: 2
TORCH_CUDA_ARCH_LIST: "8.0 9.0"
run: |
export PATH=/usr/local/cuda/bin:$PATH
LOCAL_TAG="+${{ matrix.cuda_tag }}torch${{ matrix.torch_version }}"
timeout 5h python setup.py egg_info --tag-build="$LOCAL_TAG" bdist_wheel --dist-dir=dist
ls -lh dist/
- name: Upload Wheel Artifact
uses: actions/upload-artifact@v4
with:
name: lrnnx-wheel-torch${{ matrix.torch_version }}-${{ matrix.cuda_tag }}
path: dist/*.whl
retention-days: 7
release-wheels:
name: Upload to Existing Release
runs-on: ubuntu-22.04
needs: build-wheel
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download all built wheels
uses: actions/download-artifact@v4
with:
pattern: lrnnx-wheel-*
path: dist
merge-multiple: true
- name: Publish to GitHub Release 1.0.0.post1
uses: softprops/action-gh-release@v2
with:
tag_name: "1.0.0.post1"
files: dist/*.whl