-
Notifications
You must be signed in to change notification settings - Fork 48
84 lines (80 loc) · 2.36 KB
/
llama-cpp-rs-check.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
78
79
80
81
82
83
84
name: Llama Cpp Rs Check
on:
pull_request:
branches:
- main
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: read-all
jobs:
check:
name: Run Tests on LLama Cpp Rs
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
submodules: recursive
- name: Install Compile Deps
env:
DEBIAN_FRONTEND: noninteractive
run:
sudo apt-get update && sudo apt-get install -y build-essential curl libssl-dev libclang-dev pkg-config cmake git
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- name: Clippy
run: cargo clippy
- name: Fmt
run: cargo fmt
- name: Test
run: cargo test --features sampler
arm64:
name: Check that it builds on various targets
runs-on: ubuntu-latest
strategy:
matrix:
target: [ linux/arm64, linux/amd64 ]
steps:
- name: checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- name: Setup QEMU
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf
with:
platforms: arm64,amd64
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349
- name: Build
uses: docker/build-push-action@v6
with:
file: test-build.Dockerfile
target: base-cuda
platforms: ${{ matrix.target }}
mac:
name: Check that it builds on mac
runs-on: macos-latest
steps:
- name: checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
submodules: recursive
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Build
run: cargo build --features sampler
windows:
name: Check that it builds on windows
runs-on: windows-latest
steps:
- name: checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
submodules: recursive
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Build
run: cargo build --features sampler
- name: Test
run: cargo test --features sampler