Skip to content
Merged
Changes from 1 commit
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
139 changes: 139 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,143 @@ jobs:
path: llama-ubuntu-cuda-${{ matrix.sm }}-arm64.tar.xz
name: llama-ubuntu-cuda-${{ matrix.sm }}-arm64.tar.xz

ubuntu-24-openvino:
runs-on: ubuntu-24.04

env:
OPENVINO_VERSION_MAJOR: "2026.0"
# Find the exact full version at:
# https://storage.openvinotoolkit.org/repositories/openvino/packages/2026.0/linux/
OPENVINO_VERSION_FULL: "2026.0.0.0.dev20260101000000"

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 patchelf

- 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: 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/

# Plugin registry — rewrite to basename-only paths so plugins load from $ORIGIN
cp -av "$OV_LIBDIR/plugins.xml" build/bin/
sed -i 's|location="[^"]*/\([^/"]*\.so\)"|location="\1"|g' build/bin/plugins.xml

# TBB threading library bundled with OpenVINO
TBB_DIR="${{ github.workspace }}/openvino/runtime/3rdparty/tbb/lib"
if [ -d "$TBB_DIR" ]; then
cp -av "$TBB_DIR"/libtbb*.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 +896,7 @@ jobs:
- ubuntu-22-rocm
- ubuntu-22-cuda
- ubuntu-22-cuda-arm64
- ubuntu-24-openvino

steps:
- name: Clone
Expand Down Expand Up @@ -892,6 +1030,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