|
66 | 66 | path: runtime-artifacts/vm-runtime-darwin-aarch64.tar.zst |
67 | 67 | retention-days: 1 |
68 | 68 |
|
| 69 | + build-supervisor-arm64: |
| 70 | + name: Build Supervisor Bundle (arm64) |
| 71 | + runs-on: linux-arm64-cpu8 |
| 72 | + timeout-minutes: 30 |
| 73 | + container: |
| 74 | + image: ghcr.io/nvidia/openshell/ci:latest |
| 75 | + credentials: |
| 76 | + username: ${{ github.actor }} |
| 77 | + password: ${{ secrets.GITHUB_TOKEN }} |
| 78 | + env: |
| 79 | + MISE_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 80 | + OPENSHELL_IMAGE_TAG: ${{ inputs['image-tag'] }} |
| 81 | + steps: |
| 82 | + - uses: actions/checkout@v6 |
| 83 | + with: |
| 84 | + ref: ${{ inputs['checkout-ref'] }} |
| 85 | + fetch-depth: 0 |
| 86 | + |
| 87 | + - name: Mark workspace safe for git |
| 88 | + run: git config --global --add safe.directory "$GITHUB_WORKSPACE" |
| 89 | + |
| 90 | + - name: Fetch tags |
| 91 | + run: git fetch --tags --force |
| 92 | + |
| 93 | + - name: Install tools |
| 94 | + run: mise install --locked |
| 95 | + |
| 96 | + - name: Cache Rust target and registry |
| 97 | + uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2 |
| 98 | + with: |
| 99 | + shared-key: driver-vm-supervisor-arm64 |
| 100 | + cache-directories: .cache/sccache |
| 101 | + cache-targets: "true" |
| 102 | + |
| 103 | + - name: Install zstd |
| 104 | + run: apt-get update && apt-get install -y --no-install-recommends zstd && rm -rf /var/lib/apt/lists/* |
| 105 | + |
| 106 | + - name: Build bundled supervisor |
| 107 | + run: | |
| 108 | + set -euo pipefail |
| 109 | + tasks/scripts/vm/build-supervisor-bundle.sh --arch aarch64 |
| 110 | +
|
| 111 | + - name: sccache stats |
| 112 | + if: always() |
| 113 | + run: mise x -- sccache --show-stats |
| 114 | + |
| 115 | + - name: Upload supervisor bundle |
| 116 | + uses: actions/upload-artifact@v4 |
| 117 | + with: |
| 118 | + name: driver-vm-supervisor-arm64 |
| 119 | + path: target/vm-runtime-compressed/openshell-sandbox.zst |
| 120 | + retention-days: 1 |
| 121 | + |
69 | 122 | build-driver-vm-macos: |
70 | 123 | name: Build Driver VM (macOS) |
71 | | - needs: [download-kernel-runtime] |
| 124 | + needs: [download-kernel-runtime, build-supervisor-arm64] |
72 | 125 | runs-on: linux-amd64-cpu8 |
73 | 126 | timeout-minutes: 60 |
74 | 127 | container: |
|
81 | 134 | - /var/run/docker.sock:/var/run/docker.sock |
82 | 135 | env: |
83 | 136 | MISE_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
84 | | - SCCACHE_MEMCACHED_ENDPOINT: ${{ vars.SCCACHE_MEMCACHED_ENDPOINT }} |
85 | 137 | steps: |
86 | 138 | - uses: actions/checkout@v6 |
87 | 139 | with: |
|
99 | 151 |
|
100 | 152 | - name: Set up Docker Buildx |
101 | 153 | uses: ./.github/actions/setup-buildx |
| 154 | + with: |
| 155 | + driver: local |
102 | 156 |
|
103 | 157 | - name: Install zstd |
104 | 158 | run: apt-get update && apt-get install -y --no-install-recommends zstd && rm -rf /var/lib/apt/lists/* |
@@ -132,20 +186,17 @@ jobs: |
132 | 186 | echo "Staged macOS compressed runtime artifacts:" |
133 | 187 | ls -lah "$COMPRESSED_DIR" |
134 | 188 |
|
135 | | - - name: Build bundled supervisor |
| 189 | + - name: Download bundled supervisor |
| 190 | + uses: actions/download-artifact@v4 |
| 191 | + with: |
| 192 | + name: driver-vm-supervisor-arm64 |
| 193 | + path: target/vm-runtime-compressed-macos/ |
| 194 | + |
| 195 | + - name: Verify bundled supervisor |
136 | 196 | run: | |
137 | 197 | set -euo pipefail |
138 | | - docker buildx build \ |
139 | | - --file deploy/docker/Dockerfile.images \ |
140 | | - --platform linux/arm64 \ |
141 | | - --build-arg OPENSHELL_CARGO_VERSION="${{ inputs['cargo-version'] }}" \ |
142 | | - --build-arg OPENSHELL_IMAGE_TAG="${{ inputs['image-tag'] }}" \ |
143 | | - --target supervisor-output \ |
144 | | - --output type=local,dest=supervisor-out/ \ |
145 | | - . |
146 | | -
|
147 | | - zstd -19 -T0 -f supervisor-out/openshell-sandbox \ |
148 | | - -o "${PWD}/target/vm-runtime-compressed-macos/openshell-sandbox.zst" |
| 198 | + test -f target/vm-runtime-compressed-macos/openshell-sandbox.zst |
| 199 | + ls -lh target/vm-runtime-compressed-macos/openshell-sandbox.zst |
149 | 200 |
|
150 | 201 | - name: Verify embedded driver inputs |
151 | 202 | run: | |
|
0 commit comments