-
Notifications
You must be signed in to change notification settings - Fork 90
71 lines (66 loc) · 2.96 KB
/
Copy pathpr-engine-macos-floor.yml
File metadata and controls
71 lines (66 loc) · 2.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Engine macOS Floor
# Proves the bundled engine actually LOADS on Thuki's minimum macOS. The bug this
# guards against is a dyld load-time failure: a Metal symbol that exists only on
# a newer macOS, hard-imported, aborts llama-server at launch on older systems.
#
# The static audit in scripts/ensure-llama-server.ts already checks the shipped
# binary is built for the floor with a weak residency-set import. This goes one
# step further: it builds the real shipped binary (on macos-15, the same SDK
# releases use) and then *launches it on macos-14* — the oldest GitHub-hosted
# macOS image (macOS 13 runners were removed at the end of 2025). macOS 14, like
# our 13.4 floor, predates the macOS-15 residency-set API, so it exercises the
# exact weak-import load path the floor uses; together with the static
# weak-import audit (which covers the 13.4-to-14 gap), a clean launch proves the
# engine loads on the floor. If a future llama.cpp bump hard-imports a symbol
# from a macOS newer than the floor, `llama-server --version` aborts here with
# "Symbol not found", failing the PR before it can ship.
on:
pull_request:
push:
branches: [main]
permissions:
contents: read
jobs:
build:
name: Build shipped engine (release SDK)
runs-on: macos-15
timeout-minutes: 60
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
with:
bun-version: 1.3.11
- run: bun install --frozen-lockfile
- name: Cache llama.cpp sidecar
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: src-tauri/binaries
key: llama-cpp-${{ runner.os }}-${{ hashFiles('scripts/ensure-llama-server.ts') }}
- name: Build llama-server sidecar
run: bun run engine:ensure
- name: Upload the built engine
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: engine-binaries
path: src-tauri/binaries
retention-days: 1
loads-on-floor:
name: Engine loads on macOS 14
needs: build
runs-on: macos-14
timeout-minutes: 15
steps:
- name: Download the built engine
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: engine-binaries
path: src-tauri/binaries
- name: Launch the engine (must load, not dyld-fail)
run: |
set -euo pipefail
chmod +x src-tauri/binaries/llama-server-aarch64-apple-darwin
# --version forces the load-time dyld bind of libggml-metal (a hard
# @rpath dependency), which is exactly where an incompatible Metal
# symbol would abort. A clean exit proves the shipped binary loads.
./src-tauri/binaries/llama-server-aarch64-apple-darwin --version
echo "engine loaded cleanly on macOS $(sw_vers -productVersion)"