Skip to content

Commit 5cb50e7

Browse files
committed
Add back workflow
1 parent 8743d1e commit 5cb50e7

File tree

1 file changed

+77
-0
lines changed

1 file changed

+77
-0
lines changed
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Server build and tests conversion from safetensors and inference
2+
name: LoRA adapters conversion and inference
3+
4+
on:
5+
workflow_dispatch: # allows manual triggering
6+
inputs:
7+
sha:
8+
description: 'Commit SHA1 to build'
9+
required: false
10+
type: string
11+
slow_tests:
12+
description: 'Run slow tests'
13+
required: true
14+
type: boolean
15+
push:
16+
branches:
17+
- master
18+
paths: ['.github/workflows/server.yml', '**/CMakeLists.txt', '**/Makefile', '**/*.h', '**/*.hpp', '**/*.c', '**/*.cpp', '**/*.cu', '**/*.swift', '**/*.m', 'examples/server/**.*']
19+
pull_request:
20+
types: [opened, synchronize, reopened]
21+
paths: ['.github/workflows/server.yml', '**/CMakeLists.txt', '**/Makefile', '**/*.h', '**/*.hpp', '**/*.c', '**/*.cpp', '**/*.cu', '**/*.swift', '**/*.m', 'examples/server/**.*']
22+
23+
concurrency:
24+
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || github.run_id }}
25+
cancel-in-progress: true
26+
27+
jobs:
28+
server:
29+
runs-on: ubuntu-latest
30+
31+
steps:
32+
- name: Dependencies
33+
id: depends
34+
run: |
35+
sudo apt-get update
36+
sudo apt-get -y install \
37+
build-essential \
38+
git \
39+
cmake \
40+
curl \
41+
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash
42+
sudo apt-get install -y git-lfs
43+
44+
- name: Clone
45+
id: checkout
46+
uses: actions/checkout@v4
47+
with:
48+
fetch-depth: 0
49+
ref: ${{ github.event.inputs.sha || github.event.pull_request.head.sha || github.sha || github.head_ref || github.ref_name }}
50+
51+
- name: Python setup
52+
id: setup_python
53+
uses: actions/setup-python@v5
54+
with:
55+
python-version: '3.11'
56+
57+
- name: Tests dependencies
58+
id: test_dependencies
59+
run: |
60+
pip install -r requirements/requirements-all.txt
61+
62+
- name: Build
63+
id: cmake_build
64+
if: ${{ matrix.sanitizer != 'THREAD' }}
65+
run: |
66+
make llama-cli llama-export-lora \
67+
-DGGML_NATIVE=OFF \
68+
-DLLAMA_BUILD_SERVER=ON \
69+
-DLLAMA_CURL=ON \
70+
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
71+
-DLLAMA_SANITIZE_${{ matrix.sanitizer }}=ON ;
72+
cmake --build build --config ${{ matrix.build_type }} -j $(nproc) --target llama-server
73+
74+
- name: Lora convert and inference tests
75+
id: test_lora_conversion_inference
76+
if: ${{ (github.event.schedule || github.event.inputs.slow_tests == 'true') && matrix.build_type == 'Release' }}
77+
run: ./tests/test-lora-conversion-inference.sh

0 commit comments

Comments
 (0)