mirror of
https://github.com/mudler/LocalAI.git
synced 2026-07-31 10:28:43 -04:00
Version-pin bumps dominate PR volume: 48 update/* PRs in the week to
2026-07-30, from 16 pins, each a two-line diff. bump_deps.yaml runs a 28-entry
matrix daily and opens one PR per moved pin; CRISPASR and the gallery checksum
produced one every day, ik-llama-cpp six in seven days. Almost all of them edit
nothing but a single backend/*/<name>/Makefile.
Neither image-pr.yml nor build-test.yaml can observe such a change. `make build`
is `go build ./cmd/local-ai`, GoReleaser builds that plus ./cmd/launcher, and
the core image's final stage ships only entrypoint.sh, healthcheck.sh and the
binary. The per-backend trees are copied into the builder but nothing in them
reaches the output. That is 7 + 3 jobs per bump PR that cannot fail for a reason
the diff caused, roughly 410 jobs a week.
Add backend/{cpp,go,python}/** to the paths-ignore of those two workflows. The
inputs that do reach the binary are deliberately outside those prefixes and so
still trigger a full run: backend/backend.proto (protogen-go), go.mod/go.sum
(the go mod tidy before-hook), and backend/Dockerfile.* .
Not applied to the workflows that genuinely read that tree:
test.yml TEST_PATHS names ./backend/go/{cloud-proxy,local-store,
valkey-store}/...
lint.yml .golangci.yml carries backend/-scoped rules
tests-e2e.yml the e2e suite drives real backends over gRPC
backend_pr.yml its whole job is rebuilding the changed backend
Simulated against the change shapes that occur in this repo. Pin bumps and
python requirement bumps skip; backend.proto, go.mod, a core Go edit, a
backend/Dockerfile edit and any mixed diff all still run, since paths-ignore
skips only when every changed file matches.
Assisted-by: Claude:opus-5 [claude-code]
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Co-authored-by: Ettore Di Giacinto <mudler@localai.io>
101 lines
3.4 KiB
YAML
101 lines
3.4 KiB
YAML
name: Build test
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
# GoReleaser and the darwin launcher take no gallery, docs or markdown
|
|
# input, so a diff confined to these paths cannot change either binary.
|
|
# The darwin job matters here: macOS is the scarcest runner class.
|
|
#
|
|
# backend/{cpp,go,python}/**: GoReleaser builds ./cmd/local-ai and the
|
|
# launcher builds ./cmd/launcher; neither compiles a backend. The
|
|
# before-hooks still matter, but their input is backend/backend.proto
|
|
# (protogen-go) and go.mod/go.sum (go mod tidy), none of which live under
|
|
# these prefixes, so a change to any of those still triggers a full run.
|
|
# See .agents/ci-caching.md.
|
|
paths-ignore:
|
|
- 'gallery/**'
|
|
- 'docs/**'
|
|
- 'examples/**'
|
|
- '**/*.md'
|
|
- 'backend/cpp/**'
|
|
- 'backend/go/**'
|
|
- 'backend/python/**'
|
|
|
|
# Supersede an in-flight run when a PR gets a new push. Keyed on the PR number
|
|
# so every push to the same PR shares a group; on a master push the key falls
|
|
# back to github.sha (unique per commit) and cancel-in-progress is false, so
|
|
# master runs never cancel each other -- each commit is built on its own.
|
|
concurrency:
|
|
group: ci-build-test-${{ github.event.pull_request.number || github.sha }}-${{ github.repository }}
|
|
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
|
|
jobs:
|
|
build-test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v7
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: 1.25
|
|
# A PR builds only the host target. The three-platform cross-compile
|
|
# (linux/amd64, linux/arm64, darwin/arm64) is the bulk of this job's
|
|
# ~6.6min median and no PR consumes the resulting binaries. The
|
|
# before-hooks (protogen-go, react-ui, go mod tidy) run either way, so the
|
|
# "is the release build broken" signal is unchanged. master and tags still
|
|
# build everything.
|
|
- name: Run GoReleaser
|
|
run: |
|
|
make ${{ github.event_name == 'pull_request' && 'dev-dist-single' || 'dev-dist' }}
|
|
launcher-build-darwin:
|
|
runs-on: macos-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v7
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: 1.25
|
|
- name: Build launcher for macOS ARM64
|
|
run: |
|
|
make build-launcher-darwin
|
|
ls -liah dist
|
|
- name: Upload macOS launcher artifacts
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: launcher-macos
|
|
path: dist/
|
|
retention-days: 30
|
|
|
|
launcher-build-linux:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v7
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Configure apt mirror on runner
|
|
uses: ./.github/actions/configure-apt-mirror
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: 1.25
|
|
- name: Build launcher for Linux
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install golang gcc libgl1-mesa-dev xorg-dev libxkbcommon-dev
|
|
make build-launcher-linux
|
|
- name: Upload Linux launcher artifacts
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: launcher-linux
|
|
path: local-ai-launcher-linux.tar.xz
|
|
retention-days: 30 |