From 66fa11444dbe338d31e1f500b0a778eac9d25ee4 Mon Sep 17 00:00:00 2001 From: Ken VanDine Date: Wed, 3 Jun 2026 21:31:52 -0400 Subject: [PATCH 1/5] ci: add Ubuntu 24 OpenVINO build job with bundled runtime libs Adds a new release job that builds llama.cpp with -DGGML_OPENVINO=ON, bundles libopenvino*.so*, plugins.xml (with paths rewritten to basenames for $ORIGIN portability), and TBB alongside llama-server, then publishes llama-{tag}-bin-ubuntu-openvino-2026.0-x64.tar.gz so lemonade can download it without requiring a system-wide OpenVINO install. Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/release.yml | 139 ++++++++++++++++++++++++++++++++++ 1 file changed, 139 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4358af17c9d2..50ad68867b81 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 @@ -759,6 +896,7 @@ jobs: - ubuntu-22-rocm - ubuntu-22-cuda - ubuntu-22-cuda-arm64 + - ubuntu-24-openvino steps: - name: Clone @@ -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)`, From 7f921f07712c50d9da44e5b72ce3c5f04036dd44 Mon Sep 17 00:00:00 2001 From: Ken VanDine Date: Wed, 3 Jun 2026 21:59:43 -0400 Subject: [PATCH 2/5] ci: fix OpenVINO toolkit version and add dependency install step - Set OPENVINO_VERSION_FULL to the correct 2026.0.0.20965.c6d6a13a886 (sourced from ggml-org/llama.cpp build-openvino.yml) - Install libtbb12, OpenCL headers, and ninja-build to match ggml-org's build environment - Run install_openvino_dependencies.sh from the toolkit before building Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/release.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 50ad68867b81..4d71ac9072b0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -446,9 +446,7 @@ jobs: 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" + OPENVINO_VERSION_FULL: "2026.0.0.20965.c6d6a13a886" steps: - name: Clone @@ -465,7 +463,10 @@ jobs: evict-old-files: 1d - name: Dependencies - run: sudo apt-get install -y build-essential cmake patchelf + 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 @@ -474,6 +475,11 @@ jobs: 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 From 9688c9755ef71b174b2bf970b317ebce31ec5b69 Mon Sep 17 00:00:00 2001 From: Ken VanDine Date: Wed, 3 Jun 2026 22:03:55 -0400 Subject: [PATCH 3/5] ci: switch OpenVINO job to ubuntu-22.04 to match other build jobs Use the ubuntu22 toolkit variant (which exists for 2026.0) and run on ubuntu-22.04 consistent with all other jobs in this workflow. Add an optional ubuntu_version input to the linux-setup-openvino action so callers can select the toolkit variant (default: ubuntu22). Co-Authored-By: Claude Sonnet 4.6 --- .github/actions/linux-setup-openvino/action.yml | 6 +++++- .github/workflows/release.yml | 6 +++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/actions/linux-setup-openvino/action.yml b/.github/actions/linux-setup-openvino/action.yml index 46a659a827c4..fd2824f26371 100644 --- a/.github/actions/linux-setup-openvino/action.yml +++ b/.github/actions/linux-setup-openvino/action.yml @@ -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" @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4d71ac9072b0..b74ac5138e53 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -441,8 +441,8 @@ 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 + ubuntu-22-openvino: + runs-on: ubuntu-22.04 env: OPENVINO_VERSION_MAJOR: "2026.0" @@ -902,7 +902,7 @@ jobs: - ubuntu-22-rocm - ubuntu-22-cuda - ubuntu-22-cuda-arm64 - - ubuntu-24-openvino + - ubuntu-22-openvino steps: - name: Clone From 4db766987f86a50ba7d54a828755a7619f07ec5d Mon Sep 17 00:00:00 2001 From: Ken VanDine Date: Wed, 3 Jun 2026 22:18:08 -0400 Subject: [PATCH 4/5] =?UTF-8?q?ci:=20remove=20plugins.xml=20copy=20?= =?UTF-8?q?=E2=80=94=20not=20present=20in=20OpenVINO=202026.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit OpenVINO 2026.0 no longer ships plugins.xml in runtime/lib/intel64/; plugin discovery is handled automatically by the runtime library. Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/release.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b74ac5138e53..82a7f037d8d8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -502,10 +502,6 @@ jobs: # 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 From 135ecd58853d6e4f8e4694fcaaa8e306536bfe56 Mon Sep 17 00:00:00 2001 From: Ken VanDine Date: Wed, 3 Jun 2026 22:23:17 -0400 Subject: [PATCH 5/5] =?UTF-8?q?ci:=20skip=20libtbbbind=20when=20bundling?= =?UTF-8?q?=20TBB=20=E2=80=94=20requires=20libhwloc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit libtbbbind is TBB's optional CPU topology library; it depends on libhwloc which is not available on the CI runner or target systems. Only bundle libtbb and libtbbmalloc, which are sufficient for llama.cpp. Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/release.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 82a7f037d8d8..6492e41db58d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -502,10 +502,11 @@ jobs: # Core runtime and all plugins cp -av "$OV_LIBDIR"/libopenvino*.so* build/bin/ - # TBB threading library bundled with OpenVINO + # 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"/libtbb.so* build/bin/ + cp -av "$TBB_DIR"/libtbbmalloc.so* build/bin/ fi - name: Set RPATH for portable distribution