forked from sgl-project/sglang
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'sgl-project:main' into main
- Loading branch information
Showing
89 changed files
with
4,188 additions
and
1,811 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
# Reference: https://github.com/openai/tiktoken/blob/63527649963def8c759b0f91f2eb69a40934e468/.github/workflows/build_wheels.yml#L1 | ||
|
||
name: Release SGLang Router to PyPI | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
name: Build on ${{ matrix.os }} (${{ matrix.target }}) | ||
runs-on: ${{ matrix.os }}-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- os: ubuntu | ||
target: x86_64 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
path: sglang-repo | ||
|
||
- name: Move rust folder to root and delete sglang-repo | ||
run: | | ||
mv sglang-repo/rust/* . | ||
rm -rf sglang-repo | ||
ls -alt | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11" | ||
|
||
- name: Install build dependencies | ||
run: | | ||
python -m pip install -U pip | ||
python -m pip install build twine auditwheel | ||
- name: Build package | ||
uses: pypa/[email protected] | ||
env: | ||
CIBW_BUILD: "cp38-manylinux_x86_64 cp39-manylinux_x86_64 cp310-manylinux_x86_64 cp311-manylinux_x86_64 cp312-manylinux_x86_64" | ||
CIBW_BEFORE_ALL: | | ||
yum update && yum install -y openssl-devel && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | ||
CIBW_ENVIRONMENT: "PATH=$HOME/.cargo/bin:$PATH" | ||
|
||
- name: List built packages | ||
run: ls -lh wheelhouse/ | ||
|
||
- name: Check packages | ||
run: twine check --strict wheelhouse/* | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: packages-${{ matrix.os }}-${{ matrix.target }} | ||
path: wheelhouse/ | ||
|
||
build-sdist: | ||
name: Build SDist | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
path: sglang-repo | ||
|
||
- name: Move rust folder to root and delete sglang-repo | ||
run: | | ||
mv sglang-repo/rust/* . | ||
rm -rf sglang-repo | ||
ls -alt | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11" | ||
|
||
- name: Build SDist | ||
run: | | ||
pip install build | ||
python -m build --sdist | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: sdist | ||
path: dist/*.tar.gz | ||
|
||
upload: | ||
name: Upload to PyPI | ||
needs: [build, build-sdist] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
path: dist | ||
merge-multiple: true | ||
|
||
- name: Upload to PyPI | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN_ROUTER }} | ||
run: | | ||
pip install twine | ||
twine upload dist/* --verbose |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.