CI: cross-platform build (Linux/macOS/iOS/Android/Quest)#1
Merged
Conversation
- 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
spirv-crossmatrix job that builds the dep per-platform (cached by tag), then avoxmatrix job that downloads the artifact and builds Vox itself.BUILD_TESTING=OFF).Test plan
vox-<platform>