6
6
push :
7
7
branches :
8
8
- master
9
- - test/server-add-ci-test # FIXME remove
10
- paths : ['.github/workflows/**', '**/CMakeLists.txt', '**/Makefile', '**/*.h', '**/*.hpp', '**/*.c', '**/*.cpp', '**/*.cu', '**/*.swift', '**/*.m', 'examples/server/**.*']
9
+ paths : ['.github/workflows/server.yml', '**/CMakeLists.txt', '**/Makefile', '**/*.h', '**/*.hpp', '**/*.c', '**/*.cpp', '**/*.cu', '**/*.swift', '**/*.m', 'examples/server/tests/**.*']
11
10
pull_request :
12
11
types : [opened, synchronize, reopened]
13
- paths : ['**/CMakeLists.txt', '**/Makefile', '**/*.h', '**/*.hpp', '**/*.c', '**/*.cpp', '**/*.cu', '**/*.swift', '**/*.m', 'examples/server/**.*']
12
+ paths : ['.github/workflows/server.yml', ' **/CMakeLists.txt', '**/Makefile', '**/*.h', '**/*.hpp', '**/*.c', '**/*.cpp', '**/*.cu', '**/*.swift', '**/*.m', 'examples/server/tests /**.*']
14
13
15
14
jobs :
16
15
server :
17
16
runs-on : ubuntu-latest
18
17
19
18
strategy :
20
19
matrix :
21
- build : [noavx, avx2, avx, avx512, cublas, clblast, openblas, kompute, vulkan]
22
20
sanitizer : [ADDRESS, THREAD, UNDEFINED]
23
21
build_type : [Debug, Release]
24
22
include :
25
- - build : ' noavx'
26
- defines : ' -DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_AVX=OFF -DLLAMA_AVX2=OFF -DLLAMA_FMA=OFF'
27
- image : ubuntu:latest
28
- - build : ' avx2'
29
- defines : ' -DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON'
30
- image : ubuntu:latest
31
- - build : ' avx'
32
- defines : ' -DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_AVX2=OFF'
33
- image : ubuntu:latest
34
- - build : ' avx512'
35
- defines : ' -DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_AVX512=ON'
36
- image : ubuntu:latest
37
- experimental : true
38
- - build : ' cublas'
39
- defines : ' -DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_CUBLAS=ON'
40
- image : nvidia/cuda:12.3.1-devel-ubuntu22.04
41
- arch_not_available : true # require nvidia docker engine
42
- - build : ' clblast'
43
- defines : ' -DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_CLBLAST=ON'
44
- image : ubuntu:latest
45
- arch_not_available : true
46
- - build : ' openblas'
47
- defines : ' -DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_BLAS=ON -DLLAMA_BLAS_VENDOR=OpenBLAS'
48
- image : ubuntu:latest
49
- - build : ' kompute'
50
- defines : ' -DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_KOMPUTE=ON -DKOMPUTE_OPT_DISABLE_VULKAN_VERSION_CHECK=ON'
51
- image : ubuntu:latest
52
- arch_not_available : true
53
- - build : ' vulkan'
54
- defines : ' -DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_VULKAN=ON'
55
- image : ubuntu:latest
56
- arch_not_available : true
23
+ - build_type : Release
24
+ sanitizer : " "
25
+ exclude :
26
+ - build_type : Release
27
+ sanitizer : ADDRESS
28
+ - build_type : Release
29
+ sanitizer : THREAD
30
+ - build_type : Release
31
+ sanitizer : UNDEFINED
57
32
58
33
container :
59
- image : ${{ matrix.image }}
34
+ image : ubuntu:latest
60
35
ports :
61
36
- 8888
62
37
options : --cpus 4
@@ -72,40 +47,22 @@ jobs:
72
47
apt-get update
73
48
apt-get -y install \
74
49
build-essential \
75
- pkg-config \
76
50
git \
77
51
cmake \
78
52
python3-pip \
79
53
wget \
80
54
psmisc
81
55
82
- - name : Download CLBlast
83
- id : get_clblast
84
- if : ${{ matrix.build == 'clblast' }}
85
- run : |
86
- apt install -y libclblast-dev
87
-
88
- - name : Download OpenBLAS
89
- id : get_openblas
90
- if : ${{ matrix.build == 'openblas' }}
91
- run : |
92
- apt-get -y install libopenblas-dev
93
-
94
- - name : Install Vulkan SDK
95
- id : get_vulkan
96
- if : ${{ matrix.build == 'kompute' || matrix.build == 'vulkan' }}
97
- run : |
98
- wget -qO- https://packages.lunarg.com/lunarg-signing-key-pub.asc | tee /etc/apt/trusted.gpg.d/lunarg.asc
99
- wget -qO /etc/apt/sources.list.d/lunarg-vulkan-jammy.list http://packages.lunarg.com/vulkan/lunarg-vulkan-jammy.list
100
- apt-get update
101
- apt-get -y install vulkan-sdk
102
-
103
56
- name : Build
104
57
id : cmake_build
105
58
run : |
106
59
mkdir build
107
60
cd build
108
- cmake .. -DLLAMA_SANITIZE_${{ matrix.sanitizer }}=ON -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ${{ matrix.defines }}
61
+ cmake .. \
62
+ -DLLAMA_NATIVE=OFF \
63
+ -DLLAMA_BUILD_SERVER=ON \
64
+ -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
65
+ -DLLAMA_SANITIZE_${{ matrix.sanitizer }}=ON ;
109
66
cmake --build . --config ${{ matrix.build_type }} -j $(nproc) --target server
110
67
111
68
- name : Tests dependencies
121
78
122
79
- name : Tests
123
80
id : server_integration_test
124
- continue-on-error : ${{ matrix.experimental || matrix.arch_not_available }}
125
81
run : |
126
82
cd examples/server/tests
127
83
PORT=8888 ./tests.sh
0 commit comments