Skip to content

ci : reduce builds in build-xcframework.sh - #27252

Merged
ggerganov merged 4 commits into
masterfrom
gg/ci-parallel-xcframework-builds
Aug 17, 2026
Merged

ci : reduce builds in build-xcframework.sh#27252
ggerganov merged 4 commits into
masterfrom
gg/ci-parallel-xcframework-builds

Conversation

@ggerganov

@ggerganov ggerganov commented Aug 17, 2026

Copy link
Copy Markdown
Member

Overview

Try to multi-thread the ios-xcode job of the release.yml workflow. On master it takes almost 30 minutes.

Test run after the changes: https://github.com/ggml-org/tmp/actions/runs/32021771028

Edit: multi-threading doesn't make a difference. Remove 5 out of the 7 jobs. Build only macos and ios-device for the releases.

Requirements

The ios-xcode release job builds 7 platform/simulator configurations
sequentially, each with -j $(nproc). Run them with at most 3 concurrent
builds (the release runner has 3 cores), splitting the cores between the
builds (-j 1 each on the runner), so total CPU pressure is unchanged while
the build phase runs about 2.3x faster.

- convert the 7 build blocks into functions (flags unchanged)
- add a run_builds_parallel pool: 3-slot sliding window, per-build logs,
  dumps the failing log and aborts on error (background job failures do
  not trigger set -e)
- queue the 2-arch builds first so the slower builds occupy the slots early

Assisted-by: pi:llama.cpp/Qwen3.8-27B
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Aug 17, 2026
@ggerganov ggerganov changed the title ci : parallelize platform builds in build-xcframework.sh ci : reduce build in build-xcframework.sh Aug 17, 2026
@ggerganov
ggerganov marked this pull request as ready for review August 17, 2026 11:24
@ggerganov
ggerganov requested a review from danbev as a code owner August 17, 2026 11:24
The script now takes an optional list of builds to run
(ios-sim ios-device macos visionos visionos-sim tvos-sim tvos-device);
with no arguments it builds all of them, as before. The per-build
lists for the build pool, framework setup, static library combining
and xcframework creation are now driven by a single build_spec
lookup instead of four hardcoded (partially commented-out) lists.

release.yml builds only macos and ios-device to cut the build time.

Assisted-by: pi:llama.cpp/Qwen3.8-27B
@ggerganov
ggerganov requested a review from a team as a code owner August 17, 2026 11:31
@github-actions github-actions Bot added the devops improvements to build systems and github actions label Aug 17, 2026
@ggerganov ggerganov changed the title ci : reduce build in build-xcframework.sh ci : reduce builds in build-xcframework.sh Aug 17, 2026
@ggerganov
ggerganov merged commit 805984d into master Aug 17, 2026
3 checks passed
@ggerganov
ggerganov deleted the gg/ci-parallel-xcframework-builds branch August 17, 2026 11:53
gabe-l-hart added a commit to gabe-l-hart/llama.cpp that referenced this pull request Aug 17, 2026
* origin/master: (86 commits)
ui: enforce alphabetical enum member ordering (ggml-org#27272)
ui: Refactor Built-In Tools naming (Server/Browser) (ggml-org#27271)
ci: more optimizations (ggml-org#26983)
doc: document MCP stdio servers and CORS defaults in the server README [no release] [no ci] (ggml-org#26847)
server: save processed mtmd chunks as placeholder (ggml-org#27278)
mtmd: use sha256 for input hashing (ggml-org#27274)
vocab : support integer tokenizer scores (ggml-org#27260)
mtmd : skip thumbnail for non-tiled LFM2 images (ggml-org#27246)
cuda : skip UMA override for HIP builds (ggml-org#27083)
vendor: move hash to vendor (ggml-org#27262)
ci : push release tag explicitly in release.yml (ggml-org#27261)
ui: move get_datetime tool to frontend (ggml-org#27255)
ci : reduce builds in build-xcframework.sh (ggml-org#27252)
model: support speculators-format checkpoints for DSpark (ggml-org#26275)
ui: add browser get_info tool (ggml-org#27251)
ci : restore release.yml check during make-release.yml (ggml-org#27247)
mtmd: harden preprocessor_granite (ggml-org#27235)
ci : allow make-release to target a specific commit (ggml-org#27234)
ci : make release workflows use a deploy key (ggml-org#27229)
convert: add @ModelBase.example (ggml-org#27208)
...
brittlewis12 pushed a commit to brittlewis12/llama.cpp that referenced this pull request Aug 17, 2026
* ci : parallelize platform builds in build-xcframework.sh

The ios-xcode release job builds 7 platform/simulator configurations
sequentially, each with -j $(nproc). Run them with at most 3 concurrent
builds (the release runner has 3 cores), splitting the cores between the
builds (-j 1 each on the runner), so total CPU pressure is unchanged while
the build phase runs about 2.3x faster.

- convert the 7 build blocks into functions (flags unchanged)
- add a run_builds_parallel pool: 3-slot sliding window, per-build logs,
  dumps the failing log and aborts on error (background job failures do
  not trigger set -e)
- queue the 2-arch builds first so the slower builds occupy the slots early

Assisted-by: pi:llama.cpp/Qwen3.8-27B

* pi : add guideline for comments

* cont : disable 5/7 builds

* ci : make build-xcframework.sh builds configurable via CLI args

The script now takes an optional list of builds to run
(ios-sim ios-device macos visionos visionos-sim tvos-sim tvos-device);
with no arguments it builds all of them, as before. The per-build
lists for the build pool, framework setup, static library combining
and xcframework creation are now driven by a single build_spec
lookup instead of four hardcoded (partially commented-out) lists.

release.yml builds only macos and ios-device to cut the build time.

Assisted-by: pi:llama.cpp/Qwen3.8-27B
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

devops improvements to build systems and github actions documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants