mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2026-09-02 11:01:20 +02:00
4d19b28769
* 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
59 lines
1.5 KiB
YAML
59 lines
1.5 KiB
YAML
name: UI Build
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
ui_version:
|
|
description: 'Version string embedded in build.json (e.g. b1234); defaults to b<commit-count>'
|
|
required: false
|
|
type: string
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-slim
|
|
env:
|
|
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Resolve UI version
|
|
id: version
|
|
run: |
|
|
version="${{ inputs.ui_version }}"
|
|
if [ -z "$version" ]; then
|
|
version="b$(git rev-list --count HEAD)"
|
|
fi
|
|
echo "ui_version=${version}" >> $GITHUB_OUTPUT
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
node-version: "24"
|
|
cache: "npm"
|
|
cache-dependency-path: "tools/ui/package-lock.json"
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
working-directory: tools/ui
|
|
|
|
- name: Build application
|
|
env:
|
|
LLAMA_BUILD_NUMBER: ${{ steps.version.outputs.ui_version }}
|
|
run: npm run build
|
|
working-directory: tools/ui
|
|
|
|
- name: Run PWA unit tests (versioned build output)
|
|
run: npx vitest --project=unit --run tests/unit/pwa.spec.ts
|
|
working-directory: tools/ui
|
|
|
|
- name: Upload built UI
|
|
uses: actions/upload-artifact@v6
|
|
with:
|
|
name: llama-ui.zip
|
|
path: tools/ui/dist/
|
|
retention-days: 1
|