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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/actions/setup-node-pnpm/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Setup Node + pnpm
description: Setup pnpm, Node.js, pnpm store cache, and install workspace dependencies

inputs:
node-version:
description: Node.js version
required: false
default: '25'
install:
description: Whether to run pnpm install
required: false
default: 'true'

runs:
using: composite
steps:
- name: Setup pnpm
uses: pnpm/action-setup@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.node-version }}

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT

- name: Cache pnpm store
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install workspace dependencies
if: inputs.install == 'true'
shell: bash
run: pnpm install --frozen-lockfile --ignore-scripts
36 changes: 36 additions & 0 deletions .github/actions/setup-rust/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Setup Rust
description: Install Rust stable toolchain with cargo cache

inputs:
targets:
description: Additional Rust targets to install (comma-separated)
required: false
default: ''
cache-key:
description: Extra cache key suffix for cargo
required: false
default: 'default'
cache-paths:
description: Additional paths to cache (newline-separated), appended to ~/.cargo/registry and ~/.cargo/git
required: false
default: 'target'

runs:
using: composite
steps:
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ inputs.targets }}

- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
${{ inputs.cache-paths }}
key: ${{ runner.os }}-cargo-${{ inputs.cache-key }}-${{ hashFiles('Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-${{ inputs.cache-key }}-
${{ runner.os }}-cargo-
54 changes: 54 additions & 0 deletions .github/actions/setup-tauri/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Setup Tauri Build
description: Common Tauri GUI build setup - cargo cache with deps-only hash, version sync, route generation

inputs:
rust-targets:
description: Rust targets to install (comma-separated)
required: false
default: ''
version:
description: Version string to sync into Cargo.toml and tauri.conf.json
required: true

runs:
using: composite
steps:
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ inputs.rust-targets }}

- name: Get Cargo deps hash (exclude root package version for stable cache key)
id: cargo-deps-hash
shell: bash
run: |
HASH=$(awk '/^name = "memory-sync-gui"$/{print; getline; sub(/version = ".*"/, "version = \"0.0.0\""); print; next} 1' gui/src-tauri/Cargo.lock | openssl dgst -sha256 2>&1 | awk '{print $NF}')
echo "hash=$HASH" >> $GITHUB_OUTPUT

- name: Cache cargo + tauri target
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
gui/src-tauri/target
key: ${{ runner.os }}-cargo-${{ steps.cargo-deps-hash.outputs.hash }}
restore-keys: |
${{ runner.os }}-cargo-

- name: Sync Tauri version from CLI
shell: bash
run: |
version="${{ inputs.version }}"
sed -i.bak "s/^version = \".*\"/version = \"${version}\"/" gui/src-tauri/Cargo.toml
rm -f gui/src-tauri/Cargo.toml.bak
jq --arg v "$version" '.version = $v' gui/src-tauri/tauri.conf.json > gui/src-tauri/tauri.conf.tmp && mv gui/src-tauri/tauri.conf.tmp gui/src-tauri/tauri.conf.json
echo "Synced version to ${version}"

- name: Generate route tree
shell: bash
run: pnpm -F @truenine/memory-sync-gui run generate:routes

- name: Clean old bundle artifacts
shell: bash
run: rm -rf gui/src-tauri/target/**/bundle
74 changes: 0 additions & 74 deletions .github/workflows/ci.yml

This file was deleted.

12 changes: 12 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Deploy Docs

# TODO: Vercel deployment for doc/ Next.js site

on:
workflow_dispatch:

jobs:
deploy:
runs-on: ubuntu-24.04
steps:
- run: echo "TODO"
51 changes: 51 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Pull Request

on:
pull_request:
branches:
- main
types: [opened, synchronize, reopened, closed]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true

jobs:
check:
runs-on: ubuntu-24.04
if: github.event.pull_request.merged == false
steps:
- uses: actions/checkout@v4

- name: Cache apt packages
uses: actions/cache@v4
with:
path: /var/cache/apt/archives
key: apt-gtk-${{ runner.os }}-${{ hashFiles('.github/workflows/pull-request.yml') }}
restore-keys: apt-gtk-${{ runner.os }}-

- name: Install GTK development dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libglib2.0-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf pkg-config

- uses: ./.github/actions/setup-node-pnpm

- name: Build
run: pnpm exec turbo run build

- uses: ./.github/actions/setup-rust
with:
cache-key: pr

- name: Generate Tauri icons
run: pnpm -F @truenine/memory-sync-gui run generate:icons

- name: Generate route tree
run: pnpm -F @truenine/memory-sync-gui run generate:routes

- name: Run tests
run: pnpm exec turbo run test

- name: Rust tests (excluding GUI)
run: cargo test --workspace --exclude memory-sync-gui --lib --bins --tests
Loading
Loading