Skip to content

Commit 42b5359

Browse files
committed
ci : add ubuntu cuda build, build with one arch on windows
1 parent 0cc6375 commit 42b5359

File tree

4 files changed

+50
-18
lines changed

4 files changed

+50
-18
lines changed

.github/labeler.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,18 @@ Kompute:
33
- changed-files:
44
- any-glob-to-any-file:
55
- ggml/include/ggml-kompute.h
6-
- ggml/src/ggml-kompute.cpp
6+
- ggml/src/ggml-kompute/**
77
- README-kompute.md
88
Apple Metal:
99
- changed-files:
1010
- any-glob-to-any-file:
1111
- ggml/include/ggml-metal.h
12-
- ggml/src/ggml-metal.cpp
12+
- ggml/src/ggml-metal/**
1313
- README-metal.md
1414
SYCL:
1515
- changed-files:
1616
- any-glob-to-any-file:
1717
- ggml/include/ggml-sycl.h
18-
- ggml/src/ggml-sycl.cpp
1918
- ggml/src/ggml-sycl/**
2019
- docs/backend/SYCL.md
2120
- examples/sycl/**
@@ -27,8 +26,8 @@ Nvidia GPU:
2726
Vulkan:
2827
- changed-files:
2928
- any-glob-to-any-file:
30-
- ggml/ggml_vk_generate_shaders.py
31-
- ggml/src/ggml-vulkan*
29+
- ggml/include/ggml-vulkan.h
30+
- ggml/src/ggml-vulkan/**
3231
documentation:
3332
- changed-files:
3433
- any-glob-to-any-file:
@@ -75,11 +74,7 @@ server:
7574
ggml:
7675
- changed-files:
7776
- any-glob-to-any-file:
78-
- ggml/include/ggml*.h
79-
- ggml/src/ggml*.c
80-
- ggml/src/ggml*.cpp
81-
- ggml/src/ggml*.h
82-
- ggml-cuda/**
77+
- ggml/**
8378
nix:
8479
- changed-files:
8580
- any-glob-to-any-file:

.github/workflows/build.yml

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -871,6 +871,27 @@ jobs:
871871
path: llama-${{ steps.tag.outputs.name }}-bin-win-${{ matrix.build }}.zip
872872
name: llama-bin-win-${{ matrix.build }}.zip
873873

874+
ubuntu-latest-cmake-cuda:
875+
runs-on: ubuntu-latest
876+
container: nvidia/cuda:12.6.2-devel-ubuntu24.04
877+
878+
steps:
879+
- name: Clone
880+
id: checkout
881+
uses: actions/checkout@v4
882+
883+
- name: Install dependencies
884+
env:
885+
DEBIAN_FRONTEND: noninteractive
886+
run: |
887+
apt update
888+
apt install -y cmake build-essential ninja-build libgomp1 git
889+
890+
- name: Build with CMake
891+
run: |
892+
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DGGML_NATIVE=OFF -DGGML_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=89-real -DCMAKE_EXE_LINKER_FLAGS=-Wl,--allow-shlib-undefined -DLLAMA_FATAL_WARNINGS=ON
893+
cmake --build build
894+
874895
windows-latest-cmake-cuda:
875896
runs-on: windows-2019
876897

@@ -894,14 +915,21 @@ jobs:
894915
method: 'network'
895916
sub-packages: '["nvcc", "cudart", "cublas", "cublas_dev", "thrust", "visual_studio_integration"]'
896917

897-
- name: Build
898-
id: cmake_build
918+
- name: Build (all architectures)
919+
id: cmake_build_all
920+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
899921
run: |
900-
mkdir build
901-
cd build
902-
cmake .. -DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DGGML_CUDA=ON -DBUILD_SHARED_LIBS=ON -DGGML_RPC=ON
903-
cmake --build . --config Release -j $((${env:NUMBER_OF_PROCESSORS} - 1)) -t ggml
904-
cmake --build . --config Release -j ${env:NUMBER_OF_PROCESSORS}
922+
cmake -S . -B build -DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DGGML_CUDA=ON -DBUILD_SHARED_LIBS=ON -DGGML_RPC=ON
923+
cmake --build build --config Release -j $((${env:NUMBER_OF_PROCESSORS} - 1)) -t ggml
924+
cmake --build build --config Release -j ${env:NUMBER_OF_PROCESSORS}
925+
926+
- name: Build (single architecture)
927+
id: cmake_build_single
928+
if: ${{ github.event_name == 'pull_request' }}
929+
run: |
930+
cmake -S . -B build -DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DGGML_CUDA=ON -DBUILD_SHARED_LIBS=ON -DGGML_RPC=ON -DCMAKE_CUDA_ARCHITECTURES=75-virtual
931+
cmake --build build --config Release -j $((${env:NUMBER_OF_PROCESSORS} - 1)) -t ggml
932+
cmake --build build --config Release -j ${env:NUMBER_OF_PROCESSORS}
905933
906934
- name: Determine tag name
907935
id: tag

.github/workflows/nix-ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ on:
55
push:
66
branches:
77
- master
8+
paths: ['.github/workflows/nix-ci.yml', '**/flake.nix', '**/flake.lock', '**/CMakeLists.txt', '**/Makefile', '**/*.h', '**/*.hpp', '**/*.c', '**/*.cpp', '**/*.cu', '**/*.cuh', '**/*.swift', '**/*.m', '**/*.metal']
89
pull_request:
910
types: [opened, synchronize, reopened]
11+
paths: ['.github/workflows/nix-ci.yml', '**/flake.nix', '**/flake.lock', '**/CMakeLists.txt', '**/Makefile', '**/*.h', '**/*.hpp', '**/*.c', '**/*.cpp', '**/*.cu', '**/*.cuh', '**/*.swift', '**/*.m', '**/*.metal']
1012

1113
concurrency:
1214
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}

.github/workflows/python-lint.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
name: flake8 Lint
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches:
6+
- master
7+
paths: ['.github/workflows/python-lint.yml', '**/*.py']
8+
pull_request:
9+
types: [opened, synchronize, reopened]
10+
paths: ['.github/workflows/python-lint.yml', '**/*.py']
411

512
concurrency:
613
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}

0 commit comments

Comments
 (0)