Files
OpenShell/.github/workflows/shadow-shared-cpu-spike.yml
2026-04-30 13:22:47 -07:00

74 lines
2.6 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name: Shadow — Shared CPU Spike
# OS-49 Phase 2 / PR 1 — non-blocking spike. Runs `cargo check` on the
# nv-gha-runners shared CPU pool (`linux-{amd64,arm64}-cpu8`) with a
# GHA-backed sccache.
#
# Plan, decision thresholds, and results live in the Linear doc attached
# to OS-126 ("OS-126 — Shared CPU spike plan & results"). Dispatch this
# workflow 4–5 times after merge and record numbers there.
on:
workflow_dispatch:
permissions:
contents: read
packages: read
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: "0"
MISE_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Wire sccache (already RUSTC_WRAPPER in mise.toml) to the GHA cache
# backend instead of the EKS memcached used by ARC.
SCCACHE_GHA_ENABLED: "true"
jobs:
rust-check:
name: cargo check (${{ matrix.runner }})
strategy:
fail-fast: false
matrix:
runner: [linux-amd64-cpu8, linux-arm64-cpu8]
runs-on: ${{ matrix.runner }}
env:
# Partition the GHA sccache cache per-arch. Without this, matrix jobs
# collide on the same cache key, and the later-starting job's writes
# fail with 409 Conflict while the earlier one's writes land — leaving
# subsequent runs with asymmetric and mostly-empty caches.
# (Run 1 on 2026-04-24 showed amd64 with 0/1062 writes succeeding
# while arm64 got 575/1064.)
SCCACHE_GHA_VERSION: ${{ matrix.runner }}
container:
image: ghcr.io/nvidia/openshell/ci:latest
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
timeout-minutes: 60
steps:
- uses: actions/checkout@v6
- name: Install tools
run: mise install
- name: Configure GHA sccache backend
# Exposes ACTIONS_CACHE_URL / ACTIONS_RUNTIME_TOKEN to subsequent steps
# so sccache (wrapped around rustc via RUSTC_WRAPPER in mise.toml) can
# initialize the GHA cache. Without this, sccache fails at startup with
# "cache url for ghac not found". The action also installs its own
# sccache binary; harmless since mise's sccache remains on PATH.
uses: mozilla-actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9
- name: Cache Rust target and registry
uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
with:
shared-key: shadow-shared-cpu-spike-${{ matrix.runner }}
cache-directories: .cache/sccache
- name: cargo check
run: mise x -- cargo check --workspace --all-targets
- name: sccache stats
if: always()
run: mise x -- sccache --show-stats