echodict/llama.cpp
version https://git-lfs.github.com/spec/v1 oid sha256:cfc44b7ba25614df70e6b65e3341cae0310163bd32fd31a6b928a542df433faf size 30786
0773
1name: Server (sanitize)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-sanitize.yml',19 '**/CMakeLists.txt',20 '**/Makefile',21 '**/*.h',22 '**/*.hpp',23 '**/*.c',24 '**/*.cpp',25 'tools/server/**.*'26 ]27 28env:29 LLAMA_LOG_COLORS: 130 LLAMA_LOG_PREFIX: 131 LLAMA_LOG_TIMESTAMPS: 132 LLAMA_LOG_VERBOSITY: 1033 34concurrency:35 group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || github.run_id }}36 cancel-in-progress: true37 38jobs:39 server:40 runs-on: ubuntu-latest41 42 strategy:43 matrix:44 sanitizer: [ADDRESS, UNDEFINED] # THREAD is very slow45 build_type: [RelWithDebInfo]46 fail-fast: false47 48 steps:49 - name: Dependencies50 id: depends51 run: |52 sudo apt-get update53 sudo apt-get -y install \54 build-essential \55 xxd \56 git \57 cmake \58 curl \59 wget \60 language-pack-en \61 libssl-dev62 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 \74 -DLLAMA_BUILD_BORINGSSL=ON \75 -DGGML_SCHED_NO_REALLOC=ON \76 -DGGML_SANITIZE_ADDRESS=${{ matrix.sanitizer == 'ADDRESS' }} \77 -DGGML_SANITIZE_THREAD=${{ matrix.sanitizer == 'THREAD' }} \78 -DGGML_SANITIZE_UNDEFINED=${{ matrix.sanitizer == 'UNDEFINED' }} \79 -DLLAMA_SANITIZE_ADDRESS=${{ matrix.sanitizer == 'ADDRESS' }} \80 -DLLAMA_SANITIZE_THREAD=${{ matrix.sanitizer == 'THREAD' }} \81 -DLLAMA_SANITIZE_UNDEFINED=${{ matrix.sanitizer == 'UNDEFINED' }}82 cmake --build build --config ${{ matrix.build_type }} -j $(nproc) --target llama-server83 84 - name: Python setup85 id: setup_python86 uses: actions/setup-python@v687 with:88 python-version: '3.11'89 pip-install: -r tools/server/tests/requirements.txt90 91 - name: Tests92 id: server_integration_tests93 if: ${{ (!matrix.disabled_on_pr || !github.event.pull_request) }}94 run: |95 cd tools/server/tests96 export ${{ matrix.extra_args }}97 pytest -v -x -m "not slow"98 99 - name: Slow tests100 id: server_integration_tests_slow101 if: ${{ (github.event.schedule || github.event.inputs.slow_tests == 'true') && matrix.build_type == 'Release' }}102 run: |103 cd tools/server/tests104 export ${{ matrix.extra_args }}105 SLOW_TESTS=1 pytest -v -x106 