Skip to content

Commit ad11f92

Browse files
authored
Merge branch 'main' into jtoelke/os-128-use-prebuilt-binaries-flag
2 parents 220a75f + a4dfa5a commit ad11f92

3 files changed

Lines changed: 493 additions & 6 deletions

File tree

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,22 @@
11
name: Setup Docker Buildx
22
description: >
3-
Create a multi-arch Docker Buildx builder using remote BuildKit nodes.
4-
The builder is automatically removed when the job finishes (cleanup is
5-
enabled by default in docker/setup-buildx-action).
3+
Create a Docker Buildx builder. Two modes:
4+
* driver=remote (default) — multi-arch builder against in-cluster BuildKit
5+
pods. Requires EKS connectivity. Behaviour unchanged from prior versions.
6+
* driver=local — single-node buildx on the local docker-container driver.
7+
Pair with cache-to/cache-from=type=gha on build steps for persistence.
8+
Works on nv-gha-runners; no EKS needed.
9+
Cleanup is automatic when the job finishes (docker/setup-buildx-action default).
610
711
inputs:
12+
driver:
13+
description: "buildx driver: 'remote' or 'local'"
14+
default: remote
815
amd64-endpoint:
9-
description: BuildKit endpoint for linux/amd64
16+
description: BuildKit endpoint for linux/amd64 (remote driver only)
1017
default: tcp://buildkit-amd64.buildkit:1234
1118
arm64-endpoint:
12-
description: BuildKit endpoint for linux/arm64
19+
description: BuildKit endpoint for linux/arm64 (remote driver only)
1320
default: tcp://buildkit-arm64.buildkit:1234
1421
name:
1522
description: Builder instance name
@@ -18,7 +25,8 @@ inputs:
1825
runs:
1926
using: composite
2027
steps:
21-
- name: Set up Docker Buildx
28+
- name: Set up Docker Buildx (remote)
29+
if: inputs.driver == 'remote'
2230
uses: docker/setup-buildx-action@v3
2331
with:
2432
name: ${{ inputs.name }}
@@ -28,3 +36,11 @@ runs:
2836
append: |
2937
- endpoint: ${{ inputs.arm64-endpoint }}
3038
platforms: linux/arm64
39+
40+
- name: Set up Docker Buildx (local)
41+
if: inputs.driver == 'local'
42+
uses: docker/setup-buildx-action@v3
43+
with:
44+
name: ${{ inputs.name }}
45+
driver: docker-container
46+
platforms: linux/amd64,linux/arm64
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Shadow — Shared CPU Spike
2+
3+
# OS-49 Phase 2 / PR 1 — non-blocking spike. Runs `cargo check` on the
4+
# nv-gha-runners shared CPU pool (`linux-{amd64,arm64}-cpu8`) with a
5+
# GHA-backed sccache.
6+
#
7+
# Plan, decision thresholds, and results live in the Linear doc attached
8+
# to OS-126 ("OS-126 — Shared CPU spike plan & results"). Dispatch this
9+
# workflow 4–5 times after merge and record numbers there.
10+
11+
on:
12+
workflow_dispatch:
13+
14+
permissions:
15+
contents: read
16+
packages: read
17+
18+
env:
19+
CARGO_TERM_COLOR: always
20+
CARGO_INCREMENTAL: "0"
21+
MISE_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22+
# Wire sccache (already RUSTC_WRAPPER in mise.toml) to the GHA cache
23+
# backend instead of the EKS memcached used by ARC.
24+
SCCACHE_GHA_ENABLED: "true"
25+
26+
jobs:
27+
rust-check:
28+
name: cargo check (${{ matrix.runner }})
29+
strategy:
30+
fail-fast: false
31+
matrix:
32+
runner: [linux-amd64-cpu8, linux-arm64-cpu8]
33+
runs-on: ${{ matrix.runner }}
34+
container:
35+
image: ghcr.io/nvidia/openshell/ci:latest
36+
credentials:
37+
username: ${{ github.actor }}
38+
password: ${{ secrets.GITHUB_TOKEN }}
39+
timeout-minutes: 60
40+
steps:
41+
- uses: actions/checkout@v4
42+
43+
- name: Install tools
44+
run: mise install
45+
46+
- name: Configure GHA sccache backend
47+
# Exposes ACTIONS_CACHE_URL / ACTIONS_RUNTIME_TOKEN to subsequent steps
48+
# so sccache (wrapped around rustc via RUSTC_WRAPPER in mise.toml) can
49+
# initialize the GHA cache. Without this, sccache fails at startup with
50+
# "cache url for ghac not found". The action also installs its own
51+
# sccache binary; harmless since mise's sccache remains on PATH.
52+
uses: mozilla-actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9
53+
54+
- name: Cache Rust target and registry
55+
uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
56+
with:
57+
shared-key: shadow-shared-cpu-spike-${{ matrix.runner }}
58+
cache-directories: .cache/sccache
59+
60+
- name: cargo check
61+
run: mise x -- cargo check --workspace --all-targets
62+
63+
- name: sccache stats
64+
if: always()
65+
run: mise x -- sccache --show-stats

0 commit comments

Comments
 (0)