LocalAI/.github/workflows
LocalAI [bot] 86a7f6c9fa
ci: close GC race + cascade-skip + darwin grpc gaps from v4.2.1 (#9781)
* ci: close the GC race + cascade-skip + darwin grpc gaps from v4.2.1

v4.2.1's backend.yml run (#25701862853) exposed three independent issues
on top of the singletons fix shipped in ea001995. Address all three plus
two related cleanups:

1. quay GC race in backend-merge-jobs-multiarch (12/37 merges failed with
   "manifest not found"). Even after PR #9746 split multi/single-arch
   merges, the multiarch matrix itself takes ~2h to drain at
   max-parallel: 8, and the earliest per-arch digests (push-by-digest,
   no tag) get reaped by quay's GC before the merge runs. The split
   bounded the race for multiarch; it doesn't eliminate it. Anchor each
   per-arch digest immediately to a tag in the internal ci-cache image
   (`keepalive-<run_id><tag-suffix>-<platform-tag>`). Quay won't GC
   tagged manifests. backend_merge.yml deletes the keepalive tags via
   quay REST API after publishing the user-facing manifest list.
   Cleanup is best-effort: if the quay token is not OAuth-scoped the
   merge does NOT fail, the orphan tags just persist.

2. cascade-skip on backend-merge-jobs-singlearch. v4.2.1 had 2 failed
   and 2 cancelled singlearch builds (out of 199); GHA's default
   `needs:` semantics cascade-skipped the entire singlearch merge
   matrix, so zero singleton tags were applied even though 197
   singletons built successfully. Wrap the merge `if:` in
   `!cancelled() && ...` for both multi and single arch in backend.yml
   and backend_pr.yml so partial build failures publish the successful
   tag-suffixes.

3. Darwin llama-cpp grpc-server build fails with `find_package(absl)`
   not found. Same shape as the ccache/blake3/fmt/hiredis/xxhash/zstd
   fix already in `Dependencies`: a brew cache hit restores
   `/opt/homebrew/Cellar/grpc` so `brew install grpc` no-ops, but
   abseil isn't in our Cellar cache list and never gets installed
   alongside, leaving grpc's CMake unable to resolve it. Mirror the
   `brew reinstall ccache` line with `brew reinstall grpc` to
   re-validate grpc's full transitive dep closure on every cache-hit
   run.

4. Move the four heaviest CUDA cpp builds back to bigger-runner. v4.2.1
   wall-clock: -gpu-nvidia-cuda-12-llama-cpp 5h36m,
   -gpu-nvidia-cuda-12-turboquant 6h05m,
   -gpu-nvidia-cuda-13-llama-cpp 5h37m,
   -gpu-nvidia-cuda-13-turboquant 6h05m. The cuda-12 turboquant and
   cuda-13 turboquant entries are over GHA's 6h job timeout. Phase 5.3
   of the free-tier migration (PR #9730) had explicitly flagged this
   batch as 'highest-risk' with a per-entry revert path. All other
   matrix entries (vulkan-llama-cpp ~47m, ROCm hipblas-llama-cpp ~2h,
   intel sycl-f32 ~1h49m) stay on free-tier ubuntu-latest.

Verified locally: all six edited workflow YAMLs parse cleanly. Real
verification has to come from the next tag release run.

Assisted-by: Claude:claude-opus-4-7
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

* ci: extract keepalive anchor + cleanup into .github/scripts/

The two inline shell blocks from the previous commit are long enough to
hurt readability of the workflow YAML and benefit from their own files
with self-contained docs. Move them to .github/scripts/:

  anchor-digest-in-cache.sh    backend_build.yml's keepalive anchor
  cleanup-keepalive-tags.sh    backend_merge.yml's best-effort cleanup

Workflow steps reduce to a single `run:` invocation each, with all the
parameter plumbing handled by env vars on the step. backend_merge.yml
also gains a sparse `actions/checkout@v6` step (sparse to .github/scripts
only) so the cleanup script is available on the runner — backend_build
already checks out for the docker build.

Net workflow diff: -36 lines across the two files. Script logic and
behavior are byte-identical to the inline version.

Assisted-by: Claude:claude-opus-4-7
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

---------

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Co-authored-by: Ettore Di Giacinto <mudler@localai.io>
2026-05-12 17:22:09 +02:00
..
disabled chore(ci): disable CI actions 2026-03-02 14:48:00 +01:00
backend.yml ci: close GC race + cascade-skip + darwin grpc gaps from v4.2.1 (#9781) 2026-05-12 17:22:09 +02:00
backend_build.yml ci: close GC race + cascade-skip + darwin grpc gaps from v4.2.1 (#9781) 2026-05-12 17:22:09 +02:00
backend_build_darwin.yml ci: close GC race + cascade-skip + darwin grpc gaps from v4.2.1 (#9781) 2026-05-12 17:22:09 +02:00
backend_merge.yml ci: close GC race + cascade-skip + darwin grpc gaps from v4.2.1 (#9781) 2026-05-12 17:22:09 +02:00
backend_pr.yml ci: close GC race + cascade-skip + darwin grpc gaps from v4.2.1 (#9781) 2026-05-12 17:22:09 +02:00
base-images.yml ci(base-images): also trigger rebuild on .docker/install-base-deps.sh changes 2026-05-09 22:30:46 +00:00
build-test.yaml feat(ci): allow routing apt traffic through an alternate Ubuntu mirror (#9650) 2026-05-03 23:50:13 +02:00
bump-inference-defaults.yml chore(deps): bump peter-evans/create-pull-request from 7 to 8 (#9114) 2026-03-24 08:50:50 +01:00
bump_deps.yaml ci(bump-deps): register ds4 + move version pin into the Makefile (#9761) 2026-05-11 22:46:02 +02:00
bump_docs.yaml fix(api)!: Stop model prior to deletion (#8422) 2026-02-06 09:22:10 +01:00
checksum_checker.yaml feat(ci): allow routing apt traffic through an alternate Ubuntu mirror (#9650) 2026-05-03 23:50:13 +02:00
deploy-explorer.yaml fix(api)!: Stop model prior to deletion (#8422) 2026-02-06 09:22:10 +01:00
gallery-agent.yaml Change cron schedule to run every 12 hours 2026-04-25 18:38:28 +02:00
generate_intel_image.yaml ci(concurrency): make cancel-in-progress event-aware, group by sha on push 2026-05-09 08:30:55 +00:00
gh-pages.yml chore(deps): bump actions/upload-pages-artifact from 4 to 5 (#9337) 2026-04-13 21:53:47 +02:00
image-pr.yml ci(concurrency): make cancel-in-progress event-aware, group by sha on push 2026-05-09 08:30:55 +00:00
image.yml ci(concurrency): make cancel-in-progress event-aware, group by sha on push 2026-05-09 08:30:55 +00:00
image_build.yml chore(deps): bump actions/upload-artifact from 4 to 7 (#9770) 2026-05-12 09:20:03 +02:00
image_merge.yml chore(deps): bump actions/download-artifact from 4 to 8 (#9771) 2026-05-12 09:20:14 +02:00
lint.yml ci(concurrency): make cancel-in-progress event-aware, group by sha on push 2026-05-09 08:30:55 +00:00
notify-releases.yaml fix(api)!: Stop model prior to deletion (#8422) 2026-02-06 09:22:10 +01:00
release.yaml feat(ci): allow routing apt traffic through an alternate Ubuntu mirror (#9650) 2026-05-03 23:50:13 +02:00
secscan.yaml Revert "chore(deps): bump securego/gosec from 2.22.9 to 2.22.11" (#7789) 2025-12-30 09:58:13 +01:00
stalebot.yml chore(deps): bump actions/stale from 10.1.1 to 10.2.0 (#8633) 2026-02-23 23:27:20 +01:00
test-extra.yml feat(whisper-cpp): implement streaming transcription (#9751) 2026-05-10 23:11:46 +02:00
test.yml ci: drop paths-ignore from test.yml and tests-e2e.yml 2026-05-09 09:23:51 +00:00
tests-aio.yml ci(concurrency): make cancel-in-progress event-aware, group by sha on push 2026-05-09 08:30:55 +00:00
tests-e2e.yml ci: drop paths-ignore from test.yml and tests-e2e.yml 2026-05-09 09:23:51 +00:00
tests-ui-e2e.yml ci(concurrency): make cancel-in-progress event-aware, group by sha on push 2026-05-09 08:30:55 +00:00
update_swagger.yaml feat(ci): allow routing apt traffic through an alternate Ubuntu mirror (#9650) 2026-05-03 23:50:13 +02:00
yaml-check.yml chore(backend gallery): add description for remaining backends (#5679) 2025-06-17 22:21:44 +02:00