[router] remove main.rs because only lib.rs is used for py binding #206
Workflow file for this run
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
name: PR Test (Rust) | |
on: | |
push: | |
branches: [ main ] | |
paths: | |
- "rust/**" | |
pull_request: | |
branches: [ main ] | |
paths: | |
- "rust/**" | |
workflow_dispatch: | |
concurrency: | |
group: pr-test-rust-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
unit-test-rust: | |
if: github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: | | |
bash scripts/ci_install_rust.sh | |
- name: Run fmt | |
run: | | |
source "$HOME/.cargo/env" | |
cd rust/ | |
cargo fmt -- --check | |
- name: Run test | |
timeout-minutes: 20 | |
run: | | |
source "$HOME/.cargo/env" | |
cd rust/ | |
cargo test | |
e2e-rust: | |
if: github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request' | |
runs-on: 2-gpu-runner | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install rust dependencies | |
run: | | |
bash scripts/ci_install_rust.sh | |
- name: Build python binding | |
run: | | |
source "$HOME/.cargo/env" | |
cd rust | |
pip install setuptools-rust wheel build | |
python3 -m build | |
pip install --force-reinstall dist/*.whl | |
- name: Run e2e test | |
run: | | |
cd rust/py_test | |
python3 run_suite.py | |
finish: | |
needs: [unit-test-rust, e2e-rust] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Finish | |
run: echo "This is an empty step to ensure that all jobs are completed." |