Skip to content
Open
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
9 changes: 8 additions & 1 deletion .github/workflows/build-apple.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ env:
LLAMA_LOG_TIMESTAMPS: 1

jobs:
gatekeeper:
uses: ./.github/workflows/gatekeeper.yml

macOS-latest-ios:
needs: [gatekeeper]
runs-on: macos-latest

steps:
Expand Down Expand Up @@ -71,6 +75,7 @@ jobs:
cmake --build build --config Release -j $(sysctl -n hw.logicalcpu) -- CODE_SIGNING_ALLOWED=NO

macos-latest-ios-xcode:
needs: [gatekeeper]
runs-on: macos-latest

steps:
Expand Down Expand Up @@ -118,6 +123,7 @@ jobs:
xcodebuild -project examples/llama.swiftui/llama.swiftui.xcodeproj -scheme llama.swiftui -sdk iphoneos CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= -destination 'generic/platform=iOS' FRAMEWORK_FOLDER_PATH=./build-ios build

macOS-latest-tvos:
needs: [gatekeeper]
runs-on: macos-latest

steps:
Expand Down Expand Up @@ -151,6 +157,7 @@ jobs:
cmake --build build --config Release -j $(sysctl -n hw.logicalcpu) -- CODE_SIGNING_ALLOWED=NO

macOS-latest-visionos:
needs: [gatekeeper]
runs-on: macos-latest

steps:
Expand Down Expand Up @@ -178,7 +185,7 @@ jobs:

macOS-latest-swift:
runs-on: macos-latest
needs: macos-latest-ios-xcode
needs: [gatekeeper, macos-latest-ios-xcode]

strategy:
matrix:
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,15 @@ env:
LLAMA_LOG_TIMESTAMPS: 1

jobs:
gatekeeper:
uses: ./.github/workflows/gatekeeper.yml

build-cmake-pkg:
needs: [gatekeeper]
uses: ./.github/workflows/build-cmake-pkg.yml

macOS-latest-arm64:
needs: [gatekeeper]
runs-on: macos-latest

steps:
Expand Down Expand Up @@ -97,6 +102,7 @@ jobs:
ctest -L main -E "test-llama-archs" --verbose --timeout 900

macOS-latest-x64:
needs: [gatekeeper]
runs-on: macos-15-intel

steps:
Expand Down Expand Up @@ -133,6 +139,7 @@ jobs:
ctest -L main --verbose --timeout 900

macOS-latest-arm64-webgpu:
needs: [gatekeeper]
runs-on: macos-latest

steps:
Expand Down Expand Up @@ -174,6 +181,7 @@ jobs:
ctest -L main --verbose --timeout 900

ubuntu-cpu:
needs: [gatekeeper]
strategy:
matrix:
include:
Expand Down Expand Up @@ -268,6 +276,7 @@ jobs:
./bin/llama-completion -m stories260K-be.gguf -p "One day, Lily met a Shoggoth" -n 500 -c 256

android-arm64:
needs: [gatekeeper]
runs-on: ubuntu-latest

env:
Expand Down Expand Up @@ -318,6 +327,7 @@ jobs:
time cmake --build build --config Release -j $(nproc)

ubuntu-latest-rpc:
needs: [gatekeeper]
runs-on: ubuntu-latest

continue-on-error: true
Expand Down Expand Up @@ -349,6 +359,7 @@ jobs:
ctest -L main --verbose

ubuntu-24-vulkan:
needs: [gatekeeper]
strategy:
matrix:
include:
Expand Down Expand Up @@ -388,6 +399,7 @@ jobs:
time cmake --build build -j $(nproc)

ubuntu-24-webgpu:
needs: [gatekeeper]
runs-on: ubuntu-24.04

steps:
Expand Down Expand Up @@ -460,6 +472,7 @@ jobs:
ctest -L main -E test-backend-ops --verbose --timeout 900

ubuntu-24-webgpu-wasm:
needs: [gatekeeper]
runs-on: ${{ 'ubuntu-24.04-arm' || 'ubuntu-24.04' }}

steps:
Expand Down Expand Up @@ -496,6 +509,7 @@ jobs:
time cmake --build build-wasm --config Release --target test-backend-ops -j $(nproc)

ubuntu-22-hip:
needs: [gatekeeper]
runs-on: ubuntu-22.04
container: rocm/dev-ubuntu-22.04:6.1.2

Expand Down Expand Up @@ -528,6 +542,7 @@ jobs:
cmake --build build --config Release -j $(nproc)

ubuntu-22-musa:
needs: [gatekeeper]
runs-on: ubuntu-22.04
container: mthreads/musa:rc4.3.0-devel-ubuntu22.04-amd64

Expand Down Expand Up @@ -558,6 +573,7 @@ jobs:


windows-latest:
needs: [gatekeeper]
runs-on: windows-2025

env:
Expand Down Expand Up @@ -680,6 +696,7 @@ jobs:
# & $sde -future -- ctest -L main -C Release --verbose --timeout 900

ubuntu-latest-cuda:
needs: [gatekeeper]
runs-on: ubuntu-latest
container: nvidia/cuda:12.6.2-devel-ubuntu24.04

Expand Down Expand Up @@ -716,6 +733,7 @@ jobs:
cmake --build build

windows-2022-cuda:
needs: [gatekeeper]
runs-on: windows-2022

strategy:
Expand Down Expand Up @@ -766,6 +784,7 @@ jobs:


windows-latest-hip:
needs: [gatekeeper]
runs-on: windows-2022

env:
Expand Down Expand Up @@ -834,6 +853,7 @@ jobs:
cmake --build build -j ${env:NUMBER_OF_PROCESSORS}

ubuntu-cpu-riscv64-native:
needs: [gatekeeper]
runs-on: ubuntu-24.04-riscv

steps:
Expand Down Expand Up @@ -906,6 +926,7 @@ jobs:
# TODO: simplify the following workflows using a matrix
# TODO: run lighter CI on PRs and the full CI only on master (if needed)
ggml-ci-x64-cpu-low-perf:
needs: [gatekeeper]
runs-on: ubuntu-22.04

steps:
Expand All @@ -932,6 +953,7 @@ jobs:
LLAMA_ARG_THREADS=$(nproc) GG_BUILD_LOW_PERF=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt

ggml-ci-arm64-cpu-low-perf:
needs: [gatekeeper]
runs-on: ubuntu-22.04-arm

steps:
Expand All @@ -958,6 +980,7 @@ jobs:
LLAMA_ARG_THREADS=$(nproc) GG_BUILD_LOW_PERF=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt

ggml-ci-x64-cpu-high-perf:
needs: [gatekeeper]
runs-on: ubuntu-22.04

steps:
Expand All @@ -984,6 +1007,7 @@ jobs:
LLAMA_ARG_THREADS=$(nproc) GG_BUILD_HIGH_PERF=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt

ggml-ci-arm64-cpu-high-perf:
needs: [gatekeeper]
runs-on: ubuntu-22.04-arm

steps:
Expand All @@ -1010,6 +1034,7 @@ jobs:
LLAMA_ARG_THREADS=$(nproc) GG_BUILD_HIGH_PERF=1 GG_BUILD_NO_SVE=1 GG_BUILD_NO_BF16=1 GG_BUILD_EXTRA_TESTS_0=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt

ggml-ci-arm64-cpu-high-perf-sve:
needs: [gatekeeper]
runs-on: ubuntu-22.04-arm

steps:
Expand All @@ -1036,6 +1061,7 @@ jobs:
LLAMA_ARG_THREADS=$(nproc) GG_BUILD_NO_BF16=1 GG_BUILD_EXTRA_TESTS_0=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt

ggml-ci-arm64-cpu-kleidiai:
needs: [gatekeeper]
runs-on: ubuntu-22.04-arm

steps:
Expand All @@ -1062,6 +1088,7 @@ jobs:
GG_BUILD_KLEIDIAI=1 GG_BUILD_EXTRA_TESTS_0=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt

ggml-ci-arm64-cpu-kleidiai-graviton4:
needs: [gatekeeper]
runs-on: ah-ubuntu_22_04-c8g_8x

steps:
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/gatekeeper.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Gatekeeper

on:
workflow_call:

jobs:
gatekeeper-auto:
if: github.ref_name == 'master'
runs-on: ubuntu-slim
steps:
- name: Auto-approve (master branch)
run: echo "Running on master branch - auto-approved"

gatekeeper-review:
if: github.ref_name != 'master'
runs-on: ubuntu-slim
environment: ci-manual
steps:
- name: Approved after review
run: echo "Non-master branch - approved after manual review"
Loading