@@ -10,70 +10,50 @@ jobs:
10
10
build :
11
11
strategy :
12
12
matrix :
13
- os : [ubuntu-latest, macos-latest, macos-13]
13
+ os : [ubuntu-latest, macos-latest, macos-13, windows-latest ]
14
14
libraries : [shared, static]
15
15
16
16
runs-on : ${{ matrix.os }}
17
17
18
18
steps :
19
- - uses : actions/checkout@v3
19
+ - name : Clone
20
+ uses : actions/checkout@v4
20
21
21
22
- name : Dependencies for Ubuntu
22
23
if : matrix.os == 'ubuntu-latest'
23
24
run : |
24
25
sudo apt-get update
25
26
sudo apt-get install llvm
26
27
28
+ - name : Add msbuild to PATH
29
+ if : matrix.os == 'windows-latest'
30
+ uses : microsoft/setup-msbuild@v2
31
+
27
32
- name : Create Build Environment
28
33
run : mkdir build
29
34
30
35
- name : Configure CMake
31
36
working-directory : ./build
32
37
run : cmake ..
33
- -G Ninja
34
- -DCMAKE_C_COMPILER=clang
35
- -DCMAKE_CXX_COMPILER=clang++
38
+ ${{ contains(matrix.os, 'windows') && '-A x64' || '-G Ninja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++' }}
39
+ ${{ matrix.libraries == 'static' && '-DBUILD_SHARED_LIBS=OFF' || '-DBUILD_SHARED_LIBS=ON' }}
36
40
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/installed
37
41
-DGGML_METAL=OFF
38
- ${{ contains(matrix.libraries, 'static') && '-DBUILD_SHARED_LIBS=OFF' || '-DBUILD_SHARED_LIBS=ON' }}
39
42
40
43
- name : Build
41
44
working-directory : ./build
42
- run : cmake --build .
45
+ run : cmake --build . ${{ contains(matrix.os, 'windows') && '--config Release' || '' }}
43
46
44
47
- name : Test
45
48
working-directory : ./build
46
- run : ctest --verbose --timeout 900
49
+ run : ctest --verbose --timeout 900 ${{ contains(matrix.os, 'windows') && '--build-config Release' || '' }}
47
50
48
51
- name : Install
49
52
working-directory : ./build
50
- run : cmake --build . --target install
53
+ run : cmake --build . --target install ${{ contains(matrix.os, 'windows') && '--config Release' || '' }}
51
54
52
55
- name : Test CMake config
53
56
run : |
54
57
mkdir test-cmake
55
- cmake -S examples/test-cmake -B test-cmake -DCMAKE_PREFIX_PATH=${{ github.workspace }}/installed
56
- cmake --build test-cmake
57
-
58
- windows :
59
- if : ${{ github.event_name == 'push' || github.event_name == 'pull_request' ||
60
- github.event.inputs.run_type == 'full-ci' }}
61
- runs-on : windows-latest
62
-
63
- steps :
64
- - name : Clone
65
- uses : actions/checkout@v4
66
-
67
- - name : Add msbuild to PATH
68
- uses : microsoft/setup-msbuild@v2
69
-
70
- - name : Configure
71
- run : >
72
- cmake -S . -B ./build -A x64
73
- -DCMAKE_BUILD_TYPE=Release
74
- -DBUILD_SHARED_LIBS=ON
75
-
76
- - name : Build
77
- run : |
78
- cd ./build
79
- msbuild ALL_BUILD.vcxproj -t:build -p:configuration=Release -p:platform=x64
58
+ cmake -S examples/test-cmake -B test-cmake -DCMAKE_PREFIX_PATH=${{ github.workspace }}/installed ${{ contains(matrix.os, 'windows') && '-A x64' || '-G Ninja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++' }}
59
+ cmake --build test-cmake ${{ contains(matrix.os, 'windows') && '--config Release' || '' }}
0 commit comments