Skip to content

Update

Update #21

Workflow file for this run

name: CI
on:
push:
pull_request:
jobs:
ubuntu-cpu:
name: Ubuntu (CPU)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install build deps
run: |
sudo apt-get update
sudo apt-get install -y build-essential cmake git pkg-config libpthread-stubs0-dev libcurl4-openssl-dev
- name: Initialize submodules
run: |
git submodule sync --recursive
git submodule update --init --recursive --depth 1
- name: Build llama.cpp (CPU backend)
run: |
mkdir -p third_party/llama.cpp/build
cd third_party/llama.cpp/build
cmake .. -DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=OFF \
-DGGML_METAL=OFF \
-DGGML_BLAS=OFF \
-DLLAMA_CURL=OFF
cmake --build . --config Release -j$(nproc)
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
cache: false
- name: Build repository
run: |
go version
go build ./...
- name: Run tests
env:
LLMC_SUBPROCESS: "0"
run: |
go test ./... -v -count=1
macos-metal:
name: MacOS (Metal)
runs-on: macos-latest
steps:
- name: Checkout (with submodules)
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Initialize submodules
run: |
git submodule sync --recursive
git submodule update --init --recursive
- name: Build llama.cpp (Metal backend)
run: |
mkdir -p third_party/llama.cpp/build
cd third_party/llama.cpp/build
cmake .. -DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=OFF \
-DGGML_METAL=ON \
-DGGML_BLAS=ON \
-DGGML_BLAS_VENDOR=Apple
cmake --build . --config Release -j$(sysctl -n hw.ncpu)
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
cache: false
- name: Build repository
run: |
go version
go build ./...
- name: Run tests
env:
LLMC_SUBPROCESS: "0"
run: |
go test ./... -v -count=1
windows-cpu:
name: Windows (CPU)
runs-on: windows-latest
steps:
- name: Checkout (with submodules)
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Initialize submodules
run: |
git submodule sync --recursive
git submodule update --init --recursive
- name: Build llama.cpp (CPU backend)
run: |
mkdir -p third_party/llama.cpp/build
cd third_party/llama.cpp/build
cmake .. -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release `
-DBUILD_SHARED_LIBS=OFF `
-DGGML_METAL=OFF `
-DGGML_BLAS=OFF `
-DGGML_OPENMP=OFF `
-DLLAMA_CURL=OFF `
-DLLAMA_BUILD_COMMON=OFF
cmake --build . --config Release -j $env:NUMBER_OF_PROCESSORS
shell: pwsh
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
cache: false
- name: Build repository
run: |
go version
go build ./...
- name: Run tests
env:
LLMC_SUBPROCESS: "0"
run: |
go test ./... -v -count=1