Skip to content

ci: use stubs libraries #210

ci: use stubs libraries

ci: use stubs libraries #210

Workflow file for this run

name: test
on:
pull_request:
jobs:
lint:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
arch: [amd64, arm64]
exclude:
- os: ubuntu-latest
arch: arm64
- os: windows-latest
arch: arm64
- os: macos-latest
arch: amd64
runs-on: ${{ matrix.os }}
env:
GOARCH: ${{ matrix.arch }}
CGO_ENABLED: "1"
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-go@v5
with:
go-version: '1.21'
- run: |
tolower() { echo $1 | tr '[:upper:]' '[:lower:]'; }
case $RUNNER_OS in X64) RUNNER_OS="x86_64" ;; ARM64) arm64 ;; esac
mkdir -p llm/llama.cpp/build/$RUNNER_OS/$(tolower $RUNNER_ARCH)/stub/lib
touch llm/llama.cpp/build/$RUNNER_OS/$(tolower $RUNNER_ARCH)/stub/lib/stub.{dylib,so,dll}
touch llm/llama.cpp/ggml-metal.metal
shell: bash
- uses: golangci/golangci-lint-action@v3
test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
arch: [amd64, arm64]
exclude:
- os: ubuntu-latest
arch: arm64
- os: windows-latest
arch: arm64
- os: macos-latest
arch: amd64
runs-on: ${{ matrix.os }}
env:
GOARCH: ${{ matrix.arch }}
CGO_ENABLED: "1"
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-go@v5
with:
go-version: '1.21'
- run: |
tolower() { echo $1 | tr '[:upper:]' '[:lower:]'; }
case $RUNNER_OS in X64) RUNNER_OS="x86_64" ;; ARM64) arm64 ;; esac
mkdir -p llm/llama.cpp/build/$RUNNER_OS/$(tolower $RUNNER_ARCH)/stub/lib
touch llm/llama.cpp/build/$RUNNER_OS/$(tolower $RUNNER_ARCH)/stub/lib/stub.{dylib,so,dll}
touch llm/llama.cpp/ggml-metal.metal
shell: bash
- run: go get
- run: go build
- run: go test -v ./...