Compare commits
4 Commits
91a15baebc
...
v0.1.0-rc2
| Author | SHA1 | Date | |
|---|---|---|---|
| 07994ed948 | |||
| 04ecaa4585 | |||
| 78728ef00e | |||
| a968acf3ae |
57
.gitea/workflows/release.yml
Normal file
57
.gitea/workflows/release.yml
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
# Release-Pakete: .deb (Ubuntu/Debian) und Arch-Paket (CachyOS/Arch).
|
||||||
|
# Startet bei einem Tag v* oder manuell (workflow_dispatch). Die Artefakte hängen am Lauf.
|
||||||
|
name: release
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- "v*"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deb:
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Systemabhängigkeiten
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y libwebkit2gtk-4.1-dev build-essential curl wget file \
|
||||||
|
libxdo-dev libssl-dev libayatana-appindicator3-dev librsvg2-dev patchelf
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 24
|
||||||
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
|
- run: npm ci
|
||||||
|
- run: npm run tauri build -- --bundles deb
|
||||||
|
- uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: coding-bench-deb
|
||||||
|
path: src-tauri/target/release/bundle/deb/*.deb
|
||||||
|
|
||||||
|
arch:
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
container: archlinux:latest
|
||||||
|
steps:
|
||||||
|
- name: Pakete für Arch
|
||||||
|
run: |
|
||||||
|
pacman -Syu --noconfirm --needed base-devel git nodejs npm rust \
|
||||||
|
webkit2gtk-4.1 gtk3 librsvg libayatana-appindicator podman sudo
|
||||||
|
useradd -m builder
|
||||||
|
echo "builder ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/builder
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
path: src
|
||||||
|
- name: Quellarchiv und Paket bauen
|
||||||
|
run: |
|
||||||
|
cd src
|
||||||
|
VERSION=$(sed -n 's/^pkgver=//p' packaging/arch/PKGBUILD)
|
||||||
|
git archive --prefix=coding-bench-$VERSION/ -o /tmp/coding-bench-$VERSION.tar.gz HEAD
|
||||||
|
mkdir -p /home/builder/pkg
|
||||||
|
cp packaging/arch/PKGBUILD /tmp/coding-bench-$VERSION.tar.gz /home/builder/pkg/
|
||||||
|
chown -R builder:builder /home/builder/pkg
|
||||||
|
su builder -c "cd /home/builder/pkg && makepkg -s --noconfirm -f"
|
||||||
|
cp /home/builder/pkg/*.pkg.tar.zst src/
|
||||||
|
- uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: coding-bench-arch
|
||||||
|
path: src/*.pkg.tar.zst
|
||||||
46
Makefile
Normal file
46
Makefile
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
# coding-bench: Bedienung über make. `make help` zeigt alle Ziele.
|
||||||
|
|
||||||
|
CB_IMAGE ?= cb-python:latest
|
||||||
|
ARCH_BUILD := build/arch
|
||||||
|
VERSION := $(shell sed -n 's/^pkgver=//p' packaging/arch/PKGBUILD)
|
||||||
|
|
||||||
|
.PHONY: help dev build test test-integration images arch-pkg stop stop-runs clean
|
||||||
|
|
||||||
|
help: ## Zeigt diese Hilfe
|
||||||
|
@grep -E '^[a-zA-Z_-]+:.*## ' $(MAKEFILE_LIST) | awk -F":.*## " '{printf " %-18s %s\n", $$1, $$2}'
|
||||||
|
|
||||||
|
dev: ## App im Entwicklungsmodus starten (Fenster öffnet sich)
|
||||||
|
npm run tauri dev
|
||||||
|
|
||||||
|
build: ## Release-Binary bauen (ohne Paket)
|
||||||
|
npm run tauri build -- --no-bundle
|
||||||
|
|
||||||
|
test: ## Unit-Tests, Frontend-Build und Typprüfung
|
||||||
|
cd src-tauri && cargo test
|
||||||
|
npm run build
|
||||||
|
npx svelte-check --threshold error
|
||||||
|
|
||||||
|
test-integration: ## Echte Läufe: Podman, Modell-Endpunkt (CB_BACKEND, CB_OLLAMA_URL oder CB_OPENAI_URL, CB_OLLAMA_MODEL)
|
||||||
|
@test -n "$$CB_OLLAMA_MODEL" || { echo "CB_OLLAMA_MODEL setzen (und CB_OLLAMA_URL oder CB_BACKEND=openai mit CB_OPENAI_URL)"; exit 1; }
|
||||||
|
cd src-tauri && CB_TEST_IMAGE=$(CB_IMAGE) cargo test -- --ignored --nocapture --test-threads=1
|
||||||
|
|
||||||
|
images: ## Container-Image cb-python bauen
|
||||||
|
podman build -t $(CB_IMAGE) images/cb-python
|
||||||
|
|
||||||
|
arch-pkg: ## Arch-Paket lokal bauen (build/arch, braucht makepkg)
|
||||||
|
rm -rf $(ARCH_BUILD) && mkdir -p $(ARCH_BUILD)
|
||||||
|
git archive --prefix=coding-bench-$(VERSION)/ -o $(ARCH_BUILD)/coding-bench-$(VERSION).tar.gz HEAD
|
||||||
|
cp packaging/arch/PKGBUILD $(ARCH_BUILD)/
|
||||||
|
cd $(ARCH_BUILD) && makepkg -f
|
||||||
|
|
||||||
|
stop: ## Laufende App (Dev-Modus) beenden
|
||||||
|
-pkill -f "target/debug/coding-bench"
|
||||||
|
-pkill -f "tauri dev"
|
||||||
|
-fuser -k 1420/tcp 2>/dev/null
|
||||||
|
|
||||||
|
stop-runs: ## Übrig gebliebene Sandbox-Container (cb-*) entfernen
|
||||||
|
-podman ps -a --filter name=^cb- -q | xargs -r podman rm -f
|
||||||
|
|
||||||
|
clean: ## Build-Ausgaben entfernen (nicht die Quellen)
|
||||||
|
rm -rf build build-frontend .svelte-kit
|
||||||
|
rm -rf src-tauri/target
|
||||||
12
README.md
12
README.md
@ -10,9 +10,9 @@ Fehlerberichte und Feature-Wünsche sind als Issues willkommen. Pull Requests we
|
|||||||
|
|
||||||
## Status
|
## Status
|
||||||
|
|
||||||
Version: noch keine (Release 0.1.0 ist geplant, siehe `ROADMAP.md`). Es gibt bisher **keinen lauffähigen Code**. Dieses Dokument beschreibt das Ziel aus der `SPEC.md`.
|
Version: noch keine (Release 0.1.0 in Arbeit, siehe `ROADMAP.md`). Der Code ist gebaut und die Kernfunktionen sind getestet, die Oberfläche ist noch nicht im Fenster abgenommen.
|
||||||
|
|
||||||
Getestet auf: nichts. Die Zielplattform ist Linux (Pop!_OS), dort ist noch nichts gebaut oder geprüft.
|
Getestet auf: CachyOS (Kernel 7.3.1), Podman 6.1.4, Node.js 24.21, Rust 1.99.1. Geprüft sind Build, Unit-Tests, ein Ende-zu-Ende-Lauf gegen Ollama (`qwen3:0.6b`) und ein Lauf aller sechs Aufgaben über einen OpenAI-kompatiblen Endpunkt (`qwen3.8-flash-next-q2_0`). Andere Systeme sind nicht geprüft.
|
||||||
|
|
||||||
## Before you use it
|
## Before you use it
|
||||||
|
|
||||||
@ -32,10 +32,10 @@ Noch nicht verfügbar. Installationshinweise folgen mit dem ersten Release.
|
|||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
* Linux (Pop!_OS als Zielplattform)
|
* Linux (geprüft auf CachyOS)
|
||||||
* Podman (rootless)
|
* Podman, rootless, mit Netzwerk-Unterstützung für Images beim ersten Bauen
|
||||||
* Rust-Toolchain und Node.js (für den Build, Details folgen)
|
* Rust-Toolchain (Rust 1.99.1 geprüft) und Node.js (24.21 geprüft), dazu die Tauri-Systemvoraussetzungen (WebKitGTK 4.1)
|
||||||
* Ollama mit Modellen, die Tool-Calling unterstützen
|
* Ein Modell-Endpunkt mit Tool-Calling: Ollama (`/api/chat`) oder ein OpenAI-kompatibler Server (z. B. strata, `/v1/chat/completions`)
|
||||||
|
|
||||||
## Build and run
|
## Build and run
|
||||||
|
|
||||||
|
|||||||
@ -9,7 +9,7 @@ Zeichen: ✓ fertig · ◐ teilweise · ✗ offen · ? nicht geprüft.
|
|||||||
- **Sandbox:** Jeder Lauf in einem frischen Podman-Container mit `--network none`. Der Agent arbeitet nur unter `/work`.
|
- **Sandbox:** Jeder Lauf in einem frischen Podman-Container mit `--network none`. Der Agent arbeitet nur unter `/work`.
|
||||||
- **Sequentiell:** Modelle laufen nacheinander, weil ein Modell die GPU belegt. Parallelität nur, wenn du `parallel > 1` setzt.
|
- **Sequentiell:** Modelle laufen nacheinander, weil ein Modell die GPU belegt. Parallelität nur, wenn du `parallel > 1` setzt.
|
||||||
- **Versionierung:** System-Prompt und Limits werden pro Batch in `config_json` mitgespeichert, damit Läufe vergleichbar bleiben.
|
- **Versionierung:** System-Prompt und Limits werden pro Batch in `config_json` mitgespeichert, damit Läufe vergleichbar bleiben.
|
||||||
- **Plattform und Stack:** Linux (Pop!_OS) zuerst. Tauri 2, Rust-Backend, Svelte mit TypeScript fürs Frontend, SQLite für Ergebnisse.
|
- **Plattform und Stack:** Linux (CachyOS) zuerst. Tauri 2, Rust-Backend, Svelte mit TypeScript fürs Frontend, SQLite für Ergebnisse.
|
||||||
- **Nicht-Ziele v1:** verteiltes Ausführen auf mehreren Rechnern, Nutzerverwaltung, Veröffentlichen von Ergebnissen.
|
- **Nicht-Ziele v1:** verteiltes Ausführen auf mehreren Rechnern, Nutzerverwaltung, Veröffentlichen von Ergebnissen.
|
||||||
- **Git:** Repo auf deinem Gitea. Nicht pushen ohne dein ausdrückliches Wort.
|
- **Git:** Repo auf deinem Gitea. Nicht pushen ohne dein ausdrückliches Wort.
|
||||||
- **Klicktests:** Eine neue Funktion gilt erst als fertig, wenn ihre Klicktests aus `KLICKTESTS.md` mindestens einmal ✓ haben. Das Todo nennt die zugehörigen Tests. Du darfst die Regel für einen Block aufweichen, wenn du ihn bewusst erledigen willst; das steht dann im Todo.
|
- **Klicktests:** Eine neue Funktion gilt erst als fertig, wenn ihre Klicktests aus `KLICKTESTS.md` mindestens einmal ✓ haben. Das Todo nennt die zugehörigen Tests. Du darfst die Regel für einen Block aufweichen, wenn du ihn bewusst erledigen willst; das steht dann im Todo.
|
||||||
|
|||||||
2
SPEC.md
2
SPEC.md
@ -219,5 +219,5 @@ Jede Anforderung hat eine feste ID.
|
|||||||
|
|
||||||
- Ollama läuft lokal oder im Netz und unterstützt Tool-Calling für die getesteten Modelle. Modelle ohne Tool-Support werden als `endpoint_error` markiert und übersprungen.
|
- Ollama läuft lokal oder im Netz und unterstützt Tool-Calling für die getesteten Modelle. Modelle ohne Tool-Support werden als `endpoint_error` markiert und übersprungen.
|
||||||
- Vergleichbarkeit mit veröffentlichten Benchmarkzahlen hängt vom Harness ab (Prompt, Tools, Limits). Der System-Prompt und die Limits sind deshalb versioniert und werden im Batch mitgespeichert (`config_json`).
|
- Vergleichbarkeit mit veröffentlichten Benchmarkzahlen hängt vom Harness ab (Prompt, Tools, Limits). Der System-Prompt und die Limits sind deshalb versioniert und werden im Batch mitgespeichert (`config_json`).
|
||||||
- Betriebssystem: Linux (Pop!_OS) zuerst, andere Plattformen nicht Teil von v1.
|
- Betriebssystem: Linux (CachyOS) zuerst, andere Plattformen nicht Teil von v1.
|
||||||
- Entscheidung offen: Svelte oder React fürs Frontend. Der Entwickler wählt, was er schneller liefert.
|
- Entscheidung offen: Svelte oder React fürs Frontend. Der Entwickler wählt, was er schneller liefert.
|
||||||
|
|||||||
32
packaging/arch/PKGBUILD
Normal file
32
packaging/arch/PKGBUILD
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
# Maintainer: wlkns-dev
|
||||||
|
# Paket aus dem Quellarchiv des Git-Tags. Das Archiv erzeugt der Release-Workflow
|
||||||
|
# (git archive) bzw. man lokal mit: git archive --prefix=coding-bench-$pkgver/ -o coding-bench-$pkgver.tar.gz HEAD
|
||||||
|
pkgname=coding-bench
|
||||||
|
pkgver=0.1.0
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc="Benchmark für lokale LLMs als Coding-Agent: Aufgaben lösen lassen, Ranking erstellen"
|
||||||
|
arch=('x86_64')
|
||||||
|
url="https://git.wlkns.org/wlkns-dev/coding-bench"
|
||||||
|
license=('custom:none')
|
||||||
|
depends=('webkit2gtk-4.1' 'gtk3' 'librsvg' 'libayatana-appindicator' 'podman')
|
||||||
|
makedepends=('rust' 'nodejs' 'npm')
|
||||||
|
source=("$pkgname-$pkgver.tar.gz")
|
||||||
|
sha256sums=('SKIP')
|
||||||
|
# !lto: makepkg compiliert sonst das gebündelte SQLite mit -flto, lld findet dann die Symbole nicht.
|
||||||
|
options=('!debug' '!lto')
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cd "$srcdir/$pkgname-$pkgver"
|
||||||
|
npm ci
|
||||||
|
npm run tauri build -- --no-bundle
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
cd "$srcdir/$pkgname-$pkgver"
|
||||||
|
install -Dm755 "src-tauri/target/release/coding-bench" "$pkgdir/usr/bin/coding-bench"
|
||||||
|
install -Dm644 "packaging/coding-bench.desktop" "$pkgdir/usr/share/applications/coding-bench.desktop"
|
||||||
|
install -Dm644 "src-tauri/icons/128x128.png" "$pkgdir/usr/share/icons/hicolor/128x128/apps/coding-bench.png"
|
||||||
|
install -Dm644 "src-tauri/icons/32x32.png" "$pkgdir/usr/share/icons/hicolor/32x32/apps/coding-bench.png"
|
||||||
|
install -dm755 "$pkgdir/usr/share/coding-bench"
|
||||||
|
cp -r tasks "$pkgdir/usr/share/coding-bench/tasks"
|
||||||
|
}
|
||||||
9
packaging/coding-bench.desktop
Normal file
9
packaging/coding-bench.desktop
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Type=Application
|
||||||
|
Name=coding-bench
|
||||||
|
GenericName=Benchmark für lokale LLM-Agenten
|
||||||
|
Comment=Lokale LLMs als Coding-Agent gegen Aufgaben testen und vergleichen
|
||||||
|
Exec=coding-bench
|
||||||
|
Icon=coding-bench
|
||||||
|
Terminal=false
|
||||||
|
Categories=Development;Utility;
|
||||||
@ -10,6 +10,8 @@ use std::fs;
|
|||||||
use std::path::{Path, PathBuf};
|
use std::path::{Path, PathBuf};
|
||||||
|
|
||||||
pub const CONFIG_FILE_NAME: &str = "config.toml";
|
pub const CONFIG_FILE_NAME: &str = "config.toml";
|
||||||
|
/// Aufgaben, die ein Paket installiert. Gilt, wenn weder die Konfiguration noch der Datenordner Aufgaben angeben.
|
||||||
|
pub const SYSTEM_TASKS_DIR: &str = "/usr/share/coding-bench/tasks";
|
||||||
|
|
||||||
/// Rohe Konfiguration, so wie sie in der Datei steht.
|
/// Rohe Konfiguration, so wie sie in der Datei steht.
|
||||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
||||||
@ -121,7 +123,10 @@ pub fn load_or_create(config_dir: &Path, default_data_dir: &Path) -> Result<(Pat
|
|||||||
defaults
|
defaults
|
||||||
};
|
};
|
||||||
|
|
||||||
let paths = config.resolve(&config_file, default_data_dir);
|
let mut paths = config.resolve(&config_file, default_data_dir);
|
||||||
|
if config.tasks_dir.is_none() && !paths.tasks_dir.is_dir() && Path::new(SYSTEM_TASKS_DIR).is_dir() {
|
||||||
|
paths.tasks_dir = PathBuf::from(SYSTEM_TASKS_DIR);
|
||||||
|
}
|
||||||
fs::create_dir_all(&paths.data_dir)
|
fs::create_dir_all(&paths.data_dir)
|
||||||
.map_err(|e| format!("Datenordner {} nicht anlegbar: {e}", paths.data_dir.display()))?;
|
.map_err(|e| format!("Datenordner {} nicht anlegbar: {e}", paths.data_dir.display()))?;
|
||||||
Ok((paths, config))
|
Ok((paths, config))
|
||||||
|
|||||||
@ -24,6 +24,14 @@
|
|||||||
"bundle": {
|
"bundle": {
|
||||||
"active": true,
|
"active": true,
|
||||||
"targets": "all",
|
"targets": "all",
|
||||||
|
"linux": {
|
||||||
|
"deb": {
|
||||||
|
"depends": ["podman"],
|
||||||
|
"files": {
|
||||||
|
"/usr/share/coding-bench/tasks": "../tasks"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"icon": [
|
"icon": [
|
||||||
"icons/32x32.png",
|
"icons/32x32.png",
|
||||||
"icons/128x128.png",
|
"icons/128x128.png",
|
||||||
|
|||||||
Reference in New Issue
Block a user