Skip to content

Release

Release #4

Workflow file for this run

name: Release
on:
workflow_dispatch:
inputs:
version:
description: "Release version, for example v1.2.3 or 1.2.3"
required: true
concurrency:
group: release
cancel-in-progress: false
env:
ARTIFACT_ROOT: release-assets
jobs:
release-metadata:
name: Release metadata
runs-on: ubuntu-latest
outputs:
tag_name: ${{ steps.tag.outputs.tag_name }}
steps:
- id: tag
shell: bash
run: |
set -euo pipefail
raw_tag="${{ inputs.version }}"
if [[ "${raw_tag}" == v* ]]; then
tag_name="${raw_tag}"
else
tag_name="v${raw_tag}"
fi
echo "tag_name=${tag_name}" >> "$GITHUB_OUTPUT"
# macOS Jobs
macos-arm64-cpu:
name: macOS Apple Silicon (arm64) CPU
needs: release-metadata
runs-on: macos-14
steps:
- name: Clone
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build
shell: bash
run: |
set -euo pipefail
clang++ -std=c++17 -O3 -DNDEBUG -arch arm64 \
-I. -Iinclude \
-o llm main.cpp
file llm
- name: Smoke test
shell: bash
run: |
set +e
./llm --chat >/dev/null 2>&1
exit 0
- name: Pack artifacts
shell: bash
run: |
set -euo pipefail
package="llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-macos-arm64-cpu"
mkdir -p "${ARTIFACT_ROOT}/${package}"
cp llm README.md LICENSE "${ARTIFACT_ROOT}/${package}/"
tar -czf "${package}.tar.gz" -C "${ARTIFACT_ROOT}" "${package}"
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: llm.cpp-bin-macos-arm64-cpu
path: llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-macos-arm64-cpu.tar.gz
if-no-files-found: error
retention-days: 30
macos-x64-cpu:
name: macOS Intel (x64) CPU
needs: release-metadata
runs-on: macos-13
steps:
- name: Clone
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build
shell: bash
run: |
set -euo pipefail
clang++ -std=c++17 -O3 -DNDEBUG -arch x86_64 \
-I. -Iinclude \
-o llm main.cpp
file llm
- name: Smoke test
shell: bash
run: |
set +e
./llm --chat >/dev/null 2>&1
exit 0
- name: Pack artifacts
shell: bash
run: |
set -euo pipefail
package="llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-macos-x64-cpu"
mkdir -p "${ARTIFACT_ROOT}/${package}"
cp llm README.md LICENSE "${ARTIFACT_ROOT}/${package}/"
tar -czf "${package}.tar.gz" -C "${ARTIFACT_ROOT}" "${package}"
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: llm.cpp-bin-macos-x64-cpu
path: llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-macos-x64-cpu.tar.gz
if-no-files-found: error
retention-days: 30
ios-xcframework:
name: iOS XCFramework
needs: release-metadata
runs-on: macos-14
steps:
- name: Clone
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build for iOS (arm64)
shell: bash
run: |
set -euo pipefail
clang++ -std=c++17 -O3 -DNDEBUG \
-arch arm64 \
-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk \
-I. -Iinclude \
-c main.cpp -o llm-ios-arm64.o
ar rcs libllm-ios-arm64.a llm-ios-arm64.o
- name: Build for iOS Simulator (x86_64)
shell: bash
run: |
set -euo pipefail
clang++ -std=c++17 -O3 -DNDEBUG \
-arch x86_64 \
-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk \
-I. -Iinclude \
-c main.cpp -o llm-ios-sim-x86_64.o
ar rcs libllm-ios-sim-x86_64.a llm-ios-sim-x86_64.o
- name: Create XCFramework
shell: bash
run: |
set -euo pipefail
xcodebuild -create-xcframework \
-library libllm-ios-arm64.a \
-library libllm-ios-sim-x86_64.a \
-output LLM.xcframework
- name: Pack artifacts
shell: bash
run: |
set -euo pipefail
package="llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-ios-xcframework"
mkdir -p "${ARTIFACT_ROOT}/${package}"
cp -r LLM.xcframework README.md LICENSE "${ARTIFACT_ROOT}/${package}/"
tar -czf "${package}.tar.gz" -C "${ARTIFACT_ROOT}" "${package}"
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: llm.cpp-ios-xcframework
path: llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-ios-xcframework.tar.gz
if-no-files-found: error
retention-days: 30
# Ubuntu Jobs
ubuntu-x64-cpu:
name: Ubuntu x64 (CPU)
needs: release-metadata
runs-on: ubuntu-22.04
steps:
- name: Clone
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Dependencies
shell: bash
run: |
set -euo pipefail
sudo apt-get update
sudo apt-get install -y build-essential file
- name: Build
shell: bash
run: |
set -euo pipefail
g++ -std=c++17 -O3 -DNDEBUG \
-I. -Iinclude \
-o llm main.cpp
file llm
- name: Smoke test
shell: bash
run: |
set +e
./llm --chat >/dev/null 2>&1
exit 0
- name: Pack artifacts
shell: bash
run: |
set -euo pipefail
package="llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-ubuntu-x64-cpu"
mkdir -p "${ARTIFACT_ROOT}/${package}"
cp llm README.md LICENSE "${ARTIFACT_ROOT}/${package}/"
tar -czf "${package}.tar.gz" -C "${ARTIFACT_ROOT}" "${package}"
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: llm.cpp-bin-ubuntu-x64-cpu
path: llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-ubuntu-x64-cpu.tar.gz
if-no-files-found: error
retention-days: 30
ubuntu-arm64-cpu:
name: Ubuntu arm64 (CPU)
needs: release-metadata
runs-on: ubuntu-24.04-arm
steps:
- name: Clone
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Dependencies
shell: bash
run: |
set -euo pipefail
sudo apt-get update
sudo apt-get install -y build-essential file
- name: Toolchain workaround
shell: bash
run: |
set -euo pipefail
sudo apt-get install -y gcc-14 g++-14
echo "CC=gcc-14" >> "$GITHUB_ENV"
echo "CXX=g++-14" >> "$GITHUB_ENV"
- name: Build
shell: bash
run: |
set -euo pipefail
${CXX:-g++} -std=c++17 -O3 -DNDEBUG \
-I. -Iinclude \
-o llm main.cpp
file llm
- name: Smoke test
shell: bash
run: |
set +e
./llm --chat >/dev/null 2>&1
exit 0
- name: Pack artifacts
shell: bash
run: |
set -euo pipefail
package="llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-ubuntu-arm64-cpu"
mkdir -p "${ARTIFACT_ROOT}/${package}"
cp llm README.md LICENSE "${ARTIFACT_ROOT}/${package}/"
tar -czf "${package}.tar.gz" -C "${ARTIFACT_ROOT}" "${package}"
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: llm.cpp-bin-ubuntu-arm64-cpu
path: llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-ubuntu-arm64-cpu.tar.gz
if-no-files-found: error
retention-days: 30
ubuntu-s390x-cpu:
name: Ubuntu s390x (CPU)
needs: release-metadata
runs-on: ubuntu-24.04-s390x
steps:
- name: Clone
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Dependencies
shell: bash
run: |
set -euo pipefail
sudo apt-get update
sudo apt-get install -y build-essential file
- name: Build
shell: bash
run: |
set -euo pipefail
g++ -std=c++17 -O3 -DNDEBUG \
-I. -Iinclude \
-o llm main.cpp
file llm
- name: Smoke test
shell: bash
run: |
set +e
./llm --chat >/dev/null 2>&1
exit 0
- name: Pack artifacts
shell: bash
run: |
set -euo pipefail
package="llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-ubuntu-s390x-cpu"
mkdir -p "${ARTIFACT_ROOT}/${package}"
cp llm README.md LICENSE "${ARTIFACT_ROOT}/${package}/"
tar -czf "${package}.tar.gz" -C "${ARTIFACT_ROOT}" "${package}"
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: llm.cpp-bin-ubuntu-s390x-cpu
path: llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-ubuntu-s390x-cpu.tar.gz
if-no-files-found: error
retention-days: 30
ubuntu-x64-vulkan:
name: Ubuntu x64 (Vulkan)
needs: release-metadata
runs-on: ubuntu-22.04
steps:
- name: Clone
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Dependencies
shell: bash
run: |
set -euo pipefail
sudo apt-get update
sudo apt-get install -y build-essential file libvulkan-dev vulkan-tools
- name: Build
shell: bash
run: |
set -euo pipefail
g++ -std=c++17 -O3 -DNDEBUG -DENABLE_VULKAN \
-I. -Iinclude \
-o llm main.cpp -lvulkan
file llm
- name: Smoke test
shell: bash
run: |
set +e
./llm --chat >/dev/null 2>&1
exit 0
- name: Pack artifacts
shell: bash
run: |
set -euo pipefail
package="llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-ubuntu-x64-vulkan"
mkdir -p "${ARTIFACT_ROOT}/${package}"
cp llm README.md LICENSE "${ARTIFACT_ROOT}/${package}/"
tar -czf "${package}.tar.gz" -C "${ARTIFACT_ROOT}" "${package}"
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: llm.cpp-bin-ubuntu-x64-vulkan
path: llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-ubuntu-x64-vulkan.tar.gz
if-no-files-found: error
retention-days: 30
ubuntu-arm64-vulkan:
name: Ubuntu arm64 (Vulkan)
needs: release-metadata
runs-on: ubuntu-24.04-arm
steps:
- name: Clone
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Dependencies
shell: bash
run: |
set -euo pipefail
sudo apt-get update
sudo apt-get install -y build-essential file libvulkan-dev vulkan-tools gcc-14 g++-14
echo "CC=gcc-14" >> "$GITHUB_ENV"
echo "CXX=g++-14" >> "$GITHUB_ENV"
- name: Build
shell: bash
run: |
set -euo pipefail
${CXX:-g++} -std=c++17 -O3 -DNDEBUG -DENABLE_VULKAN \
-I. -Iinclude \
-o llm main.cpp -lvulkan
file llm
- name: Smoke test
shell: bash
run: |
set +e
./llm --chat >/dev/null 2>&1
exit 0
- name: Pack artifacts
shell: bash
run: |
set -euo pipefail
package="llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-ubuntu-arm64-vulkan"
mkdir -p "${ARTIFACT_ROOT}/${package}"
cp llm README.md LICENSE "${ARTIFACT_ROOT}/${package}/"
tar -czf "${package}.tar.gz" -C "${ARTIFACT_ROOT}" "${package}"
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: llm.cpp-bin-ubuntu-arm64-vulkan
path: llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-ubuntu-arm64-vulkan.tar.gz
if-no-files-found: error
retention-days: 30
ubuntu-x64-rocm:
name: Ubuntu x64 (ROCm 7.2)
needs: release-metadata
runs-on: ubuntu-22.04
steps:
- name: Clone
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Dependencies
shell: bash
run: |
set -euo pipefail
sudo apt-get update
sudo apt-get install -y build-essential file wget gnupg
wget -q -O - https://repo.radeon.com/rocm/rocm.gpg.key | sudo apt-key add -
echo "deb [signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/rocm/apt/debian jammy main" | sudo tee /etc/apt/sources.list.d/rocm.sources.list
sudo apt-get update
sudo apt-get install -y rocm-hip-sdk rocm-libs
- name: Build
shell: bash
run: |
set -euo pipefail
source /opt/rocm/bin/rocm-path.sh
g++ -std=c++17 -O3 -DNDEBUG -DENABLE_ROCM \
-I. -Iinclude -I/opt/rocm/include \
-o llm main.cpp -L/opt/rocm/lib -lamdhip64
file llm
- name: Smoke test
shell: bash
run: |
set +e
./llm --chat >/dev/null 2>&1
exit 0
- name: Pack artifacts
shell: bash
run: |
set -euo pipefail
package="llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-ubuntu-x64-rocm72"
mkdir -p "${ARTIFACT_ROOT}/${package}"
cp llm README.md LICENSE "${ARTIFACT_ROOT}/${package}/"
tar -czf "${package}.tar.gz" -C "${ARTIFACT_ROOT}" "${package}"
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: llm.cpp-bin-ubuntu-x64-rocm72
path: llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-ubuntu-x64-rocm72.tar.gz
if-no-files-found: error
retention-days: 30
ubuntu-x64-openvino:
name: Ubuntu x64 (OpenVINO)
needs: release-metadata
runs-on: ubuntu-22.04
steps:
- name: Clone
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Dependencies
shell: bash
run: |
set -euo pipefail
sudo apt-get update
sudo apt-get install -y build-essential file
# Install OpenVINO
mkdir -p /opt/intel
cd /opt/intel
sudo wget https://storage.openvinotoolkit.org/repositories/openvino/packages/2024.0/linux/l_openvino_toolkit_ubuntu22_2024.0.0.14009.8d3c3d50d44_x86_64.tgz
sudo tar -xzf l_openvino_toolkit_ubuntu22_2024.0.0.14009.8d3c3d50d44_x86_64.tgz
sudo ln -s openvino_2024.0.0.14009.8d3c3d50d44 openvino
- name: Build
shell: bash
run: |
set -euo pipefail
source /opt/intel/openvino/setupvars.sh
g++ -std=c++17 -O3 -DNDEBUG -DENABLE_OPENVINO \
-I. -Iinclude \
-o llm main.cpp
file llm
- name: Smoke test
shell: bash
run: |
set +e
./llm --chat >/dev/null 2>&1
exit 0
- name: Pack artifacts
shell: bash
run: |
set -euo pipefail
package="llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-ubuntu-x64-openvino"
mkdir -p "${ARTIFACT_ROOT}/${package}"
cp llm README.md LICENSE "${ARTIFACT_ROOT}/${package}/"
tar -czf "${package}.tar.gz" -C "${ARTIFACT_ROOT}" "${package}"
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: llm.cpp-bin-ubuntu-x64-openvino
path: llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-ubuntu-x64-openvino.tar.gz
if-no-files-found: error
retention-days: 30
ubuntu-x64-sycl-fp32:
name: Ubuntu x64 (SYCL FP32)
needs: release-metadata
runs-on: ubuntu-22.04
steps:
- name: Clone
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Dependencies
shell: bash
run: |
set -euo pipefail
sudo apt-get update
sudo apt-get install -y build-essential file
# Install Intel SYCL
wget https://github.com/intel/llvm/releases/download/nightly-2024-07-01/sycl_linux.tar.gz
sudo mkdir -p /opt/intel/sycl
sudo tar -xzf sycl_linux.tar.gz -C /opt/intel/sycl
- name: Build
shell: bash
run: |
set -euo pipefail
export PATH="/opt/intel/sycl/bin:$PATH"
clang++ -std=c++17 -O3 -DNDEBUG -DENABLE_SYCL \
-fsycl -fsycl-targets=spir64 \
-I. -Iinclude \
-o llm main.cpp
file llm
- name: Smoke test
shell: bash
run: |
set +e
./llm --chat >/dev/null 2>&1
exit 0
- name: Pack artifacts
shell: bash
run: |
set -euo pipefail
package="llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-ubuntu-x64-sycl-fp32"
mkdir -p "${ARTIFACT_ROOT}/${package}"
cp llm README.md LICENSE "${ARTIFACT_ROOT}/${package}/"
tar -czf "${package}.tar.gz" -C "${ARTIFACT_ROOT}" "${package}"
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: llm.cpp-bin-ubuntu-x64-sycl-fp32
path: llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-ubuntu-x64-sycl-fp32.tar.gz
if-no-files-found: error
retention-days: 30
ubuntu-x64-sycl-fp16:
name: Ubuntu x64 (SYCL FP16)
needs: release-metadata
runs-on: ubuntu-22.04
steps:
- name: Clone
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Dependencies
shell: bash
run: |
set -euo pipefail
sudo apt-get update
sudo apt-get install -y build-essential file
# Install Intel SYCL
wget https://github.com/intel/llvm/releases/download/nightly-2024-07-01/sycl_linux.tar.gz
sudo mkdir -p /opt/intel/sycl
sudo tar -xzf sycl_linux.tar.gz -C /opt/intel/sycl
- name: Build
shell: bash
run: |
set -euo pipefail
export PATH="/opt/intel/sycl/bin:$PATH"
clang++ -std=c++17 -O3 -DNDEBUG -DENABLE_SYCL -DENABLE_FP16 \
-fsycl -fsycl-targets=spir64 \
-I. -Iinclude \
-o llm main.cpp
file llm
- name: Smoke test
shell: bash
run: |
set +e
./llm --chat >/dev/null 2>&1
exit 0
- name: Pack artifacts
shell: bash
run: |
set -euo pipefail
package="llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-ubuntu-x64-sycl-fp16"
mkdir -p "${ARTIFACT_ROOT}/${package}"
cp llm README.md LICENSE "${ARTIFACT_ROOT}/${package}/"
tar -czf "${package}.tar.gz" -C "${ARTIFACT_ROOT}" "${package}"
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: llm.cpp-bin-ubuntu-x64-sycl-fp16
path: llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-ubuntu-x64-sycl-fp16.tar.gz
if-no-files-found: error
retention-days: 30
# Android Job
android-arm64-cpu:
name: Android arm64 (CPU)
needs: release-metadata
runs-on: ubuntu-22.04
steps:
- name: Clone
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Android NDK
shell: bash
run: |
set -euo pipefail
sudo apt-get update
sudo apt-get install -y build-essential file
# Download Android NDK
mkdir -p /opt/android
cd /opt/android
wget https://dl.google.com/android/repository/android-ndk-r26b-linux.zip
unzip -q android-ndk-r26b-linux.zip
echo "ANDROID_NDK_HOME=/opt/android/android-ndk-r26b" >> $GITHUB_ENV
- name: Build
shell: bash
run: |
set -euo pipefail
$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ \
--target=aarch64-linux-android21 \
-std=c++17 -O3 -DNDEBUG \
-I. -Iinclude \
-o llm main.cpp
file llm
- name: Smoke test
shell: bash
run: |
set +e
file llm | grep -q "ARM aarch64"
exit 0
- name: Pack artifacts
shell: bash
run: |
set -euo pipefail
package="llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-android-arm64-cpu"
mkdir -p "${ARTIFACT_ROOT}/${package}"
cp llm README.md LICENSE "${ARTIFACT_ROOT}/${package}/"
tar -czf "${package}.tar.gz" -C "${ARTIFACT_ROOT}" "${package}"
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: llm.cpp-bin-android-arm64-cpu
path: llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-android-arm64-cpu.tar.gz
if-no-files-found: error
retention-days: 30
# Windows Jobs
windows-x64-cpu:
name: Windows x64 (CPU)
needs: release-metadata
runs-on: windows-2022
steps:
- name: Clone
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
cl /nologo /std:c++17 /O2 /DNDEBUG /EHsc /Iinclude /I. main.cpp /Fe:llm.exe
- name: Smoke test
shell: pwsh
run: |
$ErrorActionPreference = 'Continue'
& .\llm.exe --chat | Out-Null
exit 0
- name: Pack artifacts
shell: pwsh
run: |
$package = "llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-windows-x64-cpu"
New-Item -ItemType Directory -Force "${env:ARTIFACT_ROOT}\${package}" | Out-Null
Copy-Item llm.exe "${env:ARTIFACT_ROOT}\${package}\"
Copy-Item README.md, LICENSE "${env:ARTIFACT_ROOT}\${package}\"
Compress-Archive -Path "${env:ARTIFACT_ROOT}\${package}\*" -DestinationPath "${package}.zip" -Force
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: llm.cpp-bin-windows-x64-cpu
path: llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-windows-x64-cpu.zip
if-no-files-found: error
retention-days: 30
windows-arm64-cpu:
name: Windows arm64 (CPU)
needs: release-metadata
runs-on: windows-2022
steps:
- name: Clone
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" amd64_arm64
cl /nologo /std:c++17 /O2 /DNDEBUG /EHsc /Iinclude /I. main.cpp /Fe:llm.exe
- name: Pack artifacts
shell: pwsh
run: |
$package = "llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-windows-arm64-cpu"
New-Item -ItemType Directory -Force "${env:ARTIFACT_ROOT}\${package}" | Out-Null
Copy-Item llm.exe "${env:ARTIFACT_ROOT}\${package}\"
Copy-Item README.md, LICENSE "${env:ARTIFACT_ROOT}\${package}\"
Compress-Archive -Path "${env:ARTIFACT_ROOT}\${package}\*" -DestinationPath "${package}.zip" -Force
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: llm.cpp-bin-windows-arm64-cpu
path: llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-windows-arm64-cpu.zip
if-no-files-found: error
retention-days: 30
windows-arm64-opencl:
name: Windows arm64 (OpenCL Adreno)
needs: release-metadata
runs-on: windows-2022
steps:
- name: Clone
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Dependencies
shell: pwsh
run: |
# Install OpenCL headers and libraries
choco install -y opencl-headers opencl-icd-loader
- name: Build
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" amd64_arm64
cl /nologo /std:c++17 /O2 /DNDEBUG /DENABLE_OPENCL /EHsc /Iinclude /I. main.cpp /Fe:llm.exe /link OpenCL.lib
- name: Pack artifacts
shell: pwsh
run: |
$package = "llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-windows-arm64-opencl-adreno"
New-Item -ItemType Directory -Force "${env:ARTIFACT_ROOT}\${package}" | Out-Null
Copy-Item llm.exe "${env:ARTIFACT_ROOT}\${package}\"
Copy-Item README.md, LICENSE "${env:ARTIFACT_ROOT}\${package}\"
Compress-Archive -Path "${env:ARTIFACT_ROOT}\${package}\*" -DestinationPath "${package}.zip" -Force
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: llm.cpp-bin-windows-arm64-opencl-adreno
path: llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-windows-arm64-opencl-adreno.zip
if-no-files-found: error
retention-days: 30
windows-x64-cuda12:
name: Windows x64 (CUDA 12)
needs: release-metadata
runs-on: windows-2022
steps:
- name: Clone
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install CUDA 12
shell: pwsh
run: |
choco install -y cuda --version=12.4
- name: Build
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
call "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\bin\nvcc.exe" --version
cl /nologo /std:c++17 /O2 /DNDEBUG /DENABLE_CUDA /EHsc /Iinclude /I. /I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\include" main.cpp /Fe:llm.exe /link "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\lib\x64\cudart.lib"
- name: Pack artifacts
shell: pwsh
run: |
$package = "llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-windows-x64-cuda12"
New-Item -ItemType Directory -Force "${env:ARTIFACT_ROOT}\${package}" | Out-Null
Copy-Item llm.exe "${env:ARTIFACT_ROOT}\${package}\"
Copy-Item README.md, LICENSE "${env:ARTIFACT_ROOT}\${package}\"
# Copy CUDA runtime DLLs
Copy-Item "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\bin\cudart64_*.dll" "${env:ARTIFACT_ROOT}\${package}\" -ErrorAction SilentlyContinue
Compress-Archive -Path "${env:ARTIFACT_ROOT}\${package}\*" -DestinationPath "${package}.zip" -Force
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: llm.cpp-bin-windows-x64-cuda12
path: llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-windows-x64-cuda12.zip
if-no-files-found: error
retention-days: 30
windows-x64-cuda13:
name: Windows x64 (CUDA 13)
needs: release-metadata
runs-on: windows-2022
steps:
- name: Clone
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install CUDA 13
shell: pwsh
run: |
choco install -y cuda --version=13.3
- name: Build
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
call "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.3\bin\nvcc.exe" --version
cl /nologo /std:c++17 /O2 /DNDEBUG /DENABLE_CUDA /EHsc /Iinclude /I. /I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.3\include" main.cpp /Fe:llm.exe /link "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.3\lib\x64\cudart.lib"
- name: Pack artifacts
shell: pwsh
run: |
$package = "llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-windows-x64-cuda13"
New-Item -ItemType Directory -Force "${env:ARTIFACT_ROOT}\${package}" | Out-Null
Copy-Item llm.exe "${env:ARTIFACT_ROOT}\${package}\"
Copy-Item README.md, LICENSE "${env:ARTIFACT_ROOT}\${package}\"
# Copy CUDA runtime DLLs
Copy-Item "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.3\bin\cudart64_*.dll" "${env:ARTIFACT_ROOT}\${package}\" -ErrorAction SilentlyContinue
Compress-Archive -Path "${env:ARTIFACT_ROOT}\${package}\*" -DestinationPath "${package}.zip" -Force
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: llm.cpp-bin-windows-x64-cuda13
path: llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-windows-x64-cuda13.zip
if-no-files-found: error
retention-days: 30
windows-x64-vulkan:
name: Windows x64 (Vulkan)
needs: release-metadata
runs-on: windows-2022
steps:
- name: Clone
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Dependencies
shell: pwsh
run: |
choco install -y vulkan-sdk
- name: Build
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
set VULKAN_SDK=C:\VulkanSDK\latest
cl /nologo /std:c++17 /O2 /DNDEBUG /DENABLE_VULKAN /EHsc /Iinclude /I. /I"%VULKAN_SDK%\Include" main.cpp /Fe:llm.exe /link "%VULKAN_SDK%\Lib\vulkan-1.lib"
- name: Pack artifacts
shell: pwsh
run: |
$package = "llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-windows-x64-vulkan"
New-Item -ItemType Directory -Force "${env:ARTIFACT_ROOT}\${package}" | Out-Null
Copy-Item llm.exe "${env:ARTIFACT_ROOT}\${package}\"
Copy-Item README.md, LICENSE "${env:ARTIFACT_ROOT}\${package}\"
Compress-Archive -Path "${env:ARTIFACT_ROOT}\${package}\*" -DestinationPath "${package}.zip" -Force
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: llm.cpp-bin-windows-x64-vulkan
path: llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-windows-x64-vulkan.zip
if-no-files-found: error
retention-days: 30
windows-x64-openvino:
name: Windows x64 (OpenVINO)
needs: release-metadata
runs-on: windows-2022
steps:
- name: Clone
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Dependencies
shell: pwsh
run: |
choco install -y openvino
- name: Build
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
cl /nologo /std:c++17 /O2 /DNDEBUG /DENABLE_OPENVINO /EHsc /Iinclude /I. main.cpp /Fe:llm.exe
- name: Pack artifacts
shell: pwsh
run: |
$package = "llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-windows-x64-openvino"
New-Item -ItemType Directory -Force "${env:ARTIFACT_ROOT}\${package}" | Out-Null
Copy-Item llm.exe "${env:ARTIFACT_ROOT}\${package}\"
Copy-Item README.md, LICENSE "${env:ARTIFACT_ROOT}\${package}\"
Compress-Archive -Path "${env:ARTIFACT_ROOT}\${package}\*" -DestinationPath "${package}.zip" -Force
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: llm.cpp-bin-windows-x64-openvino
path: llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-windows-x64-openvino.zip
if-no-files-found: error
retention-days: 30
windows-x64-sycl:
name: Windows x64 (SYCL)
needs: release-metadata
runs-on: windows-2022
steps:
- name: Clone
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Dependencies
shell: pwsh
run: |
# Download Intel SYCL for Windows
Invoke-WebRequest -Uri "https://github.com/intel/llvm/releases/download/nightly-2024-07-01/sycl_windows.zip" -OutFile "sycl_windows.zip"
Expand-Archive -Path "sycl_windows.zip" -DestinationPath "C:\intel-sycl"
echo "C:\intel-sycl\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Build
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
clang-cl /nologo /std:c++17 /O2 /DNDEBUG /DENABLE_SYCL /EHsc /Iinclude /I. /fsycl /fsycl-targets=spir64 main.cpp /Fe:llm.exe
- name: Pack artifacts
shell: pwsh
run: |
$package = "llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-windows-x64-sycl"
New-Item -ItemType Directory -Force "${env:ARTIFACT_ROOT}\${package}" | Out-Null
Copy-Item llm.exe "${env:ARTIFACT_ROOT}\${package}\"
Copy-Item README.md, LICENSE "${env:ARTIFACT_ROOT}\${package}\"
Compress-Archive -Path "${env:ARTIFACT_ROOT}\${package}\*" -DestinationPath "${package}.zip" -Force
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: llm.cpp-bin-windows-x64-sycl
path: llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-windows-x64-sycl.zip
if-no-files-found: error
retention-days: 30
windows-x64-hip:
name: Windows x64 (HIP)
needs: release-metadata
runs-on: windows-2022
steps:
- name: Clone
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Dependencies
shell: pwsh
run: |
choco install -y rocm
- name: Build
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
set HIP_PATH=C:\rocm
cl /nologo /std:c++17 /O2 /DNDEBUG /DENABLE_HIP /EHsc /Iinclude /I. /I"%HIP_PATH%\include" main.cpp /Fe:llm.exe /link "%HIP_PATH%\lib\amdhip64.lib"
- name: Pack artifacts
shell: pwsh
run: |
$package = "llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-windows-x64-hip"
New-Item -ItemType Directory -Force "${env:ARTIFACT_ROOT}\${package}" | Out-Null
Copy-Item llm.exe "${env:ARTIFACT_ROOT}\${package}\"
Copy-Item README.md, LICENSE "${env:ARTIFACT_ROOT}\${package}\"
Compress-Archive -Path "${env:ARTIFACT_ROOT}\${package}\*" -DestinationPath "${package}.zip" -Force
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: llm.cpp-bin-windows-x64-hip
path: llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-windows-x64-hip.zip
if-no-files-found: error
retention-days: 30
publish-release:
name: Publish GitHub release
needs:
- release-metadata
- macos-arm64-cpu
- macos-x64-cpu
- ios-xcframework
- ubuntu-x64-cpu
- ubuntu-arm64-cpu
- ubuntu-s390x-cpu
- ubuntu-x64-vulkan
- ubuntu-arm64-vulkan
- ubuntu-x64-rocm
- ubuntu-x64-openvino
- ubuntu-x64-sycl-fp32
- ubuntu-x64-sycl-fp16
- android-arm64-cpu
- windows-x64-cpu
- windows-arm64-cpu
- windows-arm64-opencl
- windows-x64-cuda12
- windows-x64-cuda13
- windows-x64-vulkan
- windows-x64-openvino
- windows-x64-sycl
- windows-x64-hip
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: dist
merge-multiple: true
- name: Generate release notes
shell: bash
run: |
cat > release-notes.md <<'EOF'
# Release ${{ needs.release-metadata.outputs.tag_name }}
## Platform Support
### macOS/iOS
| Platform | Architecture | Status | Download |
|----------|--------------|--------|----------|
| macOS | Apple Silicon (arm64) | ✅ | [Download](../../releases/download/${{ needs.release-metadata.outputs.tag_name }}/llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-macos-arm64-cpu.tar.gz) |
| macOS | Apple Silicon (arm64, KleidiAI) | ❌ | DISABLED |
| macOS | Intel (x64) | ✅ | [Download](../../releases/download/${{ needs.release-metadata.outputs.tag_name }}/llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-macos-x64-cpu.tar.gz) |
| iOS | XCFramework | ✅ | [Download](../../releases/download/${{ needs.release-metadata.outputs.tag_name }}/llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-ios-xcframework.tar.gz) |
### Linux
| Platform | Architecture | Variant | Status | Download |
|----------|--------------|---------|--------|----------|
| Ubuntu | x64 | CPU | ✅ | [Download](../../releases/download/${{ needs.release-metadata.outputs.tag_name }}/llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-ubuntu-x64-cpu.tar.gz) |
| Ubuntu | arm64 | CPU | ✅ | [Download](../../releases/download/${{ needs.release-metadata.outputs.tag_name }}/llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-ubuntu-arm64-cpu.tar.gz) |
| Ubuntu | s390x | CPU | ✅ | [Download](../../releases/download/${{ needs.release-metadata.outputs.tag_name }}/llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-ubuntu-s390x-cpu.tar.gz) |
| Ubuntu | x64 | Vulkan | ✅ | [Download](../../releases/download/${{ needs.release-metadata.outputs.tag_name }}/llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-ubuntu-x64-vulkan.tar.gz) |
| Ubuntu | arm64 | Vulkan | ✅ | [Download](../../releases/download/${{ needs.release-metadata.outputs.tag_name }}/llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-ubuntu-arm64-vulkan.tar.gz) |
| Ubuntu | x64 | ROCm 7.2 | ✅ | [Download](../../releases/download/${{ needs.release-metadata.outputs.tag_name }}/llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-ubuntu-x64-rocm72.tar.gz) |
| Ubuntu | x64 | OpenVINO | ✅ | [Download](../../releases/download/${{ needs.release-metadata.outputs.tag_name }}/llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-ubuntu-x64-openvino.tar.gz) |
| Ubuntu | x64 | SYCL FP32 | ✅ | [Download](../../releases/download/${{ needs.release-metadata.outputs.tag_name }}/llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-ubuntu-x64-sycl-fp32.tar.gz) |
| Ubuntu | x64 | SYCL FP16 | ✅ | [Download](../../releases/download/${{ needs.release-metadata.outputs.tag_name }}/llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-ubuntu-x64-sycl-fp16.tar.gz) |
### Android
| Platform | Architecture | Variant | Status | Download |
|----------|--------------|---------|--------|----------|
| Android | arm64 | CPU | ✅ | [Download](../../releases/download/${{ needs.release-metadata.outputs.tag_name }}/llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-android-arm64-cpu.tar.gz) |
### Windows
| Platform | Architecture | Variant | Status | Download |
|----------|--------------|---------|--------|----------|
| Windows | x64 | CPU | ✅ | [Download](../../releases/download/${{ needs.release-metadata.outputs.tag_name }}/llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-windows-x64-cpu.zip) |
| Windows | arm64 | CPU | ✅ | [Download](../../releases/download/${{ needs.release-metadata.outputs.tag_name }}/llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-windows-arm64-cpu.zip) |
| Windows | arm64 | OpenCL Adreno | ✅ | [Download](../../releases/download/${{ needs.release-metadata.outputs.tag_name }}/llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-windows-arm64-opencl-adreno.zip) |
| Windows | x64 | CUDA 12 (12.4 DLLs) | ✅ | [Download](../../releases/download/${{ needs.release-metadata.outputs.tag_name }}/llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-windows-x64-cuda12.zip) |
| Windows | x64 | CUDA 13 (13.3 DLLs) | ✅ | [Download](../../releases/download/${{ needs.release-metadata.outputs.tag_name }}/llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-windows-x64-cuda13.zip) |
| Windows | x64 | Vulkan | ✅ | [Download](../../releases/download/${{ needs.release-metadata.outputs.tag_name }}/llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-windows-x64-vulkan.zip) |
| Windows | x64 | OpenVINO | ✅ | [Download](../../releases/download/${{ needs.release-metadata.outputs.tag_name }}/llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-windows-x64-openvino.zip) |
| Windows | x64 | SYCL | ✅ | [Download](../../releases/download/${{ needs.release-metadata.outputs.tag_name }}/llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-windows-x64-sycl.zip) |
| Windows | x64 | HIP | ✅ | [Download](../../releases/download/${{ needs.release-metadata.outputs.tag_name }}/llm.cpp-${{ needs.release-metadata.outputs.tag_name }}-bin-windows-x64-hip.zip) |
- name: Publish release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ needs.release-metadata.outputs.tag_name }}
target_commitish: ${{ github.sha }}
prerelease: false
body_path: release-notes.md
files: dist/*