ci: Clean up UI builds from releases - #27706
Conversation
1f7602e to
926f1a8
Compare
There was a problem hiding this comment.
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.ymlto resolve a default UI version from the repo commit count and inject it viaLLAMA_BUILD_NUMBER. - Remove per-job UI builds (and the now-removed
get-versionjob /-DHF_UI_VERSIONflags) fromrelease.yml, replacing them withdownload-artifactof theui-buildoutput. - Rename the reusable workflow input from
hf_ui_versiontoui_versionand 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.
926f1a8 to
39ca942
Compare
5a5c5fa to
bcb3439
Compare
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 good catch, the test verifies the default UI-enabled serving and the The assets will come from prebuilt UI, so no build will happen there. Fixed with 601d3e1 |
https://github.com/allozaur/llama.cpp/actions/runs/32949926605 |
734b725 to
6b9bad3
Compare
| 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) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Right, when LLAMA_USE_PREBUILT_UI=ON and LLAMA_BUILD_UI=OFF (i.e. the default) we should fetch the prebuilt UI.
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
@CISC can u take a look and re-approve if all lgty
There was a problem hiding this comment.
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
6b9bad3 to
8264969
Compare
| # 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] |
There was a problem hiding this comment.
@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.
* 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
Overview
The release CI now builds the UI exactly once in the
ui-buildjob and all server build jobs simply download that artifact intotools/ui/dist/, instead of each job running its ownsetup-node+npm run build(or silently fetching from the HF bucket).The version is resolved directly in
ui-build.ymlasb$(git rev-list --count HEAD), so the embedded UI version now matches the release tag, and theget-versionjob plus the no-op-DHF_UI_VERSIONflags are gone.TLDR; faster jobs, no node toolchain in build jobs, and every release binary embeds the identical UI.
Additional information
get-versionjob inrelease.yml; always fell back to<hash>-<epoch>, never matching the release tagui-build.ymlasb$(git rev-list --count HEAD)- matches the binaries and the taghf_ui_versionui_versionsetup-node+npm ci+npm run buildui-buildjob; server jobs download its artifact intotools/ui/dist/windows,windows-cuda,windows-sycl)Setup Node.jsstepios-xcodeget-versiondespite not building the UI-DHF_UI_VERSION-D)windows-rocmui-buildartifactRequirements