[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
+12
View File
@@ -104,6 +104,9 @@ jobs:
- uses: ./.github/actions/check-maintenance
# No artifact_name: a workflow_dispatch has no rust-ext-build job of its own.
- uses: ./.github/actions/download-rust-ext
- name: Install dependencies
timeout-minutes: ${{ fromJson(inputs.install_timeout) }}
env:
@@ -195,6 +198,8 @@ jobs:
- uses: ./.github/actions/check-maintenance
- uses: ./.github/actions/download-rust-ext
- name: Install dependencies (diffusion)
timeout-minutes: 20
run: bash scripts/ci/cuda/ci_install_dependency.sh diffusion
@@ -270,9 +275,16 @@ jobs:
- name: Install uv
uses: astral-sh/setup-uv@v5
# Worth the most of the three jobs: this runner is hosted, so it has no
# persistent cargo target dir and every dispatch compiled cold. Its
# setup-python pins the same 3.10 the modules were built against.
- uses: ./.github/actions/download-rust-ext
id: rust_ext
# Needed by setuptools-rust to build the bundled native gRPC extension
# (rust/sglang-grpc) when installing the main `sglang` wheel from source.
- name: Install protoc + Rust toolchain
if: ${{ steps.rust_ext.outputs.hit != 'true' }}
timeout-minutes: 10
run: bash scripts/ci/utils/install_rust_protoc.sh