[CI] Publish nightly sglang wheel under both cu129 and cu130 indexes (#24176)

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Kangyan-Zhou
2026-04-30 16:08:59 -07:00
committed by GitHub
co-authored by Claude Opus 4.7
parent 694ef516cb
commit e45b8ec1ec
2 changed files with 26 additions and 22 deletions
+11 -7
View File
@@ -14,11 +14,6 @@ on:
description: 'Specific commit SHA to build (leave empty for latest)'
required: false
type: string
cuda_version:
description: 'CUDA version (e.g., 129 or 130)'
required: false
default: '129'
type: string
concurrency:
group: release-pypi-nightly-${{ github.ref }}
@@ -112,6 +107,15 @@ jobs:
needs: build-nightly-wheel
runs-on: ubuntu-latest
environment: 'prod'
strategy:
fail-fast: false
# The wheel is CUDA-agnostic and built once — we just register the same
# artifact under cu129/sglang/ and cu130/sglang/ wheel indexes so users
# can install via either --extra-index-url. Serialize because both matrix
# runs clone and push to the same sgl-whl branch.
max-parallel: 1
matrix:
cuda_version: ['129', '130']
steps:
- uses: actions/checkout@v4
@@ -160,12 +164,12 @@ jobs:
python3 scripts/update_nightly_whl_index.py \
--commit-hash ${{ needs.build-nightly-wheel.outputs.commit_hash }} \
--nightly-version ${{ needs.build-nightly-wheel.outputs.nightly_version }} \
--cuda-version ${{ inputs.cuda_version || '129' }} \
--cuda-version ${{ matrix.cuda_version }} \
--build-date ${{ needs.build-nightly-wheel.outputs.build_date }}
- name: Push wheel index
run: |
cd sgl-whl
git add -A
git diff --staged --quiet || git commit -m "Update nightly wheel index for commit ${{ needs.build-nightly-wheel.outputs.commit_hash }}"
git diff --staged --quiet || git commit -m "Update cu${{ matrix.cuda_version }} nightly wheel index for commit ${{ needs.build-nightly-wheel.outputs.commit_hash }}"
git push
+8 -8
View File
@@ -42,8 +42,10 @@ def update_wheel_index(
whl_repo_dir = pathlib.Path("sgl-whl")
if not dist_dir.exists():
print(f"Warning: {dist_dir} does not exist, skipping index update")
return
raise FileNotFoundError(
f"{dist_dir} does not exist — the download-artifact step did not "
f"populate it; refusing to silently no-op the index update"
)
# Format CUDA version with 'cu' prefix if not already present
if not cuda_version.startswith("cu"):
@@ -87,7 +89,6 @@ def update_wheel_index(
# Generate new links for current wheels
new_links = []
for wheel_path in sorted(dist_dir.glob("*.whl")):
try:
filename = wheel_path.name
sha256 = compute_sha256(wheel_path)
@@ -97,13 +98,12 @@ def update_wheel_index(
new_links.append(link)
print(f" Added: {filename}")
except Exception as e:
print(f" Error processing {wheel_path.name}: {e}")
continue
if not new_links:
print(" No new wheels to add")
return
raise RuntimeError(
f"No wheels found in {dist_dir} — index update for {cuda_version} "
f"would be a no-op; failing loudly instead of pushing an empty change"
)
# Combine existing and new links (new links first for latest)
all_links = new_links + existing_links