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
180 lines
5.7 KiB
YAML
180 lines
5.7 KiB
YAML
name: CI (openvino)
|
|
|
|
on:
|
|
workflow_dispatch: # allows manual triggering
|
|
push:
|
|
branches:
|
|
- master
|
|
paths: [
|
|
'.github/workflows/build-openvino.yml',
|
|
'**/CMakeLists.txt',
|
|
'**/.cmake',
|
|
'**/*.h',
|
|
'**/*.hpp',
|
|
'**/*.c',
|
|
'**/*.cpp',
|
|
]
|
|
|
|
pull_request:
|
|
types: [opened, synchronize, reopened]
|
|
paths: [
|
|
'.github/workflows/build-openvino.yml',
|
|
'ggml/src/ggml-openvino/**'
|
|
]
|
|
|
|
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:
|
|
ubuntu-24-openvino:
|
|
runs-on: [self-hosted, Linux, Intel, OpenVINO]
|
|
|
|
env:
|
|
# Sync versions in build-openvino.yml, build-self-hosted.yml, release.yml, build-cache.yml, .devops/openvino.Dockerfile
|
|
OPENVINO_VERSION_MAJOR: "2026.3"
|
|
OPENVINO_VERSION_FULL: "2026.3.0.22451.bd8d6542e3c"
|
|
|
|
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 libssl-dev libtbb12 cmake ninja-build python3-pip
|
|
sudo apt-get install -y ocl-icd-opencl-dev opencl-headers opencl-clhpp-headers intel-opencl-icd
|
|
|
|
- name: Setup OpenVINO Toolkit
|
|
uses: ./.github/actions/linux-setup-openvino
|
|
with:
|
|
path: ./openvino_toolkit
|
|
version_major: ${{ env.OPENVINO_VERSION_MAJOR }}
|
|
version_full: ${{ env.OPENVINO_VERSION_FULL }}
|
|
|
|
- name: Install OpenVINO dependencies
|
|
run: |
|
|
cd ./openvino_toolkit
|
|
chmod +x ./install_dependencies/install_openvino_dependencies.sh
|
|
echo "Y" | sudo -E ./install_dependencies/install_openvino_dependencies.sh
|
|
|
|
- name: Build
|
|
id: cmake_build
|
|
run: |
|
|
source ./openvino_toolkit/setupvars.sh
|
|
cmake -B build/ReleaseOV -G Ninja \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DGGML_OPENVINO=ON
|
|
time cmake --build build/ReleaseOV --config Release --parallel
|
|
|
|
- name: Test (CPU)
|
|
id: cmake_test_cpu
|
|
# TODO: fix and re-enable the `test-llama-archs` test below
|
|
run: |
|
|
cd ${{ github.workspace }}
|
|
ctest --test-dir build/ReleaseOV -L main -E "test-llama-archs|test-recurrent-state-rollback-nemotron-h" --verbose --timeout 2000
|
|
|
|
- name: Test (GPU)
|
|
id: cmake_test_gpu
|
|
# TODO: fix and re-enable the `test-llama-archs` test below
|
|
run: |
|
|
cd ${{ github.workspace }}
|
|
export GGML_OPENVINO_DEVICE=GPU
|
|
ctest --test-dir build/ReleaseOV -L main -E "test-llama-archs|test-recurrent-state-rollback-nemotron-h" --verbose --timeout 3000
|
|
|
|
openvino-windows-2022:
|
|
runs-on: windows-2022
|
|
|
|
env:
|
|
# Sync versions in build-openvino.yml, build-self-hosted.yml, release.yml, build-cache.yml, .devops/openvino.Dockerfile
|
|
OPENVINO_VERSION_MAJOR: "2026.3"
|
|
OPENVINO_VERSION_FULL: "2026.3.0.22451.bd8d6542e3c"
|
|
|
|
steps:
|
|
- name: Clone
|
|
id: checkout
|
|
uses: actions/checkout@v6
|
|
|
|
- name: ccache
|
|
uses: ggml-org/ccache-action@v1.2.21
|
|
with:
|
|
key: openvino-windows-2022
|
|
variant: ccache
|
|
evict-old-files: 1d
|
|
save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
|
|
|
- name: Setup Cache
|
|
uses: actions/cache@v5
|
|
id: cache-openvino
|
|
with:
|
|
path: ./openvino_toolkit
|
|
key: cache-gha-openvino-toolkit-v${{ env.OPENVINO_VERSION_FULL }}-${{ runner.os }}
|
|
|
|
- name: Setup OpenVINO Toolkit
|
|
if: steps.cache-openvino.outputs.cache-hit != 'true'
|
|
uses: ./.github/actions/windows-setup-openvino
|
|
with:
|
|
path: ./openvino_toolkit
|
|
version_major: ${{ env.OPENVINO_VERSION_MAJOR }}
|
|
version_full: ${{ env.OPENVINO_VERSION_FULL }}
|
|
|
|
- name: Install OpenCL using vcpkg
|
|
shell: powershell
|
|
run: |
|
|
git clone https://github.com/microsoft/vcpkg C:\vcpkg
|
|
C:\vcpkg\bootstrap-vcpkg.bat
|
|
C:\vcpkg\vcpkg install opencl
|
|
|
|
- name: Build
|
|
id: cmake_build
|
|
shell: cmd
|
|
run: |
|
|
REM Find extracted OpenVINO folder dynamically
|
|
for /d %%i in (openvino_toolkit\*) do set OPENVINO_ROOT=%%i
|
|
|
|
if not exist "%OPENVINO_ROOT%\runtime\cmake\OpenVINOConfig.cmake" (
|
|
echo ERROR: OpenVINOConfig.cmake not found
|
|
exit /b 1
|
|
)
|
|
|
|
call "%OPENVINO_ROOT%\setupvars.bat"
|
|
|
|
cmake -B build\ReleaseOV -G "Visual Studio 17 2022" ^
|
|
-A x64 ^
|
|
-DCMAKE_BUILD_TYPE=Release ^
|
|
-DGGML_OPENVINO=ON ^
|
|
-DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake
|
|
|
|
cmake --build build\ReleaseOV --config Release -- /m
|
|
|
|
- name: Test (CPU)
|
|
id: cmake_test_cpu
|
|
shell: cmd
|
|
# TODO: fix and re-enable the `test-llama-archs` test below
|
|
run: |
|
|
REM Find extracted OpenVINO folder dynamically
|
|
for /d %%i in (openvino_toolkit\*) do set OPENVINO_ROOT=%%i
|
|
call "%OPENVINO_ROOT%\setupvars.bat"
|
|
|
|
cd build
|
|
ctest --test-dir ReleaseOV -L main -E "test-llama-archs|test-recurrent-state-rollback-nemotron-h" -C Release --verbose --timeout 3000
|
|
|
|
- name: ccache-clear
|
|
uses: ./.github/actions/ccache-clear
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
with:
|
|
key: openvino-windows-2022
|
|
older: 5m
|
|
min: 1
|
|
dry-run: ${{ github.event_name != 'push' || github.ref != 'refs/heads/master' }}
|