Felipe97/llama-cpp-compiled
01.2k
1name: UI Build2 3on:4 workflow_call:5 inputs:6 ui_version:7 description: 'Version string embedded in build.json (e.g. b1234); defaults to b<commit-count>'8 required: false9 type: string10 11jobs:12 build:13 runs-on: ubuntu-slim14 env:15 BRANCH_NAME: ${{ github.head_ref || github.ref_name }}16 17 steps:18 - name: Checkout code19 uses: actions/checkout@v620 with:21 fetch-depth: 022 23 - name: Resolve UI version24 id: version25 run: |26 version="${{ inputs.ui_version }}"27 if [ -z "$version" ]; then28 version="b$(git rev-list --count HEAD)"29 fi30 echo "ui_version=${version}" >> $GITHUB_OUTPUT31 32 - name: Setup Node.js33 uses: actions/setup-node@v634 with:35 node-version: "24"36 # cache: "npm"37 # cache-dependency-path: "tools/ui/package-lock.json"38 package-manager-cache: false39 40 - name: Install dependencies41 run: npm ci42 working-directory: tools/ui43 44 - name: Build application45 env:46 LLAMA_BUILD_NUMBER: ${{ steps.version.outputs.ui_version }}47 run: npm run build48 working-directory: tools/ui49 50 - name: Run PWA unit tests (versioned build output)51 run: npx vitest --project=unit --run tests/unit/pwa.spec.ts52 working-directory: tools/ui53 54 - name: Upload built UI55 uses: actions/upload-artifact@v656 with:57 name: llama-ui.zip58 path: tools/ui/dist/59 retention-days: 160 