mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2026-08-28 08:01:16 +02:00
985b14912b
* ci : apply ccache-clear with older/min/dry-run to all ccache jobs Assisted-by: llama.cpp:DeepSeek-v4-Flash-0731 * ci : install gh in ccache-clear if missing (container jobs) The ccache-clear action relies on the gh CLI, which is not present in container-based jobs. Install it on demand so those jobs can clear caches. Assisted-by: llama.cpp:DeepSeek-v4-Flash-0731 * ci : install gh via apt repo in ccache-clear The install.sh script used previously is no longer served (404). Switch to the official GitHub CLI apt repository, which is still available. Assisted-by: llama.cpp:DeepSeek-v4-Flash-0731 * ci : pass --repo to gh cache commands in ccache-clear In container jobs gh cannot auto-detect the repository from git, so gh cache list/delete fail with 'failed to run git: not a git repository'. Pass the repository explicitly via --repo using GITHUB_REPOSITORY. Assisted-by: llama.cpp:DeepSeek-v4-Flash-0731 * ci : drop -new suffix from vulkan ccache key The -new suffix was only needed to force a fresh cache. With ccache-clear now evicting stale caches, the original key can be used again. The old ccache-vulkan-ubuntu-24.04-arm-new entries still match the ccache-clear key prefix and are cleaned up automatically. Assisted-by: llama.cpp:DeepSeek-v4-Flash-0731 * ci : fix ccache-clear date parsing on macOS (BSD date) macOS ships BSD date, which has no -d option. The older cutoff check was silently disabled there: 'date: illegal option -- d' errors in the log and the loop was only stopped by the min limit, risking deletion of caches not older than the cutoff (e.g. saved by a concurrent job). Parse the ISO-8601 timestamps with GNU date when available and fall back to BSD date otherwise (TZ=UTC, fractional seconds dropped). Assisted-by: llama.cpp:DeepSeek-v4-Flash-0731 * ci : extract ccache-clear logic into scripts/ccache-clear.sh The composite action now consists of a dedicated step that installs the GitHub CLI when missing (e.g. in container jobs) and a thin step that calls the new script. The script follows the make-release-checks.sh conventions (usage/env header, set -euo pipefail, CLI flags) and only checks that gh is available. The action inputs are unchanged, so the workflow steps are untouched. Assisted-by: llama.cpp:DeepSeek-v4-Flash-0731 * ci : remove unused apple ccaches
164 lines
4.4 KiB
YAML
164 lines
4.4 KiB
YAML
name: CI (CUDA, ubuntu)
|
|
|
|
on:
|
|
workflow_dispatch: # allows manual triggering
|
|
push:
|
|
branches:
|
|
- master
|
|
paths: [
|
|
'.github/workflows/build-cuda-ubuntu.yml',
|
|
'**/CMakeLists.txt',
|
|
'**/.cmake',
|
|
'**/*.h',
|
|
'**/*.hpp',
|
|
'**/*.c',
|
|
'**/*.cpp',
|
|
'**/*.cu',
|
|
'**/*.cuh'
|
|
]
|
|
|
|
pull_request:
|
|
types: [opened, synchronize, reopened]
|
|
paths: [
|
|
'.github/workflows/build-cuda-ubuntu.yml',
|
|
'ggml/src/ggml-cuda/**'
|
|
]
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
|
|
cancel-in-progress: true
|
|
|
|
env:
|
|
GGML_NLOOP: 3
|
|
GGML_N_THREADS: 1
|
|
LLAMA_ARG_LOG_COLORS: 1
|
|
LLAMA_ARG_LOG_PREFIX: 1
|
|
LLAMA_ARG_LOG_TIMESTAMPS: 1
|
|
|
|
jobs:
|
|
cuda:
|
|
runs-on: ubuntu-24.04
|
|
container: nvidia/cuda:12.6.2-devel-ubuntu24.04
|
|
|
|
steps:
|
|
- name: Clone
|
|
id: checkout
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Install dependencies
|
|
env:
|
|
DEBIAN_FRONTEND: noninteractive
|
|
run: |
|
|
apt update
|
|
apt install -y cmake build-essential ninja-build libgomp1 git libssl-dev
|
|
|
|
- name: ccache
|
|
uses: ggml-org/ccache-action@v1.2.21
|
|
with:
|
|
key: cuda-ubuntu-24.04-cuda
|
|
evict-old-files: 1d
|
|
save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
|
|
|
- name: Build with CMake
|
|
# TODO: Remove GGML_CUDA_CUB_3DOT2 flag once CCCL 3.2 is bundled within CTK and that CTK version is used in this project
|
|
run: |
|
|
cmake -S . -B build -G Ninja \
|
|
-DLLAMA_FATAL_WARNINGS=ON \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DCMAKE_CUDA_ARCHITECTURES=89-real \
|
|
-DCMAKE_EXE_LINKER_FLAGS=-Wl,--allow-shlib-undefined \
|
|
-DGGML_NATIVE=OFF \
|
|
-DGGML_CUDA=ON \
|
|
-DGGML_CUDA_CUB_3DOT2=ON
|
|
cmake --build build
|
|
|
|
- name: ccache-clear
|
|
uses: ./.github/actions/ccache-clear
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
with:
|
|
key: cuda-ubuntu-24.04-cuda
|
|
older: 5m
|
|
min: 1
|
|
dry-run: ${{ github.event_name != 'push' || github.ref != 'refs/heads/master' }}
|
|
|
|
hip:
|
|
runs-on: ubuntu-22.04
|
|
container: rocm/dev-ubuntu-22.04:6.1.2
|
|
|
|
steps:
|
|
- name: Clone
|
|
id: checkout
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Dependencies
|
|
id: depends
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y build-essential git cmake rocblas-dev hipblas-dev libssl-dev rocwmma-dev
|
|
|
|
- name: ccache
|
|
uses: ggml-org/ccache-action@v1.2.21
|
|
with:
|
|
key: cuda-ubuntu-22.04-hip
|
|
evict-old-files: 1d
|
|
save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
|
|
|
- name: Build with native CMake HIP support
|
|
id: cmake_build
|
|
run: |
|
|
cmake -B build -S . \
|
|
-DCMAKE_HIP_COMPILER="$(hipconfig -l)/clang" \
|
|
-DGPU_TARGETS="gfx1030" \
|
|
-DGGML_HIP=ON
|
|
cmake --build build --config Release -j $(nproc)
|
|
|
|
- name: ccache-clear
|
|
uses: ./.github/actions/ccache-clear
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
with:
|
|
key: cuda-ubuntu-22.04-hip
|
|
older: 5m
|
|
min: 1
|
|
dry-run: ${{ github.event_name != 'push' || github.ref != 'refs/heads/master' }}
|
|
|
|
musa:
|
|
runs-on: ubuntu-22.04
|
|
container: mthreads/musa:rc4.3.0-devel-ubuntu22.04-amd64
|
|
|
|
steps:
|
|
- name: Clone
|
|
id: checkout
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Dependencies
|
|
id: depends
|
|
run: |
|
|
apt-get update
|
|
apt-get install -y build-essential git cmake libssl-dev
|
|
|
|
- name: ccache
|
|
uses: ggml-org/ccache-action@v1.2.21
|
|
with:
|
|
key: cuda-ubuntu-22.04-musa
|
|
evict-old-files: 1d
|
|
save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
|
|
|
- name: Build with native CMake MUSA support
|
|
id: cmake_build
|
|
run: |
|
|
cmake -B build -S . \
|
|
-DGGML_MUSA=ON
|
|
time cmake --build build --config Release -j $(nproc)
|
|
|
|
- name: ccache-clear
|
|
uses: ./.github/actions/ccache-clear
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
with:
|
|
key: cuda-ubuntu-22.04-musa
|
|
older: 5m
|
|
min: 1
|
|
dry-run: ${{ github.event_name != 'push' || github.ref != 'refs/heads/master' }}
|