Skip to content

Commit cc3fcb3

Browse files
committed
chore(merge): merge origin/main into os-51-extract-kubernetes-compute-driver
2 parents 4d875d9 + fdca543 commit cc3fcb3

File tree

40 files changed

+3992
-465
lines changed

40 files changed

+3992
-465
lines changed

.github/workflows/release-dev.yml

Lines changed: 79 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,70 @@ jobs:
8989
"${REGISTRY}/${component}:${{ github.sha }}"
9090
done
9191
92-
build-python-wheels:
93-
name: Stage Python Wheels
92+
build-python-wheels-linux:
93+
name: Build Python Wheels (Linux ${{ matrix.arch }})
94+
needs: [compute-versions]
95+
strategy:
96+
matrix:
97+
include:
98+
- arch: amd64
99+
runner: build-amd64
100+
artifact: linux-amd64
101+
task: python:build:linux:amd64
102+
output_path: target/wheels/linux-amd64/*.whl
103+
- arch: arm64
104+
runner: build-arm64
105+
artifact: linux-arm64
106+
task: python:build:linux:arm64
107+
output_path: target/wheels/linux-arm64/*.whl
108+
runs-on: ${{ matrix.runner }}
109+
timeout-minutes: 120
110+
container:
111+
image: ghcr.io/nvidia/openshell/ci:latest
112+
credentials:
113+
username: ${{ github.actor }}
114+
password: ${{ secrets.GITHUB_TOKEN }}
115+
options: --privileged
116+
env:
117+
MISE_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
118+
SCCACHE_MEMCACHED_ENDPOINT: ${{ vars.SCCACHE_MEMCACHED_ENDPOINT }}
119+
OPENSHELL_IMAGE_TAG: dev
120+
steps:
121+
- uses: actions/checkout@v4
122+
with:
123+
fetch-depth: 0
124+
125+
- name: Mark workspace safe for git
126+
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
127+
128+
- name: Sync Python dependencies
129+
run: uv sync
130+
131+
- name: Cache Rust target and registry
132+
uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
133+
with:
134+
shared-key: python-wheel-linux-${{ matrix.arch }}
135+
cache-directories: .cache/sccache
136+
cache-targets: "true"
137+
138+
- name: Build Python wheels
139+
run: |
140+
set -euo pipefail
141+
OPENSHELL_CARGO_VERSION="${{ needs.compute-versions.outputs.cargo_version }}" mise run ${{ matrix.task }}
142+
ls -la ${{ matrix.output_path }}
143+
144+
- name: Upload wheel artifacts
145+
uses: actions/upload-artifact@v4
146+
with:
147+
name: python-wheels-${{ matrix.artifact }}
148+
path: ${{ matrix.output_path }}
149+
retention-days: 5
150+
151+
build-python-wheel-macos:
152+
name: Build Python Wheel (macOS)
94153
needs: [compute-versions]
95154
runs-on: build-amd64
96155
timeout-minutes: 120
97-
outputs:
98-
wheel_version: ${{ needs.compute-versions.outputs.python_version }}
99-
wheel_filenames: ${{ steps.filenames.outputs.wheel_filenames }}
100156
container:
101157
image: ghcr.io/nvidia/openshell/ci:latest
102158
credentials:
@@ -126,24 +182,16 @@ jobs:
126182
- name: Sync Python dependencies
127183
run: uv sync
128184

129-
- name: Build Python wheels
185+
- name: Build Python wheel
130186
run: |
131187
set -euo pipefail
132-
OPENSHELL_CARGO_VERSION="${{ needs.compute-versions.outputs.cargo_version }}" mise run python:build:multiarch
133188
OPENSHELL_CARGO_VERSION="${{ needs.compute-versions.outputs.cargo_version }}" mise run python:build:macos
134189
ls -la target/wheels/*.whl
135190
136-
- name: Capture wheel filenames
137-
id: filenames
138-
run: |
139-
set -euo pipefail
140-
WHEEL_FILENAMES=$(ls target/wheels/*.whl | xargs -n1 basename | paste -sd, -)
141-
echo "wheel_filenames=${WHEEL_FILENAMES}" >> "$GITHUB_OUTPUT"
142-
143191
- name: Upload wheel artifacts
144192
uses: actions/upload-artifact@v4
145193
with:
146-
name: python-wheels
194+
name: python-wheels-macos
147195
path: target/wheels/*.whl
148196
retention-days: 5
149197

@@ -335,9 +383,11 @@ jobs:
335383
# ---------------------------------------------------------------------------
336384
release-dev:
337385
name: Release Dev
338-
needs: [build-cli-linux, build-cli-macos, build-python-wheels]
386+
needs: [compute-versions, build-cli-linux, build-cli-macos, build-python-wheels-linux, build-python-wheel-macos]
339387
runs-on: build-amd64
340388
timeout-minutes: 10
389+
outputs:
390+
wheel_filenames: ${{ steps.wheel_filenames.outputs.wheel_filenames }}
341391
steps:
342392
- uses: actions/checkout@v4
343393

@@ -351,8 +401,17 @@ jobs:
351401
- name: Download wheel artifacts
352402
uses: actions/download-artifact@v4
353403
with:
354-
name: python-wheels
404+
pattern: python-wheels-*
355405
path: release/
406+
merge-multiple: true
407+
408+
- name: Capture wheel filenames
409+
id: wheel_filenames
410+
run: |
411+
set -euo pipefail
412+
ls -la release/*.whl
413+
WHEEL_FILENAMES=$(ls release/*.whl | xargs -n1 basename | sort | paste -sd, -)
414+
echo "wheel_filenames=${WHEEL_FILENAMES}" >> "$GITHUB_OUTPUT"
356415
357416
- name: Generate checksums
358417
run: |
@@ -364,7 +423,7 @@ jobs:
364423
- name: Prune stale wheel assets from dev release
365424
uses: actions/github-script@v7
366425
env:
367-
WHEEL_VERSION: ${{ needs.build-python-wheels.outputs.wheel_version }}
426+
WHEEL_VERSION: ${{ needs.compute-versions.outputs.python_version }}
368427
with:
369428
script: |
370429
const wheelVersion = process.env.WHEEL_VERSION;
@@ -442,7 +501,7 @@ jobs:
442501
443502
trigger-wheel-publish:
444503
name: Trigger Wheel Publish
445-
needs: [compute-versions, build-python-wheels, release-dev]
504+
needs: [compute-versions, release-dev]
446505
runs-on: [self-hosted, nv]
447506
timeout-minutes: 10
448507
steps:
@@ -451,7 +510,7 @@ jobs:
451510
GITLAB_CI_TRIGGER_TOKEN: ${{ secrets.GITLAB_CI_TRIGGER_TOKEN }}
452511
GITLAB_CI_TRIGGER_URL: ${{ secrets.GITLAB_CI_TRIGGER_URL }}
453512
RELEASE_VERSION: ${{ needs.compute-versions.outputs.python_version }}
454-
WHEEL_FILENAMES: ${{ needs.build-python-wheels.outputs.wheel_filenames }}
513+
WHEEL_FILENAMES: ${{ needs.release-dev.outputs.wheel_filenames }}
455514
run: |
456515
set -euo pipefail
457516
if [ -z "${WHEEL_FILENAMES}" ]; then

.github/workflows/release-tag.yml

Lines changed: 79 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,71 @@ jobs:
109109
"${REGISTRY}/${component}:${{ github.sha }}"
110110
done
111111
112-
build-python-wheels:
113-
name: Stage Python Wheels
112+
build-python-wheels-linux:
113+
name: Build Python Wheels (Linux ${{ matrix.arch }})
114+
needs: [compute-versions]
115+
strategy:
116+
matrix:
117+
include:
118+
- arch: amd64
119+
runner: build-amd64
120+
artifact: linux-amd64
121+
task: python:build:linux:amd64
122+
output_path: target/wheels/linux-amd64/*.whl
123+
- arch: arm64
124+
runner: build-arm64
125+
artifact: linux-arm64
126+
task: python:build:linux:arm64
127+
output_path: target/wheels/linux-arm64/*.whl
128+
runs-on: ${{ matrix.runner }}
129+
timeout-minutes: 120
130+
container:
131+
image: ghcr.io/nvidia/openshell/ci:latest
132+
credentials:
133+
username: ${{ github.actor }}
134+
password: ${{ secrets.GITHUB_TOKEN }}
135+
options: --privileged
136+
env:
137+
MISE_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
138+
SCCACHE_MEMCACHED_ENDPOINT: ${{ vars.SCCACHE_MEMCACHED_ENDPOINT }}
139+
OPENSHELL_IMAGE_TAG: ${{ needs.compute-versions.outputs.semver }}
140+
steps:
141+
- uses: actions/checkout@v4
142+
with:
143+
ref: ${{ inputs.tag || github.ref }}
144+
fetch-depth: 0
145+
146+
- name: Mark workspace safe for git
147+
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
148+
149+
- name: Sync Python dependencies
150+
run: uv sync
151+
152+
- name: Cache Rust target and registry
153+
uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
154+
with:
155+
shared-key: python-wheel-linux-${{ matrix.arch }}
156+
cache-directories: .cache/sccache
157+
cache-targets: "true"
158+
159+
- name: Build Python wheels
160+
run: |
161+
set -euo pipefail
162+
OPENSHELL_CARGO_VERSION="${{ needs.compute-versions.outputs.cargo_version }}" mise run ${{ matrix.task }}
163+
ls -la ${{ matrix.output_path }}
164+
165+
- name: Upload wheel artifacts
166+
uses: actions/upload-artifact@v4
167+
with:
168+
name: python-wheels-${{ matrix.artifact }}
169+
path: ${{ matrix.output_path }}
170+
retention-days: 5
171+
172+
build-python-wheel-macos:
173+
name: Build Python Wheel (macOS)
114174
needs: [compute-versions]
115175
runs-on: build-amd64
116176
timeout-minutes: 120
117-
outputs:
118-
wheel_version: ${{ needs.compute-versions.outputs.python_version }}
119-
wheel_filenames: ${{ steps.filenames.outputs.wheel_filenames }}
120177
container:
121178
image: ghcr.io/nvidia/openshell/ci:latest
122179
credentials:
@@ -147,24 +204,16 @@ jobs:
147204
- name: Sync Python dependencies
148205
run: uv sync
149206

150-
- name: Build Python wheels
207+
- name: Build Python wheel
151208
run: |
152209
set -euo pipefail
153-
OPENSHELL_CARGO_VERSION="${{ needs.compute-versions.outputs.cargo_version }}" mise run python:build:multiarch
154210
OPENSHELL_CARGO_VERSION="${{ needs.compute-versions.outputs.cargo_version }}" mise run python:build:macos
155211
ls -la target/wheels/*.whl
156212
157-
- name: Capture wheel filenames
158-
id: filenames
159-
run: |
160-
set -euo pipefail
161-
WHEEL_FILENAMES=$(ls target/wheels/*.whl | xargs -n1 basename | paste -sd, -)
162-
echo "wheel_filenames=${WHEEL_FILENAMES}" >> "$GITHUB_OUTPUT"
163-
164213
- name: Upload wheel artifacts
165214
uses: actions/upload-artifact@v4
166215
with:
167-
name: python-wheels
216+
name: python-wheels-macos
168217
path: target/wheels/*.whl
169218
retention-days: 5
170219

@@ -358,9 +407,11 @@ jobs:
358407
# ---------------------------------------------------------------------------
359408
release:
360409
name: Release
361-
needs: [compute-versions, build-cli-linux, build-cli-macos, build-python-wheels, tag-ghcr-release]
410+
needs: [compute-versions, build-cli-linux, build-cli-macos, build-python-wheels-linux, build-python-wheel-macos, tag-ghcr-release]
362411
runs-on: build-amd64
363412
timeout-minutes: 10
413+
outputs:
414+
wheel_filenames: ${{ steps.wheel_filenames.outputs.wheel_filenames }}
364415
steps:
365416
- uses: actions/checkout@v4
366417
with:
@@ -376,8 +427,17 @@ jobs:
376427
- name: Download wheel artifacts
377428
uses: actions/download-artifact@v4
378429
with:
379-
name: python-wheels
430+
pattern: python-wheels-*
380431
path: release/
432+
merge-multiple: true
433+
434+
- name: Capture wheel filenames
435+
id: wheel_filenames
436+
run: |
437+
set -euo pipefail
438+
ls -la release/*.whl
439+
WHEEL_FILENAMES=$(ls release/*.whl | xargs -n1 basename | sort | paste -sd, -)
440+
echo "wheel_filenames=${WHEEL_FILENAMES}" >> "$GITHUB_OUTPUT"
381441
382442
- name: Generate checksums
383443
run: |
@@ -437,7 +497,7 @@ jobs:
437497

438498
trigger-wheel-publish:
439499
name: Trigger Wheel Publish
440-
needs: [compute-versions, build-python-wheels, release]
500+
needs: [compute-versions, release]
441501
runs-on: [self-hosted, nv]
442502
timeout-minutes: 10
443503
steps:
@@ -447,7 +507,7 @@ jobs:
447507
GITLAB_CI_TRIGGER_URL: ${{ secrets.GITLAB_CI_TRIGGER_URL }}
448508
RELEASE_VERSION: ${{ needs.compute-versions.outputs.python_version }}
449509
RELEASE_TAG: ${{ env.RELEASE_TAG }}
450-
WHEEL_FILENAMES: ${{ needs.build-python-wheels.outputs.wheel_filenames }}
510+
WHEEL_FILENAMES: ${{ needs.release.outputs.wheel_filenames }}
451511
run: |
452512
set -euo pipefail
453513
if [ -z "${WHEEL_FILENAMES}" ]; then

Cargo.lock

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

architecture/build-containers.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,15 @@ The cluster image is a single-container Kubernetes distribution that bundles the
2121

2222
The supervisor binary (`openshell-sandbox`) is built by the shared `supervisor-builder` stage in `deploy/docker/Dockerfile.images` and placed at `/opt/openshell/bin/openshell-sandbox`. It is exposed to sandbox pods at runtime via a read-only `hostPath` volume mount — it is not baked into sandbox images.
2323

24+
## Python Wheels
25+
26+
OpenShell also publishes Python wheels for `linux/amd64`, `linux/arm64`, and macOS ARM64.
27+
28+
- Linux wheels are built natively on matching Linux runners via `build:python:wheel:linux:amd64` and `build:python:wheel:linux:arm64` in `tasks/python.toml`.
29+
- There is no local Linux multiarch wheel build task. Release workflows own the per-arch Linux wheel production.
30+
- The macOS ARM64 wheel is cross-compiled with `deploy/docker/Dockerfile.python-wheels-macos` via `build:python:wheel:macos`.
31+
- Release workflows mirror the CLI layout: a Linux matrix job for amd64/arm64, a separate macOS job, and release jobs that download the per-platform wheel artifacts directly before publishing.
32+
2433
## Sandbox Images
2534

2635
Sandbox images are **not built in this repository**. They are maintained in the [openshell-community](https://github.com/nvidia/openshell-community) repository and pulled from `ghcr.io/nvidia/openshell-community/sandboxes/` at runtime.
@@ -70,4 +79,3 @@ The harness runs isolated scenarios in temporary git worktrees, keeps its own st
7079
- auto-detection checks for gateway-only, supervisor-only, shared, Helm-only, unrelated, and explicit-target changes
7180
- cold vs warm rebuild comparisons for gateway and supervisor code changes
7281
- container-ID invalidation coverage to verify gateway + Helm are retriggered when the cluster container changes
73-

0 commit comments

Comments
 (0)