forked from kherud/java-llama.cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (73 loc) · 2.3 KB
/
ci.yml
File metadata and controls
77 lines (73 loc) · 2.3 KB
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
# This work flow runs all Java tests for continuous integration.
# Since it has to build llama.cpp first, for speed, it only runs / tests on the natively supported GitHub runners.
name: Continuous Integration
on: [ "pull_request", "workflow_dispatch" ]
env:
MODEL_URL: "https://huggingface.co/TheBloke/CodeLlama-7B-GGUF/resolve/main/codellama-7b.Q2_K.gguf"
MODEL_NAME: "codellama-7b.Q2_K.gguf"
jobs:
# don't split build and test jobs to keep the workflow simple
build-and-test-linux:
name: ubuntu-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '11'
- name: Build libraries
# cmake should figure out OS and ARCH automatically when running build.sh (but we need mvn compile for it)
run: |
mvn compile
.github/build.sh
- name: Download model
run: curl -L ${MODEL_URL} --create-dirs -o models/${MODEL_NAME}
- name: Run tests
run: mvn test
build-and-test-macos:
name: ${{ matrix.target.runner }}
runs-on: ${{ matrix.target.runner }}
strategy:
fail-fast: false
matrix:
target:
- {
runner: macos-13,
cmake: '-DLLAMA_METAL=OFF'
}
- {
runner: macos-14,
cmake: '-DLLAMA_METAL_EMBED_LIBRARY=ON -DLLAMA_METAL=OFF'
}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '11'
- name: Build libraries
run: |
mvn compile
.github/build.sh ${{ matrix.target.cmake }}
- name: Download model
run: curl -L ${MODEL_URL} --create-dirs -o models/${MODEL_NAME}
- name: Run tests
run: mvn test
build-and-test-windows:
name: windows-latest
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '11'
- name: Build libraries
run: |
mvn compile
.github\build.bat
- name: Download model
run: curl -L $env:MODEL_URL --create-dirs -o models/$env:MODEL_NAME
- name: Run tests
run: mvn test