Skip to content

site: remove KV playground and all VRAM-calculation content #74

site: remove KV playground and all VRAM-calculation content

site: remove KV playground and all VRAM-calculation content #74

Workflow file for this run

name: anvil
on:
push:
branches: [main]
tags: ['v*.*.*']
pull_request:
branches: [main]
workflow_dispatch:
permissions:
contents: write
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- name: linux-x86_64
asset: anvil-linux-x86_64
binary: build/anvil
os: ubuntu-24.04
flags: "-DGGML_NATIVE=OFF -DGGML_VULKAN=ON -DGGML_CUDA=OFF -DGGML_HIP=OFF -DGGML_SYCL=OFF -DGGML_OPENVINO=OFF -DGGML_OPENCL=OFF -DGGML_AVX2=ON -DGGML_FMA=ON -DGGML_F16C=ON"
- name: linux-aarch64
asset: anvil-linux-aarch64
binary: build/anvil
os: ubuntu-24.04-arm
flags: "-DGGML_NATIVE=OFF -DGGML_VULKAN=ON -DGGML_CUDA=OFF -DGGML_HIP=OFF -DGGML_SYCL=OFF -DGGML_OPENVINO=OFF -DGGML_OPENCL=OFF"
- name: macos-aarch64
asset: anvil-macos-aarch64
binary: build/anvil
os: macos-latest
flags: "-DGGML_NATIVE=OFF -DGGML_CUDA=OFF -DGGML_HIP=OFF -DGGML_SYCL=OFF -DGGML_OPENVINO=OFF -DGGML_OPENCL=OFF -DCMAKE_OSX_DEPLOYMENT_TARGET=13.0"
- name: windows-x86_64
asset: anvil-windows-x86_64.exe
binary: build/Release/anvil.exe
os: windows-latest
flags: "-DGGML_NATIVE=OFF -DGGML_VULKAN=ON -DGGML_CUDA=OFF -DGGML_HIP=OFF -DGGML_SYCL=OFF -DGGML_OPENVINO=OFF -DGGML_OPENCL=OFF -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DSPIRV-Headers_DIR=C:/vcpkg/installed/x64-windows/share/spirv-headers"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v5
with:
submodules: recursive
- name: Install build deps (Linux)
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y cmake g++ git libvulkan-dev glslc glslang-tools glslang-dev spirv-headers spirv-tools
- name: Install Vulkan SDK (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
$ErrorActionPreference = 'Stop'
$ProgressPreference = 'SilentlyContinue'
$version = '1.3.290.0'
$installer = "$env:TEMP\vulkan-sdk-$version.exe"
Invoke-WebRequest -Uri "https://sdk.lunarg.com/sdk/download/$version/windows/VulkanSDK-$version-Installer.exe" `
-OutFile $installer -TimeoutSec 600
$dest = "C:\VulkanSDK\$version"
$p = Start-Process -FilePath $installer `
-ArgumentList @('--root', $dest, '--accept-licenses', '--default-answer', '--confirm-command', 'install') `
-NoNewWindow -PassThru
if (-not $p.WaitForExit(900000)) {
Stop-Process -Id $p.Id -Force -ErrorAction SilentlyContinue
throw 'Vulkan SDK installer timed out after 15 minutes'
}
if ($p.ExitCode -ne 0) { throw "Vulkan SDK installer failed with exit code $($p.ExitCode)" }
if (-not (Test-Path "$dest\Bin\glslc.exe")) {
throw "Vulkan SDK $version not found at $dest after install"
}
"VULKAN_SDK=$dest" >> $env:GITHUB_ENV
- name: Install SPIRV-Headers (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
& C:\vcpkg\vcpkg.exe install spirv-headers:x64-windows
if ($LASTEXITCODE -ne 0) { throw "vcpkg spirv-headers install failed (exit $LASTEXITCODE)" }
- name: Configure
run: cmake -B build -S . -DCMAKE_BUILD_TYPE=Release ${{ matrix.flags }}
- name: Build
run: cmake --build build --config Release
- name: Check Vulkan linkage (Linux)
if: runner.os == 'Linux'
run: |
echo "=== Vulkan dependency check ==="
ldd build/anvil | grep -i vulkan && echo "⚠ hard libvulkan dependency detected" || echo "✅ no hard dependency — dlopen fallback active"
- name: Smoke test
shell: bash
run: bash tests/smoke.sh "${{ matrix.binary }}"
- name: Strip Unix binary
if: runner.os != 'Windows'
run: strip build/anvil || true
- name: Rename Unix release asset
if: runner.os != 'Windows'
run: cp "${{ matrix.binary }}" "${{ matrix.asset }}"
- name: Rename Windows release asset
if: runner.os == 'Windows'
shell: pwsh
run: Copy-Item "${{ matrix.binary }}" "${{ matrix.asset }}"
- name: Upload artifact (all builds)
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.asset }}
path: ${{ matrix.asset }}
if-no-files-found: error
- name: Attach to release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
files: ${{ matrix.asset }}