[CI] Support CPU stage and auto-batch same-stage files in /rerun-test (#22081)
This commit is contained in:
@@ -5,7 +5,7 @@ on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
test_command:
|
||||
description: "Test command to run (e.g. 'registered/core/test_srt_endpoint.py TestSRTEndpoint.test_simple_decode')"
|
||||
description: "Test command(s) to run, one per line (e.g. 'registered/core/test_srt_endpoint.py TestSRTEndpoint.test_simple_decode')"
|
||||
required: true
|
||||
type: string
|
||||
runner_label:
|
||||
@@ -22,6 +22,7 @@ on:
|
||||
- 8-gpu-h200
|
||||
- 8-gpu-h20
|
||||
- 8-gpu-b200
|
||||
- ubuntu-latest
|
||||
pr_head_sha:
|
||||
description: "PR head SHA to checkout (for /rerun-test on fork PRs)"
|
||||
required: false
|
||||
@@ -32,6 +33,11 @@ on:
|
||||
required: false
|
||||
type: string
|
||||
default: "false"
|
||||
is_cpu:
|
||||
description: "Run as CPU-only test (uses ubuntu-latest with uv pip install)"
|
||||
required: false
|
||||
type: string
|
||||
default: "false"
|
||||
|
||||
env:
|
||||
SGLANG_IS_IN_CI: true
|
||||
@@ -45,6 +51,7 @@ permissions:
|
||||
|
||||
jobs:
|
||||
rerun-test-cuda:
|
||||
if: inputs.is_cpu != 'true'
|
||||
runs-on: ${{ inputs.runner_label }}
|
||||
timeout-minutes: 120
|
||||
env:
|
||||
@@ -77,7 +84,53 @@ jobs:
|
||||
source /etc/profile.d/sglang-ci.sh
|
||||
fi
|
||||
cd test/
|
||||
python3 ${{ inputs.test_command }}
|
||||
echo "${{ inputs.test_command }}" | while IFS= read -r cmd; do
|
||||
[ -z "$cmd" ] && continue
|
||||
echo ">>> Running: python3 $cmd"
|
||||
python3 $cmd || exit 1
|
||||
done
|
||||
|
||||
- uses: ./.github/actions/upload-cuda-coredumps
|
||||
if: always()
|
||||
|
||||
rerun-test-cpu:
|
||||
if: inputs.is_cpu == 'true'
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 120
|
||||
steps:
|
||||
- name: Free disk space
|
||||
run: |
|
||||
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc
|
||||
df -h
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ inputs.pr_head_sha || github.sha }}
|
||||
|
||||
- uses: ./.github/actions/check-maintenance
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.10'
|
||||
|
||||
- name: Install uv
|
||||
uses: astral-sh/setup-uv@v5
|
||||
|
||||
- name: Install dependencies
|
||||
timeout-minutes: 20
|
||||
env:
|
||||
UV_SYSTEM_PYTHON: "1"
|
||||
run: |
|
||||
uv pip install -e "python[dev]" --index-strategy unsafe-best-match --prerelease allow
|
||||
|
||||
- name: Run test
|
||||
timeout-minutes: 60
|
||||
run: |
|
||||
cd test/
|
||||
echo "${{ inputs.test_command }}" | while IFS= read -r cmd; do
|
||||
[ -z "$cmd" ] && continue
|
||||
echo ">>> Running: python3 $cmd"
|
||||
python3 $cmd || exit 1
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user