feat: support sgl-kernel PyPI (#2433)

Co-authored-by: Zhangyi <1109276519@qq.com>
This commit is contained in:
Yineng Zhang
2024-12-11 06:06:19 +08:00
committed by GitHub
parent 2b340adfb1
commit 56fcd8e8a5
4 changed files with 97 additions and 10 deletions

View File

@@ -0,0 +1,37 @@
name: Release SGLang Kernel to PyPI
on:
push:
branches:
- main
paths:
- sgl-kernel/pyproject.toml
workflow_dispatch:
jobs:
build-wheels:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12']
cuda-version: ['11.8', '12.1', '12.4']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Build wheels for Python ${{ matrix.python-version }} and CUDA ${{ matrix.cuda-version }}
run: |
cd sgl-kernel
chmod +x ./build.sh
./build.sh "${{ matrix.python-version }}" "${{ matrix.cuda-version }}"
- name: Upload to pypi
working-directory: sgl-kernel
run: |
pip install twine
python3 -m twine upload dist/* -u __token__ -p ${{ secrets.PYPI_TOKEN }}