[CI] Extract download-rust-ext and give every install step a cache fallback (#33597)

This commit is contained in:
Liangsheng Yin
2026-08-04 15:33:34 -07:00
committed by GitHub
parent b327d76682
commit 58da9859c4
10 changed files with 153 additions and 168 deletions
+15 -63
View File
@@ -10,7 +10,7 @@ on:
required: true
type: string
rust_ext_artifact:
description: 'Artifact of prebuilt Rust extension modules, from rust-ext-build. Empty, or a download that fails, means this job compiles them during install.'
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:
@@ -106,19 +106,12 @@ jobs:
merge-multiple: true
pattern: wheel-python3.10-cuda*
- name: Download prebuilt Rust extensions
id: rust_ext
if: ${{ inputs.rust_ext_artifact != '' }}
continue-on-error: true
uses: actions/download-artifact@v4
- uses: ./.github/actions/download-rust-ext
with:
name: ${{ inputs.rust_ext_artifact }}
path: python/sglang/srt/
artifact_name: ${{ inputs.rust_ext_artifact }}
- name: Install dependencies
timeout-minutes: 20
env:
SGLANG_BUILD_RUST_EXTS: ${{ steps.rust_ext.outcome == 'success' && 'none' || '' }}
run: |
CUSTOM_BUILD_SGL_KERNEL=${{inputs.sgl_kernel}} bash scripts/ci/cuda/ci_install_dependency.sh diffusion
- name: Run diffusion server tests
@@ -183,19 +176,12 @@ jobs:
merge-multiple: true
pattern: wheel-python3.10-cuda*
- name: Download prebuilt Rust extensions
id: rust_ext
if: ${{ inputs.rust_ext_artifact != '' }}
continue-on-error: true
uses: actions/download-artifact@v4
- uses: ./.github/actions/download-rust-ext
with:
name: ${{ inputs.rust_ext_artifact }}
path: python/sglang/srt/
artifact_name: ${{ inputs.rust_ext_artifact }}
- name: Install dependencies
timeout-minutes: 20
env:
SGLANG_BUILD_RUST_EXTS: ${{ steps.rust_ext.outcome == 'success' && 'none' || '' }}
run: |
CUSTOM_BUILD_SGL_KERNEL=${{inputs.sgl_kernel}} bash scripts/ci/cuda/ci_install_dependency.sh diffusion
@@ -257,19 +243,12 @@ jobs:
merge-multiple: true
pattern: wheel-python3.10-cuda*
- name: Download prebuilt Rust extensions
id: rust_ext
if: ${{ inputs.rust_ext_artifact != '' }}
continue-on-error: true
uses: actions/download-artifact@v4
- uses: ./.github/actions/download-rust-ext
with:
name: ${{ inputs.rust_ext_artifact }}
path: python/sglang/srt/
artifact_name: ${{ inputs.rust_ext_artifact }}
- name: Install dependencies
timeout-minutes: 20
env:
SGLANG_BUILD_RUST_EXTS: ${{ steps.rust_ext.outcome == 'success' && 'none' || '' }}
run: |
CUSTOM_BUILD_SGL_KERNEL=${{inputs.sgl_kernel}} bash scripts/ci/cuda/ci_install_dependency.sh diffusion
@@ -330,19 +309,12 @@ jobs:
merge-multiple: true
pattern: wheel-python3.10-cuda*
- name: Download prebuilt Rust extensions
id: rust_ext
if: ${{ inputs.rust_ext_artifact != '' }}
continue-on-error: true
uses: actions/download-artifact@v4
- uses: ./.github/actions/download-rust-ext
with:
name: ${{ inputs.rust_ext_artifact }}
path: python/sglang/srt/
artifact_name: ${{ inputs.rust_ext_artifact }}
- name: Install dependencies
timeout-minutes: 20
env:
SGLANG_BUILD_RUST_EXTS: ${{ steps.rust_ext.outcome == 'success' && 'none' || '' }}
run: |
CUSTOM_BUILD_SGL_KERNEL=${{inputs.sgl_kernel}} bash scripts/ci/cuda/ci_install_dependency.sh diffusion
@@ -410,19 +382,12 @@ jobs:
merge-multiple: true
pattern: wheel-python3.10-cuda*
- name: Download prebuilt Rust extensions
id: rust_ext
if: ${{ inputs.rust_ext_artifact != '' }}
continue-on-error: true
uses: actions/download-artifact@v4
- uses: ./.github/actions/download-rust-ext
with:
name: ${{ inputs.rust_ext_artifact }}
path: python/sglang/srt/
artifact_name: ${{ inputs.rust_ext_artifact }}
- name: Install dependencies
timeout-minutes: 20
env:
SGLANG_BUILD_RUST_EXTS: ${{ steps.rust_ext.outcome == 'success' && 'none' || '' }}
run: |
CUSTOM_BUILD_SGL_KERNEL=${{inputs.sgl_kernel}} bash scripts/ci/cuda/ci_install_dependency.sh diffusion
@@ -466,20 +431,14 @@ jobs:
merge-multiple: true
pattern: wheel-python3.10-cuda*
- name: Download prebuilt Rust extensions
id: rust_ext
if: ${{ inputs.rust_ext_artifact != '' }}
continue-on-error: true
uses: actions/download-artifact@v4
- uses: ./.github/actions/download-rust-ext
with:
name: ${{ inputs.rust_ext_artifact }}
path: python/sglang/srt/
artifact_name: ${{ inputs.rust_ext_artifact }}
- name: Install dependencies
timeout-minutes: 20
env:
SGLANG_CI_EARLY_LD_LIBRARY_PATH: "1"
SGLANG_BUILD_RUST_EXTS: ${{ steps.rust_ext.outcome == 'success' && 'none' || '' }}
run: |
CUSTOM_BUILD_SGL_KERNEL=${{inputs.sgl_kernel}} bash scripts/ci/cuda/ci_install_dependency.sh diffusion
@@ -530,19 +489,12 @@ jobs:
merge-multiple: true
pattern: wheel-python3.10-cuda*
- name: Download prebuilt Rust extensions
id: rust_ext
if: ${{ inputs.rust_ext_artifact != '' }}
continue-on-error: true
uses: actions/download-artifact@v4
- uses: ./.github/actions/download-rust-ext
with:
name: ${{ inputs.rust_ext_artifact }}
path: python/sglang/srt/
artifact_name: ${{ inputs.rust_ext_artifact }}
- name: Install dependencies
timeout-minutes: 20
env:
SGLANG_BUILD_RUST_EXTS: ${{ steps.rust_ext.outcome == 'success' && 'none' || '' }}
run: |
CUSTOM_BUILD_SGL_KERNEL=${{inputs.sgl_kernel}} bash scripts/ci/cuda/ci_install_dependency.sh diffusion