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
Empty file modified .githooks/pre-push
100755 → 100644
Empty file.
17 changes: 1 addition & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,7 @@
name: CI

on:
push:
branches:
- main # Run after merging into the "main" target
paths: # Run only if files relevant to CI have changed (i.e. not install.sh, scripts or .github/worfklows)
- 'llmfit-*/**'
- 'Cargo.*o*'
pull_request:
branches:
- main # Run in PRs targeting the "main" branch
paths:
- 'llmfit-*/**'
- 'Cargo.*o*'
types: # Avoid low-impact events like "edited" or "labeled"
- opened
- synchronize
- reopened
workflow_dispatch: # Manual only — original upstream CI

env:
CARGO_TERM_COLOR: always
Expand Down
53 changes: 53 additions & 0 deletions .github/workflows/deploy-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Deploy to GitHub Pages

on:
workflow_dispatch: # Manual only — Pages not configured in this fork

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./llmfit-web
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache-dependency-path: './llmfit-web/package-lock.json'

- name: Install dependencies
run: npm ci

- name: Build
# Set base url to repository name dynamically
run: npm run build -- --base=/${{ github.event.repository.name }}/

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./llmfit-web/dist

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
1 change: 1 addition & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
tags:
- "v*"
- "!v*-mac"
- "!v*-desktop"
workflow_dispatch: # Allow manual trigger

permissions:
Expand Down
88 changes: 63 additions & 25 deletions .github/workflows/release-desktop.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: Release Desktop (macOS)
name: Release Desktop (Multi-OS)

on:
push:
tags:
- "v*-mac"
- "v*-desktop"

permissions:
contents: write
Expand All @@ -14,19 +15,35 @@ env:
jobs:
build-desktop:
strategy:
fail-fast: false
matrix:
include:
- target: aarch64-apple-darwin
os: macos-latest
- target: x86_64-apple-darwin
os: macos-latest
- target: x86_64-pc-windows-msvc
os: windows-latest
- target: x86_64-unknown-linux-gnu
os: ubuntu-22.04

runs-on: ${{ matrix.os }}

steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Install dependencies (Ubuntu only)
if: matrix.os == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev build-essential curl wget file libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
Expand All @@ -35,51 +52,72 @@ jobs:
- name: Install Tauri CLI
run: cargo install tauri-cli --version "^2"

- name: Install Frontend Dependencies
working-directory: llmfit-desktop/frontend
run: npm ci

- name: Build Tauri app bundle
run: cargo tauri build --target ${{ matrix.target }} --bundles app
run: cargo tauri build --target ${{ matrix.target }}
working-directory: llmfit-desktop

- name: Package .app bundle
- name: Package artifacts
shell: bash
run: |
TAG="${GITHUB_REF_NAME}"
# Search both possible target locations
for BASE in "target" "llmfit-desktop/target"; do
APP=$(find "${BASE}/${{ matrix.target }}/release/bundle" -name '*.app' -maxdepth 3 2>/dev/null | head -1)
[ -n "$APP" ] && break
done

if [ -z "$APP" ]; then
echo "::error::No .app bundle found"
find target/ llmfit-desktop/target/ -type d -name 'bundle' 2>/dev/null || true
exit 1
set +e
DEST_DIR="${GITHUB_WORKSPACE}/release-assets"
mkdir -p "$DEST_DIR"

# Cargo workspace puts target at workspace root, not under llmfit-desktop/
SEARCH_ROOT="${GITHUB_WORKSPACE}/target/${{ matrix.target }}/release"

# Fallback: also check under llmfit-desktop if workspace layout differs
if [ ! -d "$SEARCH_ROOT" ]; then
SEARCH_ROOT="${GITHUB_WORKSPACE}/llmfit-desktop/target/${{ matrix.target }}/release"
fi

echo "Found app bundle: $APP"
DEST="llmfit-desktop-${TAG}-${{ matrix.target }}.app.tar.gz"
cd "$(dirname "$APP")"
tar czf "/tmp/${DEST}" "$(basename "$APP")"
echo "DESKTOP_ASSET=${DEST}" >> "$GITHUB_ENV"
echo "DESKTOP_ASSET_PATH=/tmp/${DEST}" >> "$GITHUB_ENV"

echo "=== Searching for artifacts under: $SEARCH_ROOT ==="
find "$SEARCH_ROOT" -type f \( -name "*.dmg" -o -name "*.app" -o -name "*.msi" -o -name "*.exe" -o -name "*.deb" -o -name "*.AppImage" \) 2>/dev/null || echo "No artifacts found"

if [[ "${{ matrix.os }}" == "macos-latest" ]]; then
# Package .app as tarball
APP=$(find "$SEARCH_ROOT" -name '*.app' -type d 2>/dev/null | head -1)
if [ -n "$APP" ]; then
cd "$(dirname "$APP")"
tar czf "${DEST_DIR}/llmfit-desktop-${GITHUB_REF_NAME}-${{ matrix.target }}.app.tar.gz" "$(basename "$APP")"
cd "${GITHUB_WORKSPACE}"
fi
find "$SEARCH_ROOT" -type f -name "*.dmg" -exec cp {} "$DEST_DIR/" \; 2>/dev/null || true
elif [[ "${{ matrix.os }}" == "windows-latest" ]]; then
find "$SEARCH_ROOT" -type f -name "*.msi" -exec cp {} "$DEST_DIR/" \; 2>/dev/null || true
find "$SEARCH_ROOT" -type f -name "*.exe" -not -name "llmfit-desktop.exe" -exec cp {} "$DEST_DIR/" \; 2>/dev/null || true
else
find "$SEARCH_ROOT" -type f -name "*.deb" -exec cp {} "$DEST_DIR/" \; 2>/dev/null || true
find "$SEARCH_ROOT" -type f -name "*.AppImage" -exec cp {} "$DEST_DIR/" \; 2>/dev/null || true
fi

echo "=== Packaged artifacts ==="
ls -la "$DEST_DIR/" 2>/dev/null || echo "No artifacts packaged"

- name: Upload artifact
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: ${{ env.DESKTOP_ASSET }}
path: ${{ env.DESKTOP_ASSET_PATH }}
name: desktop-assets-${{ matrix.target }}
path: release-assets/*

release:
needs: build-desktop
runs-on: ubuntu-latest

steps:
- name: Download all artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
with:
path: artifacts
pattern: desktop-assets-*
merge-multiple: true

- name: Create GitHub Release
uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2.5.0
with:
generate_release_notes: true
files: artifacts/**/*.tar.gz
files: artifacts/*
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
tags:
- "v*"
- "!v*-mac"
- "!v*-desktop"

permissions:
contents: write
Expand Down Expand Up @@ -137,7 +138,7 @@ jobs:

steps:
- name: Download all artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
with:
path: artifacts

Expand Down
15 changes: 12 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
.DS_Store
/target
llmfit
/docs
llmfit-desktop/gen/schemas/*
data/gguf_sources_cache.json
llmfit-web/node_modules/
llmfit-web/dist/
**/node_modules/
**/dist/
**/.svelte-kit/
.worktrees/
nul
.agents/
AGENTS.md
IMPLEMENTATION_PLAN.md
skills/
skills-lock.json
tmp.gif
dev_out.txt
Loading