[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
+9 -37
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:
@@ -71,19 +71,12 @@ jobs:
merge-multiple: true
pattern: wheel-python3.10-cuda13.0
- 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
@@ -120,19 +113,12 @@ jobs:
merge-multiple: true
pattern: wheel-python3.10-cuda13.0
- 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
@@ -171,19 +157,12 @@ jobs:
merge-multiple: true
pattern: wheel-python3.10-cuda13.0
- 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
@@ -222,19 +201,12 @@ jobs:
merge-multiple: true
pattern: wheel-python3.10-cuda13.0
- 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