diff --git a/.github/workflows/build-cmake-pkg.yml b/.github/workflows/build-cmake-pkg.yml index b36ac5b8e..5becff09c 100644 --- a/.github/workflows/build-cmake-pkg.yml +++ b/.github/workflows/build-cmake-pkg.yml @@ -5,17 +5,12 @@ on: jobs: linux: - runs-on: ubuntu-slim + runs-on: [self-hosted, Linux, CPU] steps: - uses: actions/checkout@v6 with: fetch-depth: 0 - - name: Install dependencies - run: | - sudo apt update - sudo apt install -y build-essential tcl cmake - - name: Build run: | PREFIX="$(pwd)"/inst diff --git a/.github/workflows/build-self-hosted.yml b/.github/workflows/build-self-hosted.yml index c247222eb..375e75c52 100644 --- a/.github/workflows/build-self-hosted.yml +++ b/.github/workflows/build-self-hosted.yml @@ -55,24 +55,7 @@ env: LLAMA_LOG_TIMESTAMPS: 1 jobs: - determine-tag: - name: Determine tag name - runs-on: [self-hosted, fast] - outputs: - tag_name: ${{ steps.tag.outputs.name }} - steps: - - name: Clone - uses: actions/checkout@v6 - with: - fetch-depth: 0 - - name: Determine tag name - id: tag - uses: ./.github/actions/get-tag-name - env: - BRANCH_NAME: ${{ github.head_ref || github.ref_name }} - ggml-ci-nvidia-cuda: - needs: determine-tag runs-on: [self-hosted, Linux, NVIDIA] steps: @@ -82,14 +65,11 @@ jobs: - name: Test id: ggml-ci - env: - HF_UI_VERSION: ${{ needs.determine-tag.outputs.tag_name }} run: | nvidia-smi GG_BUILD_CUDA=1 bash ./ci/run.sh ~/results/llama.cpp ~/mnt/llama.cpp ggml-ci-nvidia-vulkan-cm: - needs: determine-tag runs-on: [self-hosted, Linux, NVIDIA] steps: @@ -99,14 +79,11 @@ jobs: - name: Test id: ggml-ci - env: - HF_UI_VERSION: ${{ needs.determine-tag.outputs.tag_name }} run: | vulkaninfo --summary GG_BUILD_VULKAN=1 GGML_VK_DISABLE_COOPMAT2=1 bash ./ci/run.sh ~/results/llama.cpp ~/mnt/llama.cpp ggml-ci-nvidia-vulkan-cm2: - needs: determine-tag runs-on: [self-hosted, Linux, NVIDIA, COOPMAT2] steps: @@ -116,14 +93,11 @@ jobs: - name: Test id: ggml-ci - env: - HF_UI_VERSION: ${{ needs.determine-tag.outputs.tag_name }} run: | vulkaninfo --summary GG_BUILD_VULKAN=1 bash ./ci/run.sh ~/results/llama.cpp ~/mnt/llama.cpp ggml-ci-nvidia-webgpu: - needs: determine-tag runs-on: [self-hosted, Linux, NVIDIA, X64] steps: @@ -154,7 +128,6 @@ jobs: # TODO: provision AMX-compatible machine #ggml-ci-cpu-amx: - # needs: determine-tag # runs-on: [self-hosted, Linux, CPU, AMX] # steps: @@ -169,7 +142,6 @@ jobs: # TODO: provision AMD GPU machine # ggml-ci-amd-vulkan: - # needs: determine-tag # runs-on: [self-hosted, Linux, AMD] # steps: @@ -185,7 +157,6 @@ jobs: # TODO: provision AMD GPU machine # ggml-ci-amd-rocm: - # needs: determine-tag # runs-on: [self-hosted, Linux, AMD] # steps: @@ -200,7 +171,6 @@ jobs: # GG_BUILD_ROCM=1 GG_BUILD_AMDGPU_TARGETS="gfx1101" bash ./ci/run.sh ~/results/llama.cpp ~/mnt/llama.cpp ggml-ci-mac-metal: - needs: determine-tag runs-on: [self-hosted, macOS, ARM64] steps: @@ -210,13 +180,10 @@ jobs: - name: Test id: ggml-ci - env: - HF_UI_VERSION: ${{ needs.determine-tag.outputs.tag_name }} run: | GG_BUILD_METAL=1 bash ./ci/run.sh ~/results/llama.cpp ~/mnt/llama.cpp ggml-ci-mac-webgpu: - needs: determine-tag runs-on: [self-hosted, macOS, ARM64] steps: @@ -239,14 +206,11 @@ jobs: - name: Test id: ggml-ci - env: - HF_UI_VERSION: ${{ needs.determine-tag.outputs.tag_name }} run: | GG_BUILD_WEBGPU=1 GG_BUILD_WEBGPU_DAWN_PREFIX="$GITHUB_WORKSPACE/dawn" \ bash ./ci/run.sh ~/results/llama.cpp ~/mnt/llama.cpp ggml-ci-mac-vulkan: - needs: determine-tag runs-on: [self-hosted, macOS, ARM64] steps: @@ -256,14 +220,11 @@ jobs: - name: Test id: ggml-ci - env: - HF_UI_VERSION: ${{ needs.determine-tag.outputs.tag_name }} run: | vulkaninfo --summary GG_BUILD_VULKAN=1 bash ./ci/run.sh ~/results/llama.cpp ~/mnt/llama.cpp ggml-ci-linux-intel-vulkan: - needs: determine-tag runs-on: [self-hosted, Linux, Intel] steps: @@ -275,14 +236,11 @@ jobs: - name: Test id: ggml-ci - env: - HF_UI_VERSION: ${{ needs.determine-tag.outputs.tag_name }} run: | vulkaninfo --summary GG_BUILD_VULKAN=1 bash ./ci/run.sh ~/results/llama.cpp ~/mnt/llama.cpp ggml-ci-win-intel-vulkan: - needs: determine-tag runs-on: [self-hosted, Windows, X64, Intel] steps: @@ -297,7 +255,6 @@ jobs: MSYSTEM: UCRT64 CHERE_INVOKING: 1 PATH: C:\msys64\ucrt64\bin;C:\msys64\usr\bin;C:\Windows\System32;${{ env.PATH }} - HF_UI_VERSION: ${{ needs.determine-tag.outputs.tag_name }} run: | vulkaninfo --summary # Skip python related tests with GG_BUILD_LOW_PERF=1 since Windows MSYS2 UCRT64 currently fails to create @@ -305,7 +262,6 @@ jobs: LLAMA_FATAL_WARNINGS=OFF GG_BUILD_NINJA=1 GG_BUILD_VULKAN=1 GG_BUILD_LOW_PERF=1 ./ci/run.sh ./results/llama.cpp ./mnt/llama.cpp ggml-ci-intel-openvino-gpu-low-perf: - needs: determine-tag runs-on: [self-hosted, Linux, Intel, OpenVINO] concurrency: @@ -337,15 +293,12 @@ jobs: - name: Test id: ggml-ci - env: - HF_UI_VERSION: ${{ needs.determine-tag.outputs.tag_name }} run: | source ./openvino_toolkit/setupvars.sh GG_BUILD_OPENVINO=1 GGML_OPENVINO_DEVICE=GPU GG_BUILD_LOW_PERF=1 bash ./ci/run.sh ~/results/llama.cpp ~/mnt/llama.cpp ggml-ci-arm64-cpu-low-perf: - needs: determine-tag - runs-on: [self-hosted, Linux, ARM64] + runs-on: [self-hosted, Linux, ARM64, CPU] steps: - name: Clone @@ -358,8 +311,7 @@ jobs: LLAMA_ARG_THREADS=$(nproc) GG_BUILD_LOW_PERF=1 bash ./ci/run.sh ~/results/llama.cpp ~/mnt/llama.cpp ggml-ci-arm64-cpu-high-perf: - needs: determine-tag - runs-on: [self-hosted, Linux, ARM64] + runs-on: [self-hosted, Linux, ARM64, CPU] steps: - name: Clone @@ -378,8 +330,7 @@ jobs: # if we resolve this, we should be able to offload these jobs to the self-hosted runners # # ggml-ci-arm64-cpu-high-perf-sve: -# needs: determine-tag -# runs-on: [self-hosted, Linux, NVIDIA, ARM64] +# runs-on: [self-hosted, Linux, ARM64, CPU] # # steps: # - name: Clone @@ -392,8 +343,7 @@ jobs: # LLAMA_ARG_THREADS=$(nproc) GG_BUILD_NO_BF16=1 GG_BUILD_EXTRA_TESTS_0=1 bash ./ci/run.sh ~/results/llama.cpp ~/mnt/llama.cpp # # ggml-ci-arm64-cpu-kleidiai: -# needs: determine-tag -# runs-on: [self-hosted, Linux, NVIDIA, ARM64] +# runs-on: [self-hosted, Linux, ARM64, CPU] # # steps: # - name: Clone diff --git a/.github/workflows/check-vendor.yml b/.github/workflows/check-vendor.yml index 1671ed7b8..015629f38 100644 --- a/.github/workflows/check-vendor.yml +++ b/.github/workflows/check-vendor.yml @@ -19,7 +19,7 @@ on: jobs: check-vendor: - runs-on: ubuntu-slim + runs-on: [self-hosted, fast] steps: - name: Checkout diff --git a/.github/workflows/code-style.yml b/.github/workflows/code-style.yml index c88396c0a..50b598b84 100644 --- a/.github/workflows/code-style.yml +++ b/.github/workflows/code-style.yml @@ -15,7 +15,7 @@ concurrency: jobs: model-naming: - runs-on: ubuntu-slim + runs-on: [self-hosted, fast] steps: - uses: actions/checkout@v6 - name: Check model naming conventions diff --git a/.github/workflows/editorconfig.yml b/.github/workflows/editorconfig.yml index 53f6a0ccf..59159cd41 100644 --- a/.github/workflows/editorconfig.yml +++ b/.github/workflows/editorconfig.yml @@ -15,7 +15,7 @@ concurrency: jobs: editorconfig: - runs-on: ubuntu-slim + runs-on: [self-hosted, fast] steps: - uses: actions/checkout@v6 - uses: editorconfig-checker/action-editorconfig-checker@840e866d93b8e032123c23bac69dece044d4d84c # v2.2.0 diff --git a/.github/workflows/pre-tokenizer-hashes.yml b/.github/workflows/pre-tokenizer-hashes.yml index 7126b62b6..fce70d03e 100644 --- a/.github/workflows/pre-tokenizer-hashes.yml +++ b/.github/workflows/pre-tokenizer-hashes.yml @@ -12,7 +12,7 @@ on: jobs: pre-tokenizer-hashes: - runs-on: ubuntu-slim + runs-on: [self-hosted, fast] steps: - name: Checkout repository diff --git a/.github/workflows/python-check-requirements.yml b/.github/workflows/python-check-requirements.yml index 1219b8745..2c7fab40b 100644 --- a/.github/workflows/python-check-requirements.yml +++ b/.github/workflows/python-check-requirements.yml @@ -20,7 +20,7 @@ concurrency: jobs: python-check-requirements: - runs-on: ubuntu-slim + runs-on: [self-hosted, CPU, fast] name: check-requirements steps: - name: Check out source repository diff --git a/.github/workflows/python-lint.yml b/.github/workflows/python-lint.yml index 1e5d64c1a..0424f372a 100644 --- a/.github/workflows/python-lint.yml +++ b/.github/workflows/python-lint.yml @@ -21,7 +21,7 @@ concurrency: jobs: flake8-lint: - runs-on: ubuntu-slim + runs-on: [self-hosted, fast] name: Lint steps: - name: Check out source repository diff --git a/.github/workflows/python-type-check.yml b/.github/workflows/python-type-check.yml index cbeeb39d0..14edb1a9d 100644 --- a/.github/workflows/python-type-check.yml +++ b/.github/workflows/python-type-check.yml @@ -22,7 +22,7 @@ concurrency: jobs: python-type-check: - runs-on: ubuntu-slim + runs-on: [self-hosted, fast] name: python type-check steps: - name: Check out source repository diff --git a/.github/workflows/ui-build.yml b/.github/workflows/ui-build.yml index 38fba13ad..2653afd06 100644 --- a/.github/workflows/ui-build.yml +++ b/.github/workflows/ui-build.yml @@ -5,8 +5,7 @@ on: jobs: build: - name: Build static output - runs-on: ubuntu-slim + runs-on: [self-hosted, fast] env: BRANCH_NAME: ${{ github.head_ref || github.ref_name }} diff --git a/.github/workflows/ui-self-hosted.yml b/.github/workflows/ui-self-hosted.yml new file mode 100644 index 000000000..64a4519c6 --- /dev/null +++ b/.github/workflows/ui-self-hosted.yml @@ -0,0 +1,118 @@ +name: UI (self-hosted) + +# these are the same as ui.yml, but with self-hosted runners +# the runners come with pre-installed Playwright browsers version: 1.56.1 +# the jobs are much lighter because they don't need to install node and playwright browsers + +on: + workflow_dispatch: + inputs: + sha: + description: 'Commit SHA1 to build' + required: false + type: string + push: + branches: + - master + paths: [ + '.github/workflows/ui-self-hosted.yml', + '.github/workflows/ui-build.yml', + 'tools/ui/**.*', + 'tools/server/tests/**.*' + ] + pull_request: + types: [opened, synchronize, reopened] + paths: [ + '.github/workflows/ui-self-hosted.yml', + '.github/workflows/ui-build.yml', + 'tools/ui/**.*', + 'tools/server/tests/**.*' + ] + +env: + LLAMA_LOG_COLORS: 1 + LLAMA_LOG_PREFIX: 1 + LLAMA_LOG_TIMESTAMPS: 1 + LLAMA_LOG_VERBOSITY: 10 + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + ui-build: + name: Build static output + uses: ./.github/workflows/ui-build.yml + + ui-checks: + name: Checks + needs: ui-build + runs-on: [self-hosted, PLAYWRIGHT] + continue-on-error: true + steps: + - name: Checkout code + uses: actions/checkout@v6 + with: + fetch-depth: 0 + ref: ${{ github.event.inputs.sha || github.event.pull_request.head.sha || github.sha || github.head_ref || github.ref_name }} + + - name: Install dependencies + id: setup + run: npm ci + working-directory: tools/ui + + - name: Run type checking + if: ${{ always() && steps.setup.conclusion == 'success' }} + run: npm run check + working-directory: tools/ui + + - name: Run linting + if: ${{ always() && steps.setup.conclusion == 'success' }} + run: npm run lint + working-directory: tools/ui + + - name: Run Client tests + if: ${{ always() }} + run: npm run test:client + working-directory: tools/ui + + - name: Run Unit tests + if: ${{ always() }} + run: npm run test:unit + working-directory: tools/ui + + e2e-tests: + name: E2E Tests + needs: ui-build + runs-on: [self-hosted, PLAYWRIGHT] + steps: + - name: Checkout code + uses: actions/checkout@v6 + with: + fetch-depth: 0 + ref: ${{ github.event.inputs.sha || github.event.pull_request.head.sha || github.sha || github.head_ref || github.ref_name }} + + - name: Install dependencies + id: setup + run: npm ci + working-directory: tools/ui + + - name: Build application + if: ${{ always() && steps.setup.conclusion == 'success' }} + run: npm run build + working-directory: tools/ui + + - name: Build Storybook + if: ${{ always() }} + run: npm run build-storybook + working-directory: tools/ui + + - name: Run UI tests + if: ${{ always() }} + run: npm run test:ui -- --testTimeout=60000 + working-directory: tools/ui + + - name: Run E2E tests + if: ${{ always() }} + run: npm run test:e2e + working-directory: tools/ui diff --git a/.github/workflows/ui-ci.yml b/.github/workflows/ui.yml similarity index 95% rename from .github/workflows/ui-ci.yml rename to .github/workflows/ui.yml index 761a93194..b5e745718 100644 --- a/.github/workflows/ui-ci.yml +++ b/.github/workflows/ui.yml @@ -1,4 +1,4 @@ -name: CI (UI) +name: UI on: workflow_dispatch: @@ -11,14 +11,16 @@ on: branches: - master paths: [ - '.github/workflows/ui-ci.yml', + '.github/workflows/ui.yml', + '.github/workflows/ui-build.yml', 'tools/ui/**.*', 'tools/server/tests/**.*' ] pull_request: types: [opened, synchronize, reopened] paths: [ - '.github/workflows/ui-ci.yml', + '.github/workflows/ui.yml', + '.github/workflows/ui-build.yml', 'tools/ui/**.*', 'tools/server/tests/**.*' ] @@ -39,7 +41,7 @@ jobs: uses: ./.github/workflows/ui-build.yml ui-checks: - name: UI Checks + name: Checks needs: ui-build runs-on: ubuntu-latest continue-on-error: true diff --git a/.github/workflows/update-ops-docs.yml b/.github/workflows/update-ops-docs.yml index 2ab06eb98..6e8bc1aa0 100644 --- a/.github/workflows/update-ops-docs.yml +++ b/.github/workflows/update-ops-docs.yml @@ -3,18 +3,20 @@ name: Update Operations Documentation on: push: paths: + - '.github/workflows/update-ops-docs.yml' - 'docs/ops.md' - 'docs/ops/**' - 'scripts/create_ops_docs.py' pull_request: paths: + - '.github/workflows/update-ops-docs.yml' - 'docs/ops.md' - 'docs/ops/**' - 'scripts/create_ops_docs.py' jobs: update-ops-docs: - runs-on: ubuntu-slim + runs-on: [self-hosted, fast, ARM64] steps: - name: Checkout repository