server: init functional tests #26
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Server test scenario | ||
name: Server Integration Tests | ||
on: | ||
workflow_dispatch: # allows manual triggering | ||
push: | ||
branches: | ||
- master | ||
- test/server-add-ci-test # FIXME remove | ||
paths: ['.github/workflows/**', '**/CMakeLists.txt', '**/Makefile', '**/*.h', '**/*.hpp', '**/*.c', '**/*.cpp', '**/*.cu', '**/*.swift', '**/*.m', 'examples/server/**.*'] | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
paths: ['**/CMakeLists.txt', '**/Makefile', '**/*.h', '**/*.hpp', '**/*.c', '**/*.cpp', '**/*.cu', '**/*.swift', '**/*.m', 'examples/server/**.*'] | ||
jobs: | ||
ubuntu-latest-cmake: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ubuntu:latest | ||
ports: | ||
- 8888 | ||
options: --cpus 4 | ||
continue-on-error: true | ||
strategy: | ||
matrix: | ||
sanitizer: [ADDRESS, THREAD, UNDEFINED] | ||
build_type: [Debug, Release] | ||
include: | ||
- build: 'noavx' | ||
defines: '-DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_AVX=OFF -DLLAMA_AVX2=OFF -DLLAMA_FMA=OFF' | ||
- build: 'avx2' | ||
defines: '-DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON' | ||
- build: 'avx' | ||
defines: '-DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_AVX2=OFF' | ||
- build: 'avx512' | ||
defines: '-DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_AVX512=ON' | ||
- build: 'clblast' | ||
defines: '-DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_CLBLAST=ON' | ||
- build: 'openblas' | ||
defines: '-DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_BLAS=ON -DLLAMA_BLAS_VENDOR=OpenBLAS' | ||
- build: 'kompute' | ||
defines: '-DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_KOMPUTE=ON -DKOMPUTE_OPT_DISABLE_VULKAN_VERSION_CHECK=ON' | ||
- build: 'vulkan' | ||
defines: '-DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_VULKAN=ON' | ||
- build: 'cuda' | ||
defines: '-DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_CUBLAS=ON' | ||
steps: | ||
- name: Clone | ||
id: checkout | ||
uses: actions/checkout@v3 | ||
- name: Dependencies | ||
id: depends | ||
run: | | ||
apt-get update | ||
apt-get -y install \ | ||
build-essential \ | ||
git \ | ||
cmake \ | ||
python3-pip \ | ||
wget \ | ||
psmisc | ||
- name: Download CLBlast | ||
id: get_clblast | ||
if: ${{ matrix.build == 'clblast' }} | ||
run: | | ||
apt install libclblast-dev | ||
- name: Download OpenBLAS | ||
id: get_openblas | ||
if: ${{ matrix.build == 'openblas' }} | ||
run: | | ||
apt-get -y install libopenblas-dev | ||
- name: Install Vulkan SDK | ||
id: get_vulkan | ||
if: ${{ matrix.build == 'kompute' || matrix.build == 'vulkan' }} | ||
run: | | ||
wget -qO- https://packages.lunarg.com/lunarg-signing-key-pub.asc | tee /etc/apt/trusted.gpg.d/lunarg.asc | ||
wget -qO /etc/apt/sources.list.d/lunarg-vulkan-jammy.list http://packages.lunarg.com/vulkan/lunarg-vulkan-jammy.list | ||
apt-get update | ||
apt-get -y install vulkan-sdk | ||
- name: Install CUDA | ||
id: get_vulkan | ||
Check failure on line 89 in .github/workflows/server-test.yml GitHub Actions / Server Integration TestsInvalid workflow file
|
||
if: ${{ matrix.build == 'cuda' }} | ||
run: | | ||
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb | ||
dpkg -i cuda-keyring_1.1-1_all.deb | ||
apt-get update | ||
apt-get install cuda-toolkit | ||
- name: Build | ||
id: cmake_build | ||
run: | | ||
mkdir build | ||
cd build | ||
cmake .. -DLLAMA_FATAL_WARNINGS=ON -DLLAMA_SANITIZE_${{ matrix.sanitizer }}=ON -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ${{ matrix.defines }} | ||
cmake --build . --config ${{ matrix.build_type }} -j $(nproc) --target server | ||
- name: Tests dependencies | ||
id: test_dependencies | ||
run: | | ||
pip install -r examples/server/tests/requirements.txt | ||
- name: Download test model | ||
id: download_model | ||
run: | | ||
cd examples/server/tests | ||
../../../scripts/hf.sh --repo ggml-org/models --file tinyllamas/stories260K.gguf | ||
- name: Server Integration Tests | ||
id: server_integration_test | ||
run: | | ||
cd examples/server/tests | ||
PORT=8888 ./tests.sh |