Skip to content

ci: Clean up UI builds from releases - #27706

Merged
allozaur merged 5 commits into
masterfrom
allozaur/chore/clean-up-ui-build-in-ci
Aug 26, 2026
Merged

ci: Clean up UI builds from releases#27706
allozaur merged 5 commits into
masterfrom
allozaur/chore/clean-up-ui-build-in-ci

Conversation

@allozaur

@allozaur allozaur commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Overview

The release CI now builds the UI exactly once in the ui-build job and all server build jobs simply download that artifact into tools/ui/dist/, instead of each job running its own setup-node + npm run build (or silently fetching from the HF bucket).

The version is resolved directly in ui-build.yml as b$(git rev-list --count HEAD), so the embedded UI version now matches the release tag, and the get-version job plus the no-op -DHF_UI_VERSION flags are gone.

TLDR; faster jobs, no node toolchain in build jobs, and every release binary embeds the identical UI.

Additional information

Aspect Before Now
UI version get-version job in release.yml; always fell back to <hash>-<epoch>, never matching the release tag Resolved in ui-build.yml as b$(git rev-list --count HEAD) - matches the binaries and the tag
Version input hf_ui_version ui_version
UI builds per release Up to 10 - each server job ran setup-node + npm ci + npm run build 1 - the ui-build job; server jobs download its artifact into tools/ui/dist/
Backend-only jobs (windows, windows-cuda, windows-sycl) Unused Setup Node.js step Step removed
ios-xcode Depended on get-version despite not building the UI Dependency and flag removed
-DHF_UI_VERSION Passed by 7 jobs; no-op (cmake reads the env var, not -D) Removed
windows-rocm No node - silently downloaded the UI from the HF bucket mid-build Uses the ui-build artifact
Embedded UI Each binary embedded its own npm-built UI All binaries embed the identical artifact

Requirements

@allozaur
allozaur requested a review from a team as a code owner August 25, 2026 16:20
@allozaur
allozaur requested review from CISC and ggerganov and a lite review from Copilot August 25, 2026 16:20
@github-actions github-actions Bot added the devops improvements to build systems and github actions label Aug 25, 2026
@allozaur
allozaur force-pushed the allozaur/chore/clean-up-ui-build-in-ci branch from 1f7602e to 926f1a8 Compare August 25, 2026 16:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors the release-related CI workflows so the web UI is built once (as an artifact) and then reused by downstream build jobs, reducing repeated Node/npm setup and ensuring consistent embedded UI assets across release binaries.

Changes:

  • Update ui-build.yml to resolve a default UI version from the repo commit count and inject it via LLAMA_BUILD_NUMBER.
  • Remove per-job UI builds (and the now-removed get-version job / -DHF_UI_VERSION flags) from release.yml, replacing them with download-artifact of the ui-build output.
  • Rename the reusable workflow input from hf_ui_version to ui_version and update the Docker workflow caller.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
.github/workflows/ui-build.yml Adds UI version resolution and uses it as LLAMA_BUILD_NUMBER for a single UI build artifact.
.github/workflows/release.yml Removes get-version and Node/npm UI builds; downloads the shared ui-build artifact in release build jobs.
.github/workflows/docker.yml Updates the reusable workflow input name to ui_version.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/ui-build.yml
Comment thread .github/workflows/release.yml
@allozaur
allozaur force-pushed the allozaur/chore/clean-up-ui-build-in-ci branch from 926f1a8 to 39ca942 Compare August 25, 2026 17:12
@allozaur
allozaur requested a review from ngxson as a code owner August 25, 2026 17:12
@github-actions github-actions Bot added the build Compilation issues label Aug 25, 2026
Comment thread .github/workflows/release.yml Outdated
@allozaur
allozaur force-pushed the allozaur/chore/clean-up-ui-build-in-ci branch 3 times, most recently from 5a5c5fa to bcb3439 Compare August 26, 2026 07:26
@ggerganov

Copy link
Copy Markdown
Member

@CISC PTAL at these changes. @allozaur add a sample run from your fork.

@allozaur

Copy link
Copy Markdown
Contributor Author

@CISC PTAL at these changes. @allozaur add a sample run from your fork.

Here's the fork's Release workflow run https://github.com/allozaur/llama.cpp/actions/runs/32942817219

@CISC

CISC commented Aug 26, 2026

Copy link
Copy Markdown
Member

@CISC PTAL at these changes. @allozaur add a sample run from your fork.

Here's the fork's Release workflow run https://github.com/allozaur/llama.cpp/actions/runs/32942817219

Can you also do a Docker run?

@CISC

CISC commented Aug 26, 2026

Copy link
Copy Markdown
Member

@allozaur

Copy link
Copy Markdown
Contributor Author

test-no-ui fails: https://github.com/ggml-org/llama.cpp/actions/runs/32942760288/job/98105433497?pr=27706#step:7:770

@CISC good catch, the test verifies the default UI-enabled serving and the --no-ui flag, so both require an embedded UI. The alternative which would be making the test skip when no UI is embedded, would make it vacuous - no CI job would ever exercise it.

The assets will come from prebuilt UI, so no build will happen there.

Fixed with 601d3e1

@allozaur

Copy link
Copy Markdown
Contributor Author

@CISC PTAL at these changes. @allozaur add a sample run from your fork.

Here's the fork's Release workflow run https://github.com/allozaur/llama.cpp/actions/runs/32942817219

Can you also do a Docker run?

https://github.com/allozaur/llama.cpp/actions/runs/32949926605

@allozaur
allozaur force-pushed the allozaur/chore/clean-up-ui-build-in-ci branch 2 times, most recently from 734b725 to 6b9bad3 Compare August 26, 2026 10:17
Comment thread CMakeLists.txt Outdated
option(LLAMA_BUILD_APP "llama: build the unified binary" ${LLAMA_STANDALONE})
option(LLAMA_BUILD_UI "llama: build the embedded Web UI for server" ON)
option(LLAMA_BUILD_UI "llama: build the embedded Web UI for server" OFF)
option(LLAMA_USE_PREBUILT_UI "llama: use prebuilt UI from HF Bucket when available (requires LLAMA_BUILD_UI=ON)" ON)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might get confusing for those that build themselves (without npm) that used to get UI.

IMO this option should not require LLAMA_BUILD_UI=ON.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, when LLAMA_USE_PREBUILT_UI=ON and LLAMA_BUILD_UI=OFF (i.e. the default) we should fetch the prebuilt UI.

@allozaur allozaur Aug 26, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've reworked the commits so that CI optimization stands (no job npm-builds the UI anymore, backend-only jobs untouched) and @CISC remark is resolved (source builds keep getting the UI via download, like on master)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CISC can u take a look and re-approve if all lgty

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, this was slightly confusing, only the comment being wrong. :)

Server jobs now extract the ui-build artifact into tools/ui/dist instead of npm-building the UI. Also removes the get-version job and the no-op -DHF_UI_VERSION flags.

Assisted-by: pi:Kimi-K3
The flag now only controls building the UI from source via npm. The UI
is still embedded by default from local tools/ui/dist or the prebuilt
download (LLAMA_USE_PREBUILT_UI=ON). CI jobs no longer npm-build the
UI; server-sanitize does not need node anymore.

Assisted-by: pi:Kimi-K3
Consistent with the other artifact names in the Actions summary.

Assisted-by: pi:Kimi-K3
The windows-cuda/vulkan/sycl jobs build only the backend library;
llama-server (with the embedded UI) is injected into their zips from
the windows-cpu package during the release. State this in the job
comments and use accurate wording in the merge step.

Assisted-by: pi:Kimi-K3
@allozaur
allozaur force-pushed the allozaur/chore/clean-up-ui-build-in-ci branch from 6b9bad3 to 8264969 Compare August 26, 2026 10:40
@allozaur
allozaur merged commit 4d19b28 into master Aug 26, 2026
30 of 31 checks passed
@allozaur
allozaur deleted the allozaur/chore/clean-up-ui-build-in-ci branch August 26, 2026 12:46
Comment on lines +717 to +720
# TODO: build only the ggml-hip backend like the other windows backend jobs
# (windows-cuda, windows-sycl), then drop the ui-build dependency
windows-rocm:
needs: [check-release]
needs: [check-release, ui-build]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ggml-org/amd @ggml-org/ggml-hip Please address this TODO. It should be a simple change - follow the example of the rest of the jobs in order to build just the hip backend and not the entire project.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in #27753.

thecodacus pushed a commit to thecodacus/llama.cpp that referenced this pull request Sep 7, 2026
* ci : inline UI version resolution into ui-build.yml

* ci : build UI once and reuse the artifact in release jobs

Server jobs now extract the ui-build artifact into tools/ui/dist instead of npm-building the UI. Also removes the get-version job and the no-op -DHF_UI_VERSION flags.

Assisted-by: pi:Kimi-K3

* ui : disable the npm UI build by default (LLAMA_BUILD_UI=OFF)

The flag now only controls building the UI from source via npm. The UI
is still embedded by default from local tools/ui/dist or the prebuilt
download (LLAMA_USE_PREBUILT_UI=ON). CI jobs no longer npm-build the
UI; server-sanitize does not need node anymore.

Assisted-by: pi:Kimi-K3

* ci : rename the ui-build artifact to llama-ui.zip

Consistent with the other artifact names in the Actions summary.

Assisted-by: pi:Kimi-K3

* ci : clarify the windows artifact merge in release.yml

The windows-cuda/vulkan/sycl jobs build only the backend library;
llama-server (with the embedded UI) is injected into their zips from
the windows-cpu package during the release. State this in the job
comments and use accurate wording in the merge step.

Assisted-by: pi:Kimi-K3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Compilation issues devops improvements to build systems and github actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants