Unverified Commit 67a7d1f6 authored by Lianmin Zheng's avatar Lianmin Zheng Committed by GitHub
Browse files

Create cancel-all-pr-test-runs (#8986)

parent 92cbef59
name: Cancel All Pending PR Test Runs
on:
workflow_dispatch: # Manual trigger
jobs:
cancel-pending:
runs-on: ubuntu-latest
steps:
- name: Install GitHub CLI
run: apt-get install -y gh jq
- name: Authenticate GitHub CLI
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh auth login --with-token <<< "$GH_TOKEN"
- name: Cancel all pending/waiting pr-test.yml runs
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO: ${{ github.repository }}
run: |
# Get all pending or waiting runs of pr-test.yml across all branches
gh run list \
--workflow pr-test.yml \
--json databaseId,status,conclusion \
--limit 1000 \
| jq -r '.[] | select(.status=="queued" or .status=="in_progress") | .databaseId' \
| while read run_id; do
echo "Cancelling run ID: $run_id"
gh run cancel "$run_id"
done
...@@ -323,7 +323,7 @@ jobs: ...@@ -323,7 +323,7 @@ jobs:
docker exec -w /sglang-checkout/sgl-kernel/tests ci_sglang python3 -m pytest test_moe_topk_softmax.py docker exec -w /sglang-checkout/sgl-kernel/tests ci_sglang python3 -m pytest test_moe_topk_softmax.py
docker exec -w /sglang-checkout/sgl-kernel/tests/speculative ci_sglang python3 -m pytest test_eagle_utils.py docker exec -w /sglang-checkout/sgl-kernel/tests/speculative ci_sglang python3 -m pytest test_eagle_utils.py
finish: pr-test-amd-finish:
if: always() if: always()
needs: [ needs: [
accuracy-test-1-gpu-amd, mla-test-1-gpu-amd, bench-test-2-gpu-amd, accuracy-test-1-gpu-amd, mla-test-1-gpu-amd, bench-test-2-gpu-amd,
......
...@@ -109,7 +109,7 @@ jobs: ...@@ -109,7 +109,7 @@ jobs:
cd test/srt cd test/srt
python3 run_suite.py --suite per-commit-4-ascend-npu --timeout-per-file 3600 python3 run_suite.py --suite per-commit-4-ascend-npu --timeout-per-file 3600
finish: pr-test-npu-finish:
if: always() if: always()
needs: needs:
- per-commit-1-ascend-npu - per-commit-1-ascend-npu
......
name: PR Test (Xeon) name: PR Test (Xeon)
on: on:
push:
branches: [ main ]
paths:
- "python/**"
- "scripts/**"
- "test/**"
- "sgl-kernel/**"
- ".github/workflows/pr-test-xeon.yml"
pull_request: pull_request:
branches: branches: [ main ]
- main paths:
- "python/**"
- "scripts/**"
- "test/**"
- "sgl-kernel/**"
- ".github/workflows/pr-test-xeon.yml"
workflow_dispatch: workflow_dispatch:
concurrency: concurrency:
group: pr-test-xeon group: pr-test-xeon-${{ github.ref }}
cancel-in-progress: false cancel-in-progress: false
jobs: jobs:
build-test: build-test:
if: github.event_name == 'pull_request' if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') &&
github.event.pull_request.draft == false
runs-on: sglang-pvc runs-on: sglang-pvc
strategy: strategy:
matrix: matrix:
...@@ -34,16 +49,15 @@ jobs: ...@@ -34,16 +49,15 @@ jobs:
--name ci_sglang_xeon \ --name ci_sglang_xeon \
sglang_xeon sglang_xeon
- name: Install Dependency - name: Install dependencies
timeout-minutes: 20 timeout-minutes: 20
run: | run: |
docker exec ci_sglang_xeon bash -c "python3 -m pip install --upgrade pip" docker exec ci_sglang_xeon bash -c "python3 -m pip install --upgrade pip"
docker exec ci_sglang_xeon pip uninstall sgl-kernel -y || true docker exec ci_sglang_xeon pip uninstall sgl-kernel -y || true
docker exec -w /sglang-checkout/sgl-kernel ci_sglang_xeon bash -c "cp pyproject_cpu.toml pyproject.toml && pip install -v ." docker exec -w /sglang-checkout/sgl-kernel ci_sglang_xeon bash -c "cp pyproject_cpu.toml pyproject.toml && pip install -v ."
docker exec -w /sglang-checkout/ ci_sglang_xeon bash -c "pip install -e "python[all_cpu]"" docker exec -w /sglang-checkout/ ci_sglang_xeon bash -c "pip install -e "python[dev_cpu]""
docker exec ci_sglang_xeon bash -c "python3 -m pip install pytest expecttest"
- name: Check AMX Support - name: Check AMX support
id: check_amx id: check_amx
timeout-minutes: 5 timeout-minutes: 5
run: | run: |
...@@ -51,7 +65,7 @@ jobs: ...@@ -51,7 +65,7 @@ jobs:
bash -c "python3 -c 'import torch; import sgl_kernel; assert torch._C._cpu._is_amx_tile_supported(); assert hasattr(torch.ops.sgl_kernel, \"convert_weight_packed\"); '" bash -c "python3 -c 'import torch; import sgl_kernel; assert torch._C._cpu._is_amx_tile_supported(); assert hasattr(torch.ops.sgl_kernel, \"convert_weight_packed\"); '"
continue-on-error: true continue-on-error: true
- name: Run UT Cases - name: Run unit tests
if: steps.check_amx.outcome == 'success' if: steps.check_amx.outcome == 'success'
timeout-minutes: 20 timeout-minutes: 20
run: | run: |
...@@ -63,10 +77,10 @@ jobs: ...@@ -63,10 +77,10 @@ jobs:
run: | run: |
docker rm -f ci_sglang_xeon || true docker rm -f ci_sglang_xeon || true
finish: pr-test-xeon-finish:
if: always() if: always()
needs: [build-test] needs: [build-test]
runs-on: ubuntu-24.04 runs-on: ubuntu-latest
steps: steps:
- name: Check all dependent job statuses - name: Check all dependent job statuses
run: | run: |
......
...@@ -105,6 +105,7 @@ torch_memory_saver = ["torch_memory_saver>=0.0.8"] ...@@ -105,6 +105,7 @@ torch_memory_saver = ["torch_memory_saver>=0.0.8"]
decord = ["decord"] decord = ["decord"]
test = [ test = [
"accelerate", "accelerate",
"expecttest",
"jsonlines", "jsonlines",
"matplotlib", "matplotlib",
"pandas", "pandas",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment