okami.mom/strata
git clone https://git.nkp.pet/okami.mom/strata
b2de2641f
main
1name : Metal build 2 3# Compile and link the Metal engine on a macOS runner (no GPU needed: the kernels are compiled at run time). The shared host files 4# (src/core/verify.cpp, src/prefill, src/program/generate.cpp) call kernel entry points that exist only for CUDA / HIP until Metal gets a 5# stub or an implementation; a missing one is a link error here, not on a user's Mac (owner round 9, G6). 6 7on : 8pull_request : 9paths : 10- 'src/**' 11- 'include/**' 12- 'metal/**' 13- 'third_party/**' 14- 'CMakeLists.txt' 15- '.github/workflows/metal-build.yml' 16workflow_dispatch : 17 18permissions : 19contents : read 20 21jobs : 22metal-link : 23# the macOS 26 SDK: metal/src/mtl_rt.mm names MTLGPUFamilyMetal4 (and MTLCompileOptions.mathMode, macOS 15) behind @available, 24# which is a run-time check; the names must still be in the SDK the engine is compiled against 25runs-on : macos-26 26timeout-minutes : 45 27env : 28# metal/setup_mac.py's metal-cpp pin (ggml is the vendored third_party/strata-ggml) 29METAL_CPP_URL : https://developer.apple.com/metal/cpp/files/metal-cpp_26.zip 30METAL_CPP_SHA256 : 4df3c078b9aadcb516212e9cb03004cbc5ce9a3e9c068fa3144d021db585a3a4 31steps : 32- uses : actions/checkout@v4 33- name : Tools 34run : brew install ninja 35- name : metal-cpp 36run : | 37curl -fsSL "$METAL_CPP_URL" -o metal-cpp.zip 38echo "$METAL_CPP_SHA256 metal-cpp.zip" | shasum -a 256 -c - 39unzip -q metal-cpp.zip -d _mcpp 40- name : Configure 41run : | 42cmake -S metal -B build-metal -G Ninja -DCMAKE_BUILD_TYPE=Release \ 43-DMETAL_CPP_DIR="$PWD/_mcpp/metal-cpp" - name: Build and link the engine 44run : cmake --build build-metal --target strata