-
Notifications
You must be signed in to change notification settings - Fork 1k
58 lines (50 loc) · 1.47 KB
/
release-pypi-kernel.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Release SGLang Kernel to PyPI
on:
workflow_dispatch:
inputs:
tag_name:
required: true
type: string
jobs:
build-wheels:
if: github.repository == 'sgl-project/sglang'
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12']
cuda-version: ['11.8']
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- 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 artifacts
uses: actions/upload-artifact@v4
with:
name: wheel-python${{ matrix.python-version }}-cuda${{ matrix.cuda-version }}
path: dist/*
release:
needs: build-wheels
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: dist/
merge-multiple: true
pattern: wheel-*
- name: Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ inputs.tag_name }}
repository: sgl-project/whl
files: |
dist/*