Files
sglang/.github/workflows/seed-rust-ext-cache.yml

53 lines
1.7 KiB
YAML

name: Seed Rust Ext Cache
# A cache entry only reaches every PR when it was written from the default branch's
# ref, and pr-test.yml has no push trigger - so a merge that moves the key leaves
# every PR compiling for itself until the next scheduled run, up to 12h later.
on:
push:
branches: [main]
paths:
- 'rust/**'
- 'proto/**'
- 'python/setup.py'
- 'python/pyproject.toml'
- 'python/sglang/srt/rust_extensions/torch_build.py'
# The key's prefix lives in this file, so a bump there also moves the key.
- '.github/workflows/_pr-test-rust-ext-build.yml'
- 'scripts/ci/utils/stage_rust_ext_modules.sh'
# Not hashed into the key, but they carry the prefix each side uses: the one
# seeded per arch here, and the one consumers restore with there.
- '.github/workflows/seed-rust-ext-cache.yml'
- '.github/actions/download-rust-ext/action.yml'
workflow_dispatch:
# Only the newest merge needs to seed; earlier ones are already stale.
concurrency:
group: seed-rust-ext-cache
cancel-in-progress: true
# Declaring permissions at all drops everything not listed. issues: read for
# check-maintenance; actions: read for the restore job's gh cache list.
permissions:
actions: read
contents: read
issues: read
jobs:
seed:
uses: ./.github/workflows/_pr-test-rust-ext-build.yml
with:
runs_on: ubuntu-22.04
secrets: inherit
# One entry per arch, since the arch is part of the key.
seed-aarch64:
uses: ./.github/workflows/_pr-test-rust-ext-build.yml
with:
runs_on: ubuntu-22.04-arm
collect_runs_on: ubuntu-22.04-arm
artifact_name: rust-ext-aarch64
cache_key_prefix: rust-ext-aarch64-cp310-cp312
secrets: inherit