char-fork/llama.cpp

git clone https://git.t4t.associates/char-fork/llama.cpp

Aleksander Grygierci: Clean up UI builds from releases (#27706)4d19b2876

char/aliceai-t5-moe
3.5 KiB125 linesraw
1name: UI (self-hosted)
2
3# these are the same as ui.yml, but with self-hosted runners
4# the jobs are lighter because they don't need to install Node.js or Playwright browsers
5# the runner has pre-installed Playwright browsers for @playwright/test (1.56.1) at /ms-playwright/
6
7on:
8  workflow_dispatch:
9    inputs:
10      sha:
11        description: 'Commit SHA1 to build'
12        required: false
13        type: string
14  push:
15    branches:
16      - master
17    paths: [
18      '.github/workflows/ui-self-hosted.yml',
19      '.github/workflows/ui-build-self-hosted.yml',
20      'tools/ui/**.*',
21      'tools/server/tests/**.*'
22    ]
23  pull_request:
24    types: [opened, synchronize, reopened]
25    paths: [
26      '.github/workflows/ui-self-hosted.yml',
27      '.github/workflows/ui-build-self-hosted.yml',
28      'tools/ui/**.*',
29      'tools/server/tests/**.*'
30    ]
31
32env:
33  LLAMA_ARG_LOG_COLORS: 1
34  LLAMA_ARG_LOG_PREFIX: 1
35  LLAMA_ARG_LOG_TIMESTAMPS: 1
36  LLAMA_ARG_LOG_VERBOSITY: 10
37
38concurrency:
39  group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || github.run_id }}
40  cancel-in-progress: true
41
42jobs:
43  ui-build:
44    name: Build static output
45    uses: ./.github/workflows/ui-build-self-hosted.yml
46
47  ui-checks:
48    name: Checks
49    needs: ui-build
50    runs-on: [self-hosted, PLAYWRIGHT]
51    continue-on-error: true
52    steps:
53      - name: Checkout code
54        uses: actions/checkout@v6
55        with:
56          fetch-depth: 0
57          ref: ${{ github.event.inputs.sha || github.event.pull_request.head.sha || github.sha || github.head_ref || github.ref_name }}
58
59      - name: Install dependencies
60        id: setup
61        run: npm ci
62        working-directory: tools/ui
63
64      - name: Download built UI artifacts
65        uses: actions/download-artifact@v6
66        with:
67          name: llama-ui.zip
68          path: tools/ui/dist/
69
70      - name: Run type checking
71        if: ${{ always() && steps.setup.conclusion == 'success' }}
72        run: npm run check
73        working-directory: tools/ui
74
75      - name: Run linting
76        if: ${{ always() && steps.setup.conclusion == 'success' }}
77        run: npm run lint
78        working-directory: tools/ui
79
80      - name: Run Client tests
81        if: ${{ always() && steps.setup.conclusion == 'success' }}
82        run: npm run test:client
83        working-directory: tools/ui
84
85      - name: Run Unit tests
86        if: ${{ always() && steps.setup.conclusion == 'success' }}
87        run: npm run test:unit
88        working-directory: tools/ui
89
90  e2e-tests:
91    name: E2E Tests
92    needs: ui-build
93    runs-on: [self-hosted, PLAYWRIGHT]
94    steps:
95      - name: Checkout code
96        uses: actions/checkout@v6
97        with:
98          fetch-depth: 0
99          ref: ${{ github.event.inputs.sha || github.event.pull_request.head.sha || github.sha || github.head_ref || github.ref_name }}
100
101      - name: Install dependencies
102        id: setup
103        run: npm ci
104        working-directory: tools/ui
105
106      - name: Download built UI artifacts
107        uses: actions/download-artifact@v6
108        with:
109          name: llama-ui.zip
110          path: tools/ui/dist/
111
112      - name: Build Storybook
113        if: ${{ always() && steps.setup.conclusion == 'success' }}
114        run: npm run build-storybook
115        working-directory: tools/ui
116
117      - name: Run UI tests
118        if: ${{ always() && steps.setup.conclusion == 'success' }}
119        run: npm run test:ui -- --testTimeout=60000
120        working-directory: tools/ui
121
122      - name: Run E2E tests
123        if: ${{ always() && steps.setup.conclusion == 'success' }}
124        run: npm run test:e2e
125        working-directory: tools/ui