Skip to content

Upgrade performance artifact action to Node 24 #16

Upgrade performance artifact action to Node 24

Upgrade performance artifact action to Node 24 #16

Workflow file for this run

name: verify
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: verify-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: ${{ matrix.name }}
strategy:
fail-fast: false
matrix:
include:
- name: macOS 15 ARM64 primary
os: macos-15
runtime_identifier: osx-arm64
executable_suffix: ''
llama_binary_directory: build/bin
- name: Ubuntu 24.04 x64 portable
os: ubuntu-24.04
runtime_identifier: linux-x64
executable_suffix: ''
llama_binary_directory: build/bin
- name: Windows Server 2025 x64 portable
os: windows-2025
runtime_identifier: win-x64
executable_suffix: .exe
llama_binary_directory: build/bin/Release
runs-on: ${{ matrix.os }}
timeout-minutes: 35
env:
DOTNET_NOLOGO: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
SYNAPSE_REQUIRED_RUNTIME_IDENTIFIER: ${{ matrix.runtime_identifier }}
SYNAPSE_DOTLLM_VERSION: d88040451d7db56e5dfef9d5754ad0955b0f7fe5
SYNAPSE_LLAMACPP_VERSION: b29c606e28a01b1bc8c1351026a0fa6e616bf6c4
SYNAPSE_MODEL_ROOT: ${{ github.workspace }}/artifacts/models
SYNAPSE_FOUNDRY_CACHE: ${{ github.workspace }}/artifacts/foundry-local
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Checkout pinned dotLLM benchmark subject
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
repository: kkokosa/dotLLM
ref: d88040451d7db56e5dfef9d5754ad0955b0f7fe5
path: _external/dotLLM
persist-credentials: false
- name: Checkout pinned native llama.cpp benchmark subject
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
repository: ggml-org/llama.cpp
ref: b29c606e28a01b1bc8c1351026a0fa6e616bf6c4
path: _external/llama.cpp
persist-credentials: false
- name: Install pinned .NET SDK
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
with:
global-json-file: global.json
- name: Install pinned Rust toolchain
run: rustup toolchain install 1.98.1 --profile minimal --component clippy,rustfmt
- name: Restore locked dependencies
run: dotnet restore Synapse.slnx --locked-mode
- name: Build .NET
run: dotnet build Synapse.slnx --configuration Release --no-restore
- name: Restore verified model cache
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6
with:
path: ${{ env.SYNAPSE_MODEL_ROOT }}
key: synapse-models-${{ runner.os }}-${{ matrix.runtime_identifier }}-${{ hashFiles('models/catalog.json') }}
- name: Fetch verified small model packages
shell: bash
run: |
dotnet run --project src/Synapse.Cli --configuration Release --no-build -- \
model fetch --set family-small --output "${SYNAPSE_MODEL_ROOT}"
dotnet run --project src/Synapse.Cli --configuration Release --no-build -- \
model fetch --set embedding-small --output "${SYNAPSE_MODEL_ROOT}"
- name: Restore Foundry Local anchor model cache
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6
with:
path: ${{ env.SYNAPSE_FOUNDRY_CACHE }}
key: foundry-local-anchor-${{ runner.os }}-${{ hashFiles('benchmarks/model-sets/foundry-local-families.json') }}
- name: Fetch only the Foundry Local anchor model for functional checks
shell: bash
run: |
dotnet experiments/Synapse.FoundryLocalBenchmarks/bin/Release/net10.0/Synapse.FoundryLocalBenchmarks.dll \
fetch --set benchmarks/model-sets/foundry-local-families.json --alias qwen2.5-0.5b --cache "${SYNAPSE_FOUNDRY_CACHE}"
- name: Build pinned dotLLM benchmark subject
run: dotnet build _external/dotLLM/src/DotLLM.Cli/DotLLM.Cli.csproj --configuration Release
- name: Build pinned CPU llama.cpp benchmark subjects
shell: bash
run: |
cmake -S _external/llama.cpp -B _external/llama.cpp/build \
-DCMAKE_BUILD_TYPE=Release -DGGML_METAL=OFF \
-DLLAMA_BUILD_TESTS=OFF -DLLAMA_BUILD_SERVER=OFF
cmake --build _external/llama.cpp/build --config Release --parallel 4 \
--target llama-completion llama-bench
- name: Register dotLLM smoke-test executable
shell: bash
run: echo "SYNAPSE_DOTLLM_EXECUTABLE=${GITHUB_WORKSPACE}/_external/dotLLM/src/DotLLM.Cli/bin/Release/net10.0/DotLLM.Cli${{ matrix.executable_suffix }}" >> "${GITHUB_ENV}"
- name: Register native llama.cpp smoke-test executable
shell: bash
run: echo "SYNAPSE_LLAMACPP_EXECUTABLE=${GITHUB_WORKSPACE}/_external/llama.cpp/${{ matrix.llama_binary_directory }}/llama-completion${{ matrix.executable_suffix }}" >> "${GITHUB_ENV}"
- name: Test .NET
run: dotnet test Synapse.slnx --configuration Release --no-build
- name: Check Rust formatting
run: cargo fmt --manifest-path native/Cargo.toml --all --check
- name: Lint Rust
run: cargo clippy --manifest-path native/Cargo.toml --workspace --all-targets -- -D warnings
- name: Test Rust
run: cargo test --manifest-path native/Cargo.toml --locked
- name: Exercise both doctor entry points
shell: bash
run: |
state_dir="${RUNNER_TEMP}/synapse-doctor-state"
dotnet run --project src/Synapse.Cli --configuration Release --no-build -- \
doctor --memory-budget-bytes 1073741824 --state-directory "${state_dir}"
cargo run --manifest-path native/Cargo.toml --locked --quiet \
-p synapse-runtime -- doctor --memory-budget-bytes 1073741824