[CI] skip srt rust extension builds for diffusion-only PRs (#40293)

Co-authored-by: Mick Qian <mickqian@users.noreply.github.com>
This commit is contained in:
Mick
2026-09-20 16:33:23 +08:00
committed by GitHub
co-authored by Mick Qian
parent dc002c85fc
commit 414adef060
5 changed files with 163 additions and 45 deletions
@@ -89,6 +89,7 @@ jobs:
- ".github/workflows/pr-gate.yml"
- ".github/actions/**"
- "python/pyproject.toml"
- "python/setup.py"
- "python/sglang/!(multimodal_gen|kernels)/**/!(*.md)"
- "python/sglang/kernels/!(*.md)"
- "python/sglang/kernels/!(aot)/**/!(*.md)"
@@ -9,10 +9,6 @@ on:
sgl_kernel:
required: true
type: string
rust_ext_artifact:
description: 'Artifact of prebuilt Rust extension modules, from rust-ext-build. Empty, or a download that fails, falls back to the cache; a miss there compiles during install.'
type: string
default: ''
runner_config:
required: true
type: string
@@ -107,10 +103,6 @@ jobs:
merge-multiple: true
pattern: wheel-python3.10-cuda*
- uses: ./.github/actions/download-rust-ext
with:
artifact_name: ${{ inputs.rust_ext_artifact }}
- name: Install dependencies
timeout-minutes: 20
run: |
@@ -178,10 +170,6 @@ jobs:
merge-multiple: true
pattern: wheel-python3.10-cuda*
- uses: ./.github/actions/download-rust-ext
with:
artifact_name: ${{ inputs.rust_ext_artifact }}
- name: Install dependencies
timeout-minutes: 20
run: |
@@ -247,10 +235,6 @@ jobs:
merge-multiple: true
pattern: wheel-python3.10-cuda*
- uses: ./.github/actions/download-rust-ext
with:
artifact_name: ${{ inputs.rust_ext_artifact }}
- name: Install dependencies
timeout-minutes: 20
run: |
@@ -313,10 +297,6 @@ jobs:
merge-multiple: true
pattern: wheel-python3.10-cuda*
- uses: ./.github/actions/download-rust-ext
with:
artifact_name: ${{ inputs.rust_ext_artifact }}
- name: Install dependencies
timeout-minutes: 20
run: |
@@ -387,10 +367,6 @@ jobs:
merge-multiple: true
pattern: wheel-python3.10-cuda*
- uses: ./.github/actions/download-rust-ext
with:
artifact_name: ${{ inputs.rust_ext_artifact }}
- name: Install dependencies
timeout-minutes: 20
run: |
@@ -436,10 +412,6 @@ jobs:
merge-multiple: true
pattern: wheel-python3.10-cuda*
- uses: ./.github/actions/download-rust-ext
with:
artifact_name: ${{ inputs.rust_ext_artifact }}
- name: Install dependencies
timeout-minutes: 20
env:
@@ -505,10 +477,6 @@ jobs:
merge-multiple: true
pattern: wheel-python3.10-cuda*
- uses: ./.github/actions/download-rust-ext
with:
artifact_name: ${{ inputs.rust_ext_artifact }}
- name: Install dependencies
timeout-minutes: 20
run: |
+13 -4
View File
@@ -210,8 +210,8 @@ jobs:
# =============================================== Rust extensions ====================================================
# Unlike sgl-kernel, not gated on source changes: the cache key is the source
# hash, so the job always runs but only compiles on a miss.
# diffusion-only PRs do not consume SRT Rust extensions; other runs seed or
# reuse the source-hash cache
rust-ext-build:
needs: [check-changes, call-gate]
# Ungated on the event, unlike the jobs above: a cache entry is visible to
@@ -223,6 +223,11 @@ jobs:
if: |
!cancelled() &&
needs.check-changes.result == 'success' &&
(github.event_name != 'pull_request' ||
needs.check-changes.outputs.multimodal_gen != 'true' ||
needs.check-changes.outputs.main_package == 'true' ||
needs.check-changes.outputs.jit_kernel == 'true' ||
needs.check-changes.outputs.sgl_kernel == 'true') &&
(needs.call-gate.result == 'success' || needs.call-gate.result == 'skipped')
uses: ./.github/workflows/_pr-test-rust-ext-build.yml
with:
@@ -240,6 +245,11 @@ jobs:
if: |
!cancelled() &&
needs.check-changes.result == 'success' &&
(github.event_name != 'pull_request' ||
needs.check-changes.outputs.multimodal_gen != 'true' ||
needs.check-changes.outputs.main_package == 'true' ||
needs.check-changes.outputs.jit_kernel == 'true' ||
needs.check-changes.outputs.sgl_kernel == 'true') &&
(needs.call-gate.result == 'success' || needs.call-gate.result == 'skipped')
uses: ./.github/workflows/_pr-test-rust-ext-build.yml
with:
@@ -387,7 +397,7 @@ jobs:
secrets: inherit
call-multimodal-gen-tests:
needs: [check-changes, call-gate, sgl-kernel-build-wheels, rust-ext-build]
needs: [check-changes, call-gate, sgl-kernel-build-wheels]
if: |
always() &&
!cancelled() &&
@@ -404,7 +414,6 @@ jobs:
test_parallel_dispatch: ${{ inputs.test_parallel_dispatch == true && 'true' || 'false' }}
caller_needs_failure: ${{ (needs.call-gate.result == 'failure' || needs.sgl-kernel-build-wheels.result == 'failure' || needs.check-changes.result == 'failure') && 'true' || 'false' }}
skip_pr_test_health_check: ${{ (inputs.skip_pr_test_health_check == true || inputs.test_parallel_dispatch == true || inputs.run_all_tests == true) && 'true' || 'false' }}
rust_ext_artifact: ${{ needs.rust-ext-build.outputs.artifact_name }}
secrets: inherit
base-c-test-4-gpu-h100: