char-fork/llama.cpp
git clone https://git.t4t.associates/char-fork/llama.cpp
37b3a9e0c
char/aliceai-t5-moe
1name : Server (sanitize) 2 3on : 4workflow_dispatch : # allows manual triggering 5inputs : 6sha : 7description : 'Commit SHA1 to build' 8required : false 9type : string 10slow_tests : 11description : 'Run slow tests' 12required : true 13type : boolean 14push : 15branches : 16- master 17paths : [ 18'.github/workflows/server-sanitize.yml' , 19'**/CMakeLists.txt' , 20'**/Makefile' , 21'**/*.h' , 22'**/*.hpp' , 23'**/*.c' , 24'**/*.cpp' , 25'tools/server/**.*' 26] 27 28pull_request : 29types : [ opened , synchronize , reopened ] 30paths : [ 31'.github/workflows/server-sanitize.yml' 32] 33 34env : 35# note: this is dud token to avoid rate limiting (https://github.com/ggml-org/llama.cpp/pull/25706#issuecomment-4979941302) 36HF_TOKEN : ${{ secrets.HF_TOKEN_CI }} 37LLAMA_ARG_LOG_COLORS : 1 38LLAMA_ARG_LOG_PREFIX : 1 39LLAMA_ARG_LOG_TIMESTAMPS : 1 40LLAMA_ARG_LOG_VERBOSITY : 10 41 42concurrency : 43group : ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || github.run_id }} 44cancel-in-progress : true 45 46jobs : 47server : 48runs-on : hf-jobs-cpu-upgrade 49 50strategy : 51matrix : 52sanitizer : [ ADDRESS , UNDEFINED ] # THREAD is very slow 53build_type : [ RelWithDebInfo ] 54fail-fast : false 55 56steps : 57- name : Clone 58id : checkout 59uses : actions/checkout@v6 60with : 61fetch-depth : 0 62ref : ${{ github.event.inputs.sha || github.event.pull_request.head.sha || github.sha || github.head_ref || github.ref_name }} 63 64- name : Install dependencies 65run : | 66sudo apt update 67sudo apt install -y build-essential cmake python3-full 68 69- name : ccache 70uses : ggml-org/ccache-action@v1.2.24 71with : 72restore : false 73save : false 74 75- name : ccache-buckets-restore 76uses : ./.github/actions/ccache-buckets 77with : 78key : server-sanitize-${{ matrix.sanitizer }} 79folder : llama.cpp 80hf_bucket : ggml-org/cache 81 82- name : Build 83id : cmake_build 84run : | 85cmake -B build \ 86-DLLAMA_BUILD_BORINGSSL=ON \ 87-DGGML_SCHED_NO_REALLOC=ON \ 88-DGGML_SANITIZE_ADDRESS=${{ matrix.sanitizer == 'ADDRESS' }} \ 89-DGGML_SANITIZE_THREAD=${{ matrix.sanitizer == 'THREAD' }} \ 90-DGGML_SANITIZE_UNDEFINED=${{ matrix.sanitizer == 'UNDEFINED' }} \ 91-DLLAMA_SANITIZE_ADDRESS=${{ matrix.sanitizer == 'ADDRESS' }} \ 92-DLLAMA_SANITIZE_THREAD=${{ matrix.sanitizer == 'THREAD' }} \ 93-DLLAMA_SANITIZE_UNDEFINED=${{ matrix.sanitizer == 'UNDEFINED' }} 94cmake --build build --config ${{ matrix.build_type }} -j $(nproc) --target llama-server 95 96- name : ccache-buckets-save 97if : ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} 98uses : ./.github/actions/ccache-buckets 99env : 100HF_TOKEN : ${{ secrets.HF_TOKEN_CACHE_OUTPUT }} 101with : 102key : server-sanitize-${{ matrix.sanitizer }} 103folder : llama.cpp 104evict-old-files : 1d 105hf_bucket : ggml-org/cache 106save : true 107 108- name : Install Python dependencies 109run : | 110python3 -m venv .venv 111.venv/bin/pip install -r tools/server/tests/requirements.txt 112 113- name : Tests 114id : server_integration_tests 115if : ${{ (!matrix.disabled_on_pr || !github.event.pull_request) }} 116run : | 117source .venv/bin/activate 118cd tools/server/tests 119PYTEST_WORKERS=1 ./tests.sh 120 121- name : Slow tests 122id : server_integration_tests_slow 123if : ${{ (github.event.schedule || github.event.inputs.slow_tests == 'true') && matrix.build_type == 'Release' }} 124run : | 125 source .venv/bin/activate 126 cd tools/server/tests 127 PYTEST_WORKERS=1 SLOW_TESTS=1 ./tests.sh