echodict/llama.cpp
version https://git-lfs.github.com/spec/v1 oid sha256:cfc44b7ba25614df70e6b65e3341cae0310163bd32fd31a6b928a542df433faf size 30786
0773
1name: Server2 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.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 pull_request:31 types: [opened, synchronize, reopened]32 paths: [33 '.github/workflows/server.yml',34 '**/CMakeLists.txt',35 '**/Makefile',36 '**/*.h',37 '**/*.hpp',38 '**/*.c',39 '**/*.cpp',40 '**/*.cu',41 '**/*.swift',42 '**/*.m',43 'tools/server/**.*'44 ]45 46env:47 LLAMA_LOG_COLORS: 148 LLAMA_LOG_PREFIX: 149 LLAMA_LOG_TIMESTAMPS: 150 LLAMA_LOG_VERBOSITY: 1051 52concurrency:53 group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || github.run_id }}54 cancel-in-progress: true55 56jobs:57 server:58 runs-on: ubuntu-latest59 60 name: server (${{ matrix.wf_name }})61 strategy:62 matrix:63 build_type: [Release]64 wf_name: ["default"]65 include:66 - build_type: Release67 extra_args: ""68 wf_name: "default"69 - build_type: Release70 extra_args: "LLAMA_ARG_BACKEND_SAMPLING=1"71 wf_name: "backend-sampling"72 fail-fast: false73 74 steps:75 - name: Dependencies76 id: depends77 run: |78 sudo apt-get update79 sudo apt-get -y install \80 build-essential \81 xxd \82 git \83 cmake \84 curl \85 wget \86 language-pack-en \87 libssl-dev88 89 - name: Clone90 id: checkout91 uses: actions/checkout@v692 with:93 fetch-depth: 094 ref: ${{ github.event.inputs.sha || github.event.pull_request.head.sha || github.sha || github.head_ref || github.ref_name }}95 96 - name: Build97 id: cmake_build98 run: |99 cmake -B build \100 -DLLAMA_BUILD_BORINGSSL=ON \101 -DGGML_SCHED_NO_REALLOC=ON102 cmake --build build --config ${{ matrix.build_type }} -j $(nproc) --target llama-server103 104 - name: Python setup105 id: setup_python106 uses: actions/setup-python@v6107 with:108 python-version: '3.11'109 pip-install: -r tools/server/tests/requirements.txt110 111 - name: Tests112 id: server_integration_tests113 if: ${{ (!matrix.disabled_on_pr || !github.event.pull_request) }}114 run: |115 cd tools/server/tests116 export ${{ matrix.extra_args }}117 pytest -v -x -m "not slow"118 119 - name: Slow tests120 id: server_integration_tests_slow121 if: ${{ (github.event.schedule || github.event.inputs.slow_tests == 'true') && matrix.build_type == 'Release' }}122 run: |123 cd tools/server/tests124 export ${{ matrix.extra_args }}125 SLOW_TESTS=1 pytest -v -x126 127 server-windows:128 runs-on: windows-2022129 130 steps:131 - name: Clone132 id: checkout133 uses: actions/checkout@v6134 with:135 fetch-depth: 0136 ref: ${{ github.event.inputs.sha || github.event.pull_request.head.sha || github.sha || github.head_ref || github.ref_name }}137 138 - name: Build139 id: cmake_build140 run: |141 cmake -B build -DLLAMA_BUILD_BORINGSSL=ON -DGGML_SCHED_NO_REALLOC=ON142 cmake --build build --config Release -j ${env:NUMBER_OF_PROCESSORS} --target llama-server143 144 - name: Python setup145 id: setup_python146 uses: actions/setup-python@v6147 with:148 python-version: '3.11'149 pip-install: -r tools/server/tests/requirements.txt150 151 - name: Tests152 id: server_integration_tests153 if: ${{ !matrix.disabled_on_pr || !github.event.pull_request }}154 run: |155 cd tools/server/tests156 $env:PYTHONIOENCODING = ":replace"157 pytest -v -x -m "not slow"158 159 - name: Slow tests160 id: server_integration_tests_slow161 if: ${{ (github.event.schedule || github.event.inputs.slow_tests == 'true') && matrix.build_type == 'Release' }}162 run: |163 cd tools/server/tests164 $env:SLOW_TESTS = "1"165 pytest -v -x166 