From d7162b9f8902cf6441f0e17b020fdd86d0a91110 Mon Sep 17 00:00:00 2001 From: "LocalAI [bot]" <139863280+localai-bot@users.noreply.github.com> Date: Sat, 13 Jun 2026 11:02:32 +0200 Subject: [PATCH] ci(darwin): build the ds4 backend for darwin/arm64 (metal) (#10303) The gallery has metal-ds4 / metal-ds4-development entries, and the build recipe exists (make backends/ds4-darwin, special-cased in backend_build_darwin.yml), but ds4 was never listed in the darwin matrix, so no metal-darwin-arm64-ds4 image was ever published and the entries dangled. - Add ds4 to the darwin matrix (includeDarwin), mirroring the llama-cpp form (the reusable workflow builds it via 'make backends/ds4-darwin'). - Fix inferBackendPathDarwin in scripts/changed-backends.js to map ds4 to backend/cpp/ds4/ (like llama-cpp): ds4 is C++ but the matrix entry carries lang=go, so without this its darwin build would only ever run on a release (FORCE_ALL), never incrementally when backend/cpp/ds4 changes. sherpa-onnx and speaker-recognition are already in the darwin matrix on master and are not changed here. Assisted-by: claude:claude-opus-4-8 [Claude Code] Signed-off-by: Ettore Di Giacinto Co-authored-by: Ettore Di Giacinto --- .github/backend-matrix.yml | 3 +++ scripts/changed-backends.js | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/.github/backend-matrix.yml b/.github/backend-matrix.yml index 7df58bf6d..92293b764 100644 --- a/.github/backend-matrix.yml +++ b/.github/backend-matrix.yml @@ -4475,3 +4475,6 @@ includeDarwin: - backend: "speaker-recognition" tag-suffix: "-metal-darwin-arm64-speaker-recognition" build-type: "mps" + - backend: "ds4" + tag-suffix: "-metal-darwin-arm64-ds4" + lang: "go" diff --git a/scripts/changed-backends.js b/scripts/changed-backends.js index 62894bd9a..e8a68cf93 100644 --- a/scripts/changed-backends.js +++ b/scripts/changed-backends.js @@ -56,6 +56,11 @@ function inferBackendPathDarwin(item) { if (item.backend === "llama-cpp") { return `backend/cpp/llama-cpp/`; } + // ds4 is C++ too (built via `make backends/ds4-darwin`); the matrix entry + // carries lang=go for runner/toolchain selection, but the source is C++. + if (item.backend === "ds4") { + return `backend/cpp/ds4/`; + } if (!item.lang) { return `backend/python/${item.backend}/`; }