-
Notifications
You must be signed in to change notification settings - Fork 1.1k
77 lines (58 loc) · 1.58 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test-macos-metal:
runs-on: macos-13
env:
GGML_NLOOP: 3
GGML_NITER: 1
GGML_N_THREADS: 2
steps:
- uses: actions/checkout@v3
- name: Create Build Environment
run: mkdir build
- name: Configure CMake
working-directory: ./build
run: cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DGGML_METAL=OFF ..
- name: Build
working-directory: ./build
run: make
- name: Test
working-directory: ./build
run: ctest --verbose --timeout 900
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
env:
GGML_NLOOP: 3
GGML_NITER: 1
steps:
- uses: actions/checkout@v3
- name: Dependencies for Ubuntu
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install llvm
- name: Set GGML_N_THREADS for Ubuntu
run: echo "GGML_N_THREADS=2" >> $GITHUB_ENV
if: matrix.os == 'ubuntu-latest'
- name: Set GGML_N_THREADS for MacOS
run: echo "GGML_N_THREADS=2" >> $GITHUB_ENV
if: matrix.os == 'macos-latest'
- name: Create Build Environment
run: mkdir build
- name: Configure CMake
working-directory: ./build
run: cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DGGML_METAL=OFF ..
- name: Build
working-directory: ./build
run: make
- name: Test
working-directory: ./build
run: ctest --verbose --timeout 900