mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2026-09-02 02:51:17 +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
76 lines
2.4 KiB
YAML
76 lines
2.4 KiB
YAML
name: UI Publish
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
version_tag:
|
|
description: 'Version tag to publish under (e.g., b1234)'
|
|
required: true
|
|
type: string
|
|
secrets:
|
|
hf_token:
|
|
description: 'Hugging Face token with write access'
|
|
required: true
|
|
|
|
jobs:
|
|
build:
|
|
name: Build static output
|
|
uses: ./.github/workflows/ui-build.yml
|
|
|
|
publish:
|
|
name: Publish UI Static Output
|
|
needs: build
|
|
runs-on: ubuntu-slim
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
env:
|
|
HF_BUCKET_NAME: ${{ vars.HF_BUCKET_UI_STATIC_OUTPUT }}
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 1
|
|
|
|
- name: Download UI build artifact
|
|
uses: actions/download-artifact@v7
|
|
with:
|
|
name: llama-ui.zip
|
|
path: tools/ui/dist/
|
|
|
|
- name: Create distribution archive
|
|
run: |
|
|
tar -czf dist.tar.gz -C tools/ui/dist .
|
|
sha256sum dist.tar.gz > dist.tar.gz.sha256
|
|
mv dist.tar.gz dist.tar.gz.sha256 tools/ui/dist/
|
|
|
|
- name: Install Hugging Face Hub CLI
|
|
run: pip install -U huggingface_hub
|
|
|
|
- name: Authenticate with Hugging Face
|
|
run: hf auth login --token ${{ secrets.hf_token }}
|
|
|
|
- name: Sync built files to Hugging Face bucket (version tag)
|
|
run: |
|
|
# Upload the built files to the Hugging Face bucket under the release version
|
|
hf buckets sync tools/ui/dist hf://buckets/ggml-org/${{ env.HF_BUCKET_NAME }}/${{ inputs.version_tag }} --delete --quiet
|
|
|
|
- name: Sync built files to Hugging Face bucket (latest)
|
|
run: |
|
|
# Also upload to the 'latest' directory for fallback downloads
|
|
hf buckets sync tools/ui/dist hf://buckets/ggml-org/${{ env.HF_BUCKET_NAME }}/latest --delete --quiet
|
|
|
|
- name: Verify upload
|
|
run: |
|
|
# List the files in the bucket to verify the upload
|
|
hf buckets list hf://buckets/ggml-org/${{ env.HF_BUCKET_NAME }}/${{ inputs.version_tag }} -R -h
|
|
|
|
- name: Clean up root-level files
|
|
run: |
|
|
# Clean up any old root-level files from previous non-versioned deployments
|
|
hf buckets rm ggml-org/${{ env.HF_BUCKET_NAME }}/index.html --yes 2>/dev/null || true
|
|
hf buckets rm ggml-org/${{ env.HF_BUCKET_NAME }}/bundle.js --yes 2>/dev/null || true
|
|
hf buckets rm ggml-org/${{ env.HF_BUCKET_NAME }}/bundle.css --yes 2>/dev/null || true
|