-
Notifications
You must be signed in to change notification settings - Fork 0
147 lines (124 loc) · 5.9 KB
/
Copy pathverify.yml
File metadata and controls
147 lines (124 loc) · 5.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
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