build: Paketbau für .deb und Arch-Paket vorbereiten

Tauri-Bundle: .deb hängt von podman ab und installiert die Aufgaben nach
/usr/share/coding-bench/tasks. Die App findet diesen Ordner, wenn weder
Konfiguration noch Datenordner Aufgaben angeben. PKGBUILD, Desktop-Eintrag
und Gitea-Workflow (.deb und Arch-Paket, Start bei Tag v* oder manuell).

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-07 12:03:05 +01:00
parent a968acf3ae
commit 8db41b8572
5 changed files with 111 additions and 1 deletions

View 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@v4
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@v4
with:
name: coding-bench-arch
path: src/*.pkg.tar.zst

31
packaging/arch/PKGBUILD Normal file
View File

@ -0,0 +1,31 @@
# 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')
options=('!debug')
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"
}

View 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;

View File

@ -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))

View File

@ -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",