Skip to content
Merged
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
126 changes: 126 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
name: CI

on:
push:
branches: [main]
paths-ignore:
- '**.md'
- 'docs/**'
- 'LICENSE'
- '.gitignore'
pull_request:
branches: [main]
paths-ignore:
- '**.md'
- 'docs/**'
- 'LICENSE'
- '.gitignore'
workflow_dispatch:

permissions:
contents: read

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

jobs:
pre-commit:
name: Pre-commit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: '3.13'
- run: pip install pre-commit
- run: pre-commit run --all-files

lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@e58605a9b6da7c637471fab8847a5e5a6b8df081 # v5
with:
enable-cache: true
- uses: actions/setup-python@v5
with:
python-version: '3.13'
- run: uv sync --extra dev
- run: uv run ruff check .
- run: uv run ruff format --check .

typecheck:
name: Type Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@e58605a9b6da7c637471fab8847a5e5a6b8df081 # v5
with:
enable-cache: true
- uses: actions/setup-python@v5
with:
python-version: '3.13'
- run: uv sync --extra dev
- run: uv run pyright

frontend-build:
name: Frontend Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
cache: npm
cache-dependency-path: studio-frontend/package-lock.json
- run: npm ci
working-directory: studio-frontend
- run: npm run build
working-directory: studio-frontend
- uses: actions/upload-artifact@v4
with:
name: frontend-dist
path: studio-frontend/build/
retention-days: 1

test:
name: Test
runs-on: ubuntu-latest
needs: frontend-build
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@e58605a9b6da7c637471fab8847a5e5a6b8df081 # v5
with:
enable-cache: true
- uses: actions/setup-python@v5
with:
python-version: '3.13'
- run: uv sync --extra dev
- uses: actions/download-artifact@v4
with:
name: frontend-dist
path: src/fireflyframework_agentic_studio/static/
- run: uv run pytest --cov --cov-report=term-missing

build:
name: Build Package
runs-on: ubuntu-latest
needs: [lint, typecheck, test]
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@e58605a9b6da7c637471fab8847a5e5a6b8df081 # v5
with:
enable-cache: true
- uses: actions/setup-python@v5
with:
python-version: '3.13'
- run: uv build
- uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
retention-days: 7
108 changes: 108 additions & 0 deletions .github/workflows/desktop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
name: Desktop Build

on:
push:
tags: ['desktop-v*']

permissions:
contents: write

jobs:
build-sidecar:
name: Build Sidecar
runs-on: macos-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: '3.13'

- uses: astral-sh/setup-uv@e58605a9b6da7c637471fab8847a5e5a6b8df081 # v5
with:
enable-cache: true

- uses: actions/setup-node@v4
with:
node-version: '22'
cache: npm
cache-dependency-path: studio-frontend/package-lock.json

- name: Build frontend
run: npm ci && npm run build
working-directory: studio-frontend

- name: Bundle frontend into static dir
run: uv run python scripts/build_studio.py

- name: Install PyInstaller and deps
run: uv sync --extra studio && uv pip install pyinstaller

- name: Build sidecar
run: uv run pyinstaller studio-desktop/pyinstaller/firefly_studio.spec --noconfirm

- uses: actions/upload-artifact@v4
with:
name: firefly-studio-sidecar
path: dist/firefly-studio/
retention-days: 1

build-tauri:
name: Build Desktop App
needs: build-sidecar
runs-on: macos-latest
steps:
- uses: actions/checkout@v4

- uses: actions/download-artifact@v4
with:
name: firefly-studio-sidecar
path: studio-desktop/src-tauri/sidecar/

- name: Make sidecar executable
run: chmod +x studio-desktop/src-tauri/sidecar/firefly-studio

- uses: actions/setup-node@v4
with:
node-version: '22'

- name: Install Rust
uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable

- name: Install Tauri CLI
run: cargo install tauri-cli --version "^2"

- name: Build Tauri app
run: cargo tauri build
working-directory: studio-desktop

- uses: actions/upload-artifact@v4
with:
name: desktop-macos-arm64
path: studio-desktop/src-tauri/target/release/bundle/dmg/*.dmg
retention-days: 3

release-desktop:
name: Create Desktop Release
needs: build-tauri
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/download-artifact@v4
with:
name: desktop-macos-arm64
path: artifacts/

- name: Create GitHub Release
env:
GH_TOKEN: ${{ github.token }}
TAG_NAME: ${{ github.ref_name }}
run: |
shopt -s nullglob
files=(artifacts/*.dmg)
if [ ${#files[@]} -gt 0 ]; then
gh release create "$TAG_NAME" "${files[@]}" --generate-notes --title "Firefly Studio Desktop $TAG_NAME"
else
gh release create "$TAG_NAME" --generate-notes --title "Firefly Studio Desktop $TAG_NAME"
fi
135 changes: 135 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
# Python-generated files
__pycache__/
*.py[oc]
/build/
/dist/
wheels/
*.egg-info/
*.egg
*.whl
*.pyz
*.pyzw
SDIST/
develop-eggs/
.eggs/
/lib/
/lib64/
parts/
var/
*.manifest
*.spec
!studio-desktop/pyinstaller/*.spec
pip-log.txt
pip-delete-this-directory.txt

# Virtual environments
.venv/
venv/
ENV/
env/
.env

# IDE - JetBrains
.idea/
*.iml
*.iws
*.ipr
out/

# IDE - VS Code
.vscode/
*.code-workspace

# IDE - Eclipse
.project
.classpath
.settings/

# IDE - Sublime Text
*.sublime-project
*.sublime-workspace

# Editor swap/backup files
*.swp
*.swo
*~
*.bak
*.tmp
*.orig

# OS - macOS
.DS_Store
.AppleDouble
.LSOverride
Icon\r
._*
.Spotlight-V100
.Trashes

# OS - Windows
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db
Desktop.ini
$RECYCLE.BIN/
*.lnk

# OS - Linux
.directory

# Testing
.coverage
.coverage.*
htmlcov/
.pytest_cache/
.tox/
.nox/
nosetests.xml
coverage.xml
*.cover
*.py,cover

# Type checking
.pyright/
.mypy_cache/
.dmypy.json
dmypy.json

# Ruff
.ruff_cache/

# Jupyter Notebook
.ipynb_checkpoints/

# Environments / Secrets
*.env.local
*.env.*.local
.env.production

# Logs
*.log
logs/

# UV
.uv/
uv.lock

# Bundled frontend build artifact (run scripts/build_studio.py)
src/fireflyframework_agentic_studio/static/*
!src/fireflyframework_agentic_studio/static/.gitkeep

# Studio frontend build output
studio-frontend/build/
studio-frontend/.svelte-kit/
studio-frontend/node_modules/

# Studio desktop (Tauri) build artifacts
studio-desktop/src-tauri/target/
studio-desktop/src-tauri/gen/
studio-desktop/build/
studio-desktop/dist/

# Distribution / packaging
*.tar.gz
*.zip
Loading
Loading