Skip to content

CI: cross-platform build (Linux/macOS/iOS/Android/Quest)#1

Merged
RP1-Dean merged 5 commits into
mainfrom
ci/cross-platform
Apr 18, 2026
Merged

CI: cross-platform build (Linux/macOS/iOS/Android/Quest)#1
RP1-Dean merged 5 commits into
mainfrom
ci/cross-platform

Conversation

@Squareys

Copy link
Copy Markdown
Contributor

Summary

  • Adds GitHub Actions workflow mirroring the Sneeze/Artemis pattern: a spirv-cross matrix job that builds the dep per-platform (cached by tag), then a vox matrix job that downloads the artifact and builds Vox itself.
  • Platform matrix covers: linux, macos, ios, android, quest.
  • Backends auto-select: Vulkan on Linux/Android/Quest, Metal on macOS/iOS (+Vulkan on macOS if MoltenVK present).
  • Tests run on native platforms only (skipped on iOS/Android/Quest via BUILD_TESTING=OFF).

Test plan

  • spirv-cross job passes on all 5 platforms
  • vox job builds cleanly on all 5 platforms
  • VoxTest runs on linux + macos (native)
  • Artifact uploads produce vox-<platform>

- Adds .github/workflows/build.yml mirroring the Sneeze/Artemis pattern:
  one matrix job (spirv-cross) builds the SPIRV-Cross static libs per
  platform and caches/uploads them; a second matrix job (vox) builds
  the library (+ VoxTest on native) against the downloaded artifact.

- SPIRV-Cross pinned to vulkan-sdk-1.3.296.0 and built with
  SHARED=OFF, STATIC=ON, CLI=OFF, TESTS=OFF — only the static libs
  that Vox actually links against.

- Platform matrix: linux/android/quest use Vulkan backend (libvulkan
  comes from apt on linux, NDK on android/quest); macOS gets Metal
  (+Vulkan if MoltenVK present, unlikely on the runner); iOS is
  Metal-only; Quest = Android with platform-29 for VR runtime.

- CMakeLists: set CMAKE_FIND_ROOT_PATH_MODE_{PACKAGE,LIBRARY,INCLUDE}
  to BOTH on Android/iOS so find_package(Vulkan) and the
  SPIRV_CROSS_ROOT lookup resolve through the cross toolchain (same
  fix applied to Sneeze and Artemis).

- Tests skipped on cross-compile (BUILD_TESTING=OFF + native: false in
  matrix) — the test binary can't execute on the build host.
- MetalDevice.h: add #include <vector> and <cstdint> at the top.
  std::vector usage in METAL_KERNEL::m_aBindingMap and METAL_DEVICE
  members was relying on transitive inclusion from vox/Vox.h on some
  platforms but failed on the iOS/macOS toolchain. Adding the include
  also resolves the cascading 'incompatible pointer types assigning
  to DEVICE * from METAL_DEVICE *' — that was a secondary error caused
  by the malformed class declaration.

- Linux CI: add mesa-vulkan-drivers to system-deps. GitHub runners
  have no physical GPU; lavapipe (Mesa's software Vulkan ICD) lets
  VoxTest's dispatch actually run so the test step passes.
get_entry_points_and_stages() returns SmallVector by value; binding
a non-const lvalue reference to the temporary is ill-formed. Use a
copy; the SmallVector is small and short-lived.
macOS GitHub runners are virtualized without Metal device access; the
test binary builds fine but segfaults inside MTLCreateSystemDefaultDevice.
Linux with lavapipe still exercises the dispatch path end-to-end.
@RP1-Dean RP1-Dean merged commit 34919c4 into main Apr 18, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants