echodict/llama.cpp
version https://git-lfs.github.com/spec/v1 oid sha256:cfc44b7ba25614df70e6b65e3341cae0310163bd32fd31a6b928a542df433faf size 30786
0773
1name: Server (self-hosted)2 3on:4 workflow_dispatch: # allows manual triggering5 inputs:6 sha:7 description: 'Commit SHA1 to build'8 required: false9 type: string10 slow_tests:11 description: 'Run slow tests'12 required: true13 type: boolean14 push:15 branches:16 - master17 paths: [18 '.github/workflows/server-self-hosted.yml',19 '**/CMakeLists.txt',20 '**/Makefile',21 '**/*.h',22 '**/*.hpp',23 '**/*.c',24 '**/*.cpp',25 '**/*.cu',26 '**/*.swift',27 '**/*.m',28 'tools/server/**.*'29 ]30 31env:32 LLAMA_LOG_COLORS: 133 LLAMA_LOG_PREFIX: 134 LLAMA_LOG_TIMESTAMPS: 135 LLAMA_LOG_VERBOSITY: 1036 37concurrency:38 group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || github.run_id }}39 cancel-in-progress: true40 41jobs:42 server-metal:43 runs-on: [self-hosted, llama-server, macOS, ARM64]44 45 name: server-metal (${{ matrix.wf_name }})46 strategy:47 matrix:48 build_type: [Release]49 wf_name: ["GPUx1"]50 include:51 - build_type: Release52 extra_args: "LLAMA_ARG_BACKEND_SAMPLING=1"53 wf_name: "GPUx1, backend-sampling"54 - build_type: Release55 extra_args: "GGML_METAL_DEVICES=2"56 wf_name: "GPUx2"57 - build_type: Release58 extra_args: "GGML_METAL_DEVICES=2 LLAMA_ARG_BACKEND_SAMPLING=1"59 wf_name: "GPUx2, backend-sampling"60 fail-fast: false61 62 steps:63 - name: Clone64 id: checkout65 uses: actions/checkout@v666 with:67 fetch-depth: 068 ref: ${{ github.event.inputs.sha || github.event.pull_request.head.sha || github.sha || github.head_ref || github.ref_name }}69 70 - name: Build71 id: cmake_build72 run: |73 cmake -B build -DGGML_SCHED_NO_REALLOC=ON74 cmake --build build --config ${{ matrix.build_type }} -j $(sysctl -n hw.logicalcpu) --target llama-server75 76 - name: Tests77 id: server_integration_tests78 if: ${{ (!matrix.disabled_on_pr || !github.event.pull_request) }}79 run: |80 cd tools/server/tests81 python3 -m venv venv82 source venv/bin/activate83 pip install -r requirements.txt84 export ${{ matrix.extra_args }}85 pytest -v -x -m "not slow"86 87 # TODO: provision CUDA runner88 # server-cuda:89 # runs-on: [self-hosted, llama-server, Linux, NVIDIA]90 #91 # name: server-cuda (${{ matrix.wf_name }})92 # strategy:93 # matrix:94 # build_type: [Release]95 # wf_name: ["GPUx1"]96 # include:97 # - build_type: Release98 # extra_args: "LLAMA_ARG_BACKEND_SAMPLING=1"99 # wf_name: "GPUx1, backend-sampling"100 # fail-fast: false101 #102 # steps:103 # - name: Clone104 # id: checkout105 # uses: actions/checkout@v6106 # with:107 # fetch-depth: 0108 # ref: ${{ github.event.inputs.sha || github.event.pull_request.head.sha || github.sha || github.head_ref || github.ref_name }}109 #110 # - name: Build111 # id: cmake_build112 # run: |113 # cmake -B build -DGGML_SCHED_NO_REALLOC=ON114 # cmake --build build --config ${{ matrix.build_type }} -j $(sysctl -n hw.logicalcpu) --target llama-server115 #116 # - name: Tests117 # id: server_integration_tests118 # if: ${{ (!matrix.disabled_on_pr || !github.event.pull_request) }}119 # run: |120 # cd tools/server/tests121 # python3 -m venv venv122 # source venv/bin/activate123 # pip install -r requirements.txt124 # export ${{ matrix.extra_args }}125 # pytest -v -x -m "not slow"126 