[router] fix router release workflow and add build test in PR (#12315)
This commit is contained in:
6
.github/workflows/nightly-release-router.yml
vendored
6
.github/workflows/nightly-release-router.yml
vendored
@@ -25,10 +25,10 @@ jobs:
|
||||
ls: dir
|
||||
target: x86_64
|
||||
python-architecture: x64
|
||||
interpreter: 3.8 3.9 3.10 3.11 3.12 3.13
|
||||
interpreter: 3.9 3.10 3.11 3.12 3.13
|
||||
- os: macos
|
||||
target: aarch64
|
||||
interpreter: 3.8 3.9 3.10 3.11 3.12 3.13
|
||||
interpreter: 3.9 3.10 3.11 3.12 3.13
|
||||
- os: ubuntu
|
||||
platform: linux
|
||||
target: aarch64
|
||||
@@ -94,7 +94,7 @@ jobs:
|
||||
with:
|
||||
target: ${{ matrix.target }}
|
||||
manylinux: ${{ matrix.manylinux || 'auto' }}
|
||||
args: --release --out dist --interpreter ${{ matrix.interpreter || '3.8 3.9 3.10 3.11 3.12 3.13' }}
|
||||
args: --release --out dist --interpreter ${{ matrix.interpreter || '3.9 3.10 3.11 3.12 3.13 3.14' }}
|
||||
rust-toolchain: stable
|
||||
docker-options: -e CI -e CC_aarch64_unknown_linux_gnu=aarch64-linux-gnu-gcc -e CXX_aarch64_unknown_linux_gnu=aarch64-linux-gnu-g++
|
||||
before-script-linux: |
|
||||
|
||||
4
.github/workflows/pr-test-pd-router.yml
vendored
4
.github/workflows/pr-test-pd-router.yml
vendored
@@ -148,7 +148,9 @@ jobs:
|
||||
source "$HOME/.cargo/env"
|
||||
echo "Building sgl-router..."
|
||||
cd sgl-router
|
||||
cargo build && python3 -m build && pip install --force-reinstall dist/*.whl
|
||||
pip install maturin
|
||||
maturin build --release --out dist
|
||||
pip install --force-reinstall dist/*.whl
|
||||
|
||||
- name: Start disaggregation servers
|
||||
id: start_servers
|
||||
|
||||
59
.github/workflows/pr-test-rust.yml
vendored
59
.github/workflows/pr-test-rust.yml
vendored
@@ -21,6 +21,55 @@ env:
|
||||
SCCACHE_GHA_ENABLED: "true"
|
||||
|
||||
jobs:
|
||||
maturin-build-test:
|
||||
if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'run-ci')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
path: sglang-repo
|
||||
|
||||
- name: Move sgl-router folder to root
|
||||
run: |
|
||||
mv sglang-repo/sgl-router/* .
|
||||
rm -rf sglang-repo
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.13"
|
||||
|
||||
- name: Install protoc and dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y wget unzip gcc g++ perl make
|
||||
cd /tmp
|
||||
wget https://github.com/protocolbuffers/protobuf/releases/download/v32.0/protoc-32.0-linux-x86_64.zip
|
||||
sudo unzip protoc-32.0-linux-x86_64.zip -d /usr/local
|
||||
rm protoc-32.0-linux-x86_64.zip
|
||||
protoc --version
|
||||
|
||||
- name: Configure sccache
|
||||
uses: mozilla-actions/sccache-action@v0.0.9
|
||||
with:
|
||||
version: "v0.10.0"
|
||||
|
||||
- name: Test maturin build
|
||||
uses: PyO3/maturin-action@v1
|
||||
with:
|
||||
args: --release --out dist
|
||||
rust-toolchain: stable
|
||||
sccache: true
|
||||
|
||||
- name: List built wheel
|
||||
run: ls -lh dist/
|
||||
|
||||
- name: Test wheel install
|
||||
run: |
|
||||
pip install dist/*.whl
|
||||
python -c "import sglang_router; print('Python package: OK')"
|
||||
python -c "from sglang_router.sglang_router_rs import Router; print('Rust extension: OK')"
|
||||
python -m sglang_router.launch_router --help > /dev/null && echo "Entry point: OK"
|
||||
unit-test-rust:
|
||||
if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'run-ci')
|
||||
runs-on: ubuntu-latest
|
||||
@@ -116,8 +165,8 @@ jobs:
|
||||
source "$HOME/.cargo/env"
|
||||
export RUSTC_WRAPPER=sccache
|
||||
cd sgl-router
|
||||
pip install setuptools-rust wheel build
|
||||
python3 -m build
|
||||
pip install maturin
|
||||
maturin build --release --out dist
|
||||
pip install --force-reinstall dist/*.whl
|
||||
|
||||
|
||||
@@ -213,8 +262,8 @@ jobs:
|
||||
source "$HOME/.cargo/env"
|
||||
export RUSTC_WRAPPER=sccache
|
||||
cd sgl-router
|
||||
pip install setuptools-rust wheel build
|
||||
python3 -m build
|
||||
pip install maturin
|
||||
maturin build --release --out dist
|
||||
pip install --force-reinstall dist/*.whl
|
||||
|
||||
- name: Run Python E2E response API tests
|
||||
@@ -237,7 +286,7 @@ jobs:
|
||||
|
||||
|
||||
finish:
|
||||
needs: [unit-test-rust, pytest-rust, pytest-rust-2]
|
||||
needs: [maturin-build-test, unit-test-rust, pytest-rust, pytest-rust-2]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Finish
|
||||
|
||||
6
.github/workflows/release-pypi-router.yml
vendored
6
.github/workflows/release-pypi-router.yml
vendored
@@ -25,10 +25,10 @@ jobs:
|
||||
ls: dir
|
||||
target: x86_64
|
||||
python-architecture: x64
|
||||
interpreter: 3.8 3.9 3.10 3.11 3.12 3.13
|
||||
interpreter: 3.9 3.10 3.11 3.12 3.13
|
||||
- os: macos
|
||||
target: aarch64
|
||||
interpreter: 3.8 3.9 3.10 3.11 3.12 3.13
|
||||
interpreter: 3.9 3.10 3.11 3.12 3.13
|
||||
- os: ubuntu
|
||||
platform: linux
|
||||
target: aarch64
|
||||
@@ -79,7 +79,7 @@ jobs:
|
||||
with:
|
||||
target: ${{ matrix.target }}
|
||||
manylinux: ${{ matrix.manylinux || 'auto' }}
|
||||
args: --release --out dist --interpreter ${{ matrix.interpreter || '3.8 3.9 3.10 3.11 3.12 3.13' }}
|
||||
args: --release --out dist --interpreter ${{ matrix.interpreter || '3.9 3.10 3.11 3.12 3.13 3.14' }}
|
||||
rust-toolchain: stable
|
||||
docker-options: -e CI -e CC_aarch64_unknown_linux_gnu=aarch64-linux-gnu-gcc -e CXX_aarch64_unknown_linux_gnu=aarch64-linux-gnu-g++
|
||||
before-script-linux: |
|
||||
|
||||
Reference in New Issue
Block a user