Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/actions/linux-setup-openvino/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ inputs:
version_full:
description: "OpenVINO full version (e.g., 2025.3.0.19807.44526285f24)"
required: true
ubuntu_version:
description: "Ubuntu variant for the toolkit package (ubuntu22 or ubuntu24)"
required: false
default: "ubuntu22"

runs:
using: "composite"
Expand All @@ -18,7 +22,7 @@ runs:
id: setup
uses: ./.github/actions/unarchive-tar
with:
url: https://storage.openvinotoolkit.org/repositories/openvino/packages/${{ inputs.version_major }}/linux/openvino_toolkit_ubuntu24_${{ inputs.version_full }}_x86_64.tgz
url: https://storage.openvinotoolkit.org/repositories/openvino/packages/${{ inputs.version_major }}/linux/openvino_toolkit_${{ inputs.ubuntu_version }}_${{ inputs.version_full }}_x86_64.tgz
path: ${{ inputs.path }}
type: z
strip: 1
Expand Down
142 changes: 142 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,146 @@ jobs:
path: llama-ubuntu-cuda-${{ matrix.sm }}-arm64.tar.xz
name: llama-ubuntu-cuda-${{ matrix.sm }}-arm64.tar.xz

ubuntu-22-openvino:
runs-on: ubuntu-22.04

env:
OPENVINO_VERSION_MAJOR: "2026.0"
OPENVINO_VERSION_FULL: "2026.0.0.20965.c6d6a13a886"

steps:
- name: Clone
id: checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
repository: 'ggml-org/llama.cpp'

- name: ccache
uses: ggml-org/ccache-action@v1.2.21
with:
key: ubuntu-openvino
evict-old-files: 1d

- name: Dependencies
run: |
sudo apt-get install -y build-essential cmake ninja-build patchelf \
python3-pip libtbb12 \
ocl-icd-opencl-dev opencl-headers opencl-clhpp-headers intel-opencl-icd

- name: Setup OpenVINO
uses: lemonade-sdk/llama.cpp/.github/actions/linux-setup-openvino@lemonade
with:
path: ${{ github.workspace }}/openvino
version_major: ${{ env.OPENVINO_VERSION_MAJOR }}
version_full: ${{ env.OPENVINO_VERSION_FULL }}

- name: Install OpenVINO dependencies
run: |
chmod +x ${{ github.workspace }}/openvino/install_dependencies/install_openvino_dependencies.sh
echo "Y" | sudo -E ${{ github.workspace }}/openvino/install_dependencies/install_openvino_dependencies.sh

- name: Build
run: |
source ${{ github.workspace }}/openvino/setupvars.sh
cmake -B build -S . \
-DGGML_OPENVINO=ON \
-DBUILD_SHARED_LIBS=ON \
-DGGML_NATIVE=OFF \
-DGGML_BACKEND_DL=ON \
-DGGML_OPENMP=OFF \
-DGGML_STATIC=OFF \
-DLLAMA_BUILD_BORINGSSL=ON \
-DCMAKE_BUILD_TYPE=Release \
${{ env.CMAKE_ARGS }}
cmake --build build --config Release -j $(nproc)

- name: Bundle OpenVINO runtime libraries
run: |
OV_LIBDIR="${{ github.workspace }}/openvino/runtime/lib/intel64"

# Core runtime and all plugins
cp -av "$OV_LIBDIR"/libopenvino*.so* build/bin/

# TBB threading library bundled with OpenVINO (skip libtbbbind — needs libhwloc)
TBB_DIR="${{ github.workspace }}/openvino/runtime/3rdparty/tbb/lib"
if [ -d "$TBB_DIR" ]; then
cp -av "$TBB_DIR"/libtbb.so* build/bin/
cp -av "$TBB_DIR"/libtbbmalloc.so* build/bin/
fi

- name: Set RPATH for portable distribution
run: |
for f in build/bin/*; do
[ -f "$f" ] && ! [ -L "$f" ] || continue
if file "$f" | grep -q 'ELF'; then
patchelf --set-rpath '$ORIGIN' "$f"
fi
done

- name: Validate OpenVINO package contents
run: |
shopt -s nullglob

required_libs=(libopenvino.so)
for lib in "${required_libs[@]}"; do
matches=(build/bin/${lib}*)
if [ ${#matches[@]} -eq 0 ]; then
echo "::error::Missing required OpenVINO runtime library matching ${lib}*"
exit 1
fi
done

smoke_bin=""
if [ -x build/bin/llama-server ]; then
smoke_bin=build/bin/llama-server
else
smoke_bin=$(find build/bin -maxdepth 1 -type f -name 'llama-*' -perm -111 | head -n 1)
fi
if [ -z "$smoke_bin" ]; then
echo "::error::No llama executable found for smoke testing"
exit 1
fi
"$smoke_bin" --version >/dev/null

for f in build/bin/*; do
[ -f "$f" ] && ! [ -L "$f" ] || continue
if ! file "$f" | grep -q 'ELF'; then
continue
fi

rpath=$(patchelf --print-rpath "$f")
if [ "$rpath" != '$ORIGIN' ]; then
echo "::error::Unexpected RPATH '$rpath' for $f"
exit 1
fi

# libOpenCL is optional (Intel GPU acceleration); skip it
missing=$(ldd "$f" | awk '/=> not found/ && $1 != "libOpenCL.so.1" { print }')
if [ -n "$missing" ]; then
echo "::error::Unresolved runtime dependencies for $f"
echo "$missing"
exit 1
fi
done

- name: Determine tag name
id: tag
uses: lemonade-sdk/llama.cpp/.github/actions/get-tag-name@lemonade

- name: Pack artifacts
run: |
cp LICENSE ./build/bin/
tar -czvf llama-bin-ubuntu-openvino-${{ env.OPENVINO_VERSION_MAJOR }}-x64.tar.gz \
--transform "s,./,llama-${{ steps.tag.outputs.name }}/," \
-C ./build/bin .

- name: Upload artifacts
uses: actions/upload-artifact@v6
with:
path: llama-bin-ubuntu-openvino-${{ env.OPENVINO_VERSION_MAJOR }}-x64.tar.gz
name: llama-bin-ubuntu-openvino-${{ env.OPENVINO_VERSION_MAJOR }}-x64.tar.gz

windows-cpu:
runs-on: windows-2025

Expand Down Expand Up @@ -759,6 +899,7 @@ jobs:
- ubuntu-22-rocm
- ubuntu-22-cuda
- ubuntu-22-cuda-arm64
- ubuntu-22-openvino

steps:
- name: Clone
Expand Down Expand Up @@ -892,6 +1033,7 @@ jobs:
`- [Ubuntu x64 (ROCm 7.13)](https://github.com/${owner}/${repo}/releases/download/${tag}/llama-${tag}-bin-ubuntu-rocm-7.13-x64.tar.gz)`,
'- Ubuntu x64 (CUDA): `llama-' + tag + '-ubuntu-cuda-sm_XX-x64.tar.xz` (replace XX with your GPU compute capability)',
'- Ubuntu arm64 (CUDA): `llama-' + tag + '-ubuntu-cuda-sm_XX-arm64.tar.xz` (replace XX with your GPU compute capability)',
`- [Ubuntu x64 (OpenVINO 2026.0)](https://github.com/${owner}/${repo}/releases/download/${tag}/llama-${tag}-bin-ubuntu-openvino-2026.0-x64.tar.gz)`,
'',
'**Windows:**',
`- [Windows x64 (ROCm 7.13)](https://github.com/${owner}/${repo}/releases/download/${tag}/llama-${tag}-bin-win-rocm-7.13-x64.zip)`,
Expand Down
Loading