@@ -421,7 +421,7 @@ jobs:
421421 # ---------------------------------------------------------------------------
422422 build-driver-vm-linux :
423423 name : Build Driver VM (Linux ${{ matrix.arch }})
424- needs : [compute-versions, download-kernel-runtime, build-rootfs ]
424+ needs : [compute-versions, download-kernel-runtime]
425425 strategy :
426426 matrix :
427427 include :
@@ -477,12 +477,6 @@ jobs:
477477 name : kernel-runtime-tarballs
478478 path : runtime-download/
479479
480- - name : Download rootfs tarball
481- uses : actions/download-artifact@v4
482- with :
483- name : rootfs-${{ matrix.arch }}
484- path : rootfs-download/
485-
486480 - name : Stage compressed runtime for embedding
487481 run : |
488482 set -euo pipefail
@@ -504,12 +498,15 @@ jobs:
504498 zstd -19 -f -q -T0 -o "${COMPRESSED_DIR}/${name}.zst" "$file"
505499 done
506500
507- # Copy rootfs tarball (already zstd-compressed)
508- cp rootfs-download/rootfs.tar.zst "${COMPRESSED_DIR}/rootfs.tar.zst"
509-
510501 echo "Staged compressed artifacts:"
511502 ls -lah "$COMPRESSED_DIR"
512503
504+ - name : Build bundled supervisor
505+ run : |
506+ set -euo pipefail
507+ OPENSHELL_VM_RUNTIME_COMPRESSED_DIR="${PWD}/target/vm-runtime-compressed" \
508+ tasks/scripts/vm/build-supervisor-bundle.sh --arch "${{ matrix.guest_arch }}"
509+
513510 - name : Scope workspace to driver-vm crates
514511 run : |
515512 set -euo pipefail
@@ -551,7 +548,7 @@ jobs:
551548 # ---------------------------------------------------------------------------
552549 build-driver-vm-macos :
553550 name : Build Driver VM (macOS)
554- needs : [compute-versions, download-kernel-runtime, build-rootfs ]
551+ needs : [compute-versions, download-kernel-runtime]
555552 runs-on : build-amd64
556553 timeout-minutes : 60
557554 container :
@@ -591,12 +588,6 @@ jobs:
591588 name : kernel-runtime-tarballs
592589 path : runtime-download/
593590
594- - name : Download rootfs tarball (arm64)
595- uses : actions/download-artifact@v4
596- with :
597- name : rootfs-arm64
598- path : rootfs-download/
599-
600591 - name : Prepare compressed runtime directory
601592 run : |
602593 set -euo pipefail
@@ -619,12 +610,24 @@ jobs:
619610 zstd -19 -f -q -T0 -o "${COMPRESSED_DIR}/${name}.zst" "$file"
620611 done
621612
622- # The macOS VM guest is always Linux ARM64, so use the arm64 rootfs
623- cp rootfs-download/rootfs.tar.zst "${COMPRESSED_DIR}/rootfs.tar.zst"
624-
625613 echo "Staged macOS compressed artifacts:"
626614 ls -lah "$COMPRESSED_DIR"
627615
616+ - name : Build bundled supervisor
617+ run : |
618+ set -euo pipefail
619+ docker buildx build \
620+ --file deploy/docker/Dockerfile.images \
621+ --platform linux/arm64 \
622+ --build-arg OPENSHELL_CARGO_VERSION="${{ needs.compute-versions.outputs.cargo_version }}" \
623+ --build-arg OPENSHELL_IMAGE_TAG=dev \
624+ --target supervisor-output \
625+ --output type=local,dest=supervisor-out/ \
626+ .
627+
628+ zstd -19 -T0 -f supervisor-out/openshell-sandbox \
629+ -o "${PWD}/target/vm-runtime-compressed-macos/openshell-sandbox.zst"
630+
628631 - name : Build macOS binary via Docker (osxcross)
629632 run : |
630633 set -euo pipefail
@@ -776,7 +779,7 @@ jobs:
776779
777780 ### VM Compute Driver Binaries
778781
779- `openshell-driver-vm` binaries with embedded kernel runtime and sandbox rootfs .
782+ `openshell-driver-vm` binaries with embedded kernel runtime and bundled sandbox supervisor .
780783 Launched by the gateway when `--drivers=vm` is configured. Rebuilt on every
781784 push to main alongside the openshell-vm binaries.
782785
0 commit comments