CI/CD Pipeline

Skelenote uses GitHub Actions for continuous integration, cross-platform builds, and releases. This document explains how the CI/CD pipeline works, what gets tested, and how to work with it.

Overview

The CI/CD pipeline consists of three main workflows:

Workflow
Trigger
Purpose
Duration

Test

Push to main

Linting, frontend tests, Rust tests

~3-5 min

Build

Push to main

Cross-platform builds (macOS, Windows, Linux)

~15-25 min

Release

Version tags (v*)

Publish GitHub releases with binaries

~20-30 min

Local-First Development Philosophy

CI does NOT run on feature branches or pull requests. This is intentional:

  • Skelenote is a local-first app with extensive local testing capabilities

  • Running CI on every push wastes GitHub Actions minutes

  • Developers must validate locally before merging using /check

Workflow:

  1. Work on feature branch locally

  2. Run /check before committing (lint, types, tests)

  3. Push and create PR (no CI runs)

  4. Merge to main → CI validates and builds

  5. If CI fails after merge, fix immediately on main or revert

Workflow Details

Test Workflow (.github/workflows/test.yml)

Runs on: Ubuntu 22.04

Steps:

  1. Install system dependencies (WebKit2GTK, librsvg2, etc.)

  2. Setup pnpm, Node.js 22, and Rust toolchain

  3. Install project dependencies (pnpm install)

  4. Run ESLint (pnpm lint)

  5. Run frontend tests with Vitest (pnpm test:run)

  6. Run Rust tests (cargo test)

Purpose: Final validation after merge to main. Ensures code quality and correctness before builds run.

How to replicate locally:

Build Workflow (.github/workflows/build.yml)

Runs on: Matrix of platforms

Platform Matrix:

  • macOS (latest) - Builds both ARM64 and x86_64 (Intel) binaries

  • Windows (latest) - Builds x86_64 NSIS installer

  • Ubuntu 22.04 - Builds .deb, .rpm, and .AppImage

Steps (per platform):

  1. Install platform-specific system dependencies

  2. Setup pnpm, Node.js 22, and Rust

  3. Install Rust targets (macOS: aarch64-apple-darwin, x86_64-apple-darwin)

  4. Cache Rust build artifacts for faster subsequent builds

  5. Install project dependencies

  6. Build Tauri app with platform-specific arguments

  7. Upload artifacts to GitHub Actions

Artifacts produced:

  • macOS: .dmg and .app bundles for ARM64 and Intel

  • Windows: .exe NSIS installer

  • Linux: .deb (Debian/Ubuntu), .rpm (Fedora/RHEL), .AppImage (universal)

Build arguments:

How to build locally:

Output location:

Release Workflow (.github/workflows/release.yml)

Runs on: Git tags matching v* (e.g., vX.Y.Z)

Steps:

  1. Same build matrix as Build workflow (macOS, Windows, Linux)

  2. Uses tauri-apps/tauri-action@v0 to build and publish

  3. Creates a GitHub Release (draft mode)

  4. Uploads all platform binaries to the release

Release notes template:

How to trigger a release:

Release settings:

  • releaseDraft: true - Releases are created as drafts for manual review before publishing

Cross-Platform Support

Skelenote is fully tested and supported on the following platforms:

macOS

  • Architectures: ARM64 (Apple Silicon), x86_64 (Intel)

  • Minimum version: macOS 10.15 (Catalina)

  • Format: .dmg installer and .app bundle

  • Dependencies: Xcode Command Line Tools

Windows

  • Architecture: x86_64

  • Minimum version: Windows 10

  • Format: .exe NSIS installer

  • Dependencies: WebView2 (usually pre-installed on Windows 10/11)

Linux

  • Tested distributions: Ubuntu 22.04, Fedora (latest)

  • Formats:

    • .deb - Debian, Ubuntu, Linux Mint, Pop!_OS

    • .rpm - Fedora, RHEL, CentOS, openSUSE

    • .AppImage - Universal (works on any distro)

  • Dependencies: WebKit2GTK 4.1, AppIndicator3

  • Install commands:

Platform-Specific Build Dependencies

macOS

No additional dependencies needed beyond Xcode Command Line Tools:

Windows

Linux (Ubuntu/Debian)

Note: rpm package is needed for building .rpm files on Ubuntu.

Linux (Fedora/RHEL)

CI Optimization

Caching Strategy

The workflows use multiple caching layers for faster builds:

  1. pnpm cache - setup-node with cache: 'pnpm'

  2. Rust cache - swatinem/rust-cache@v2 with workspace targeting

Build Times

Typical build times (with warm cache):

  • Test workflow: 3-5 minutes

  • Build workflow (per platform): 5-10 minutes

  • Full matrix build: 15-25 minutes (parallel)

  • Release workflow: 20-30 minutes (includes uploads)

Parallelization

The Build and Release workflows use a strategy matrix with fail-fast: false, meaning:

  • All platforms build in parallel

  • One platform failing doesn't cancel the others

  • You get artifacts for all successful builds even if one fails

Troubleshooting CI Failures

Test Failures

Symptom: ESLint errors, TypeScript errors, or test failures

Solution:

Fix the errors and push again.

Build Failures

Symptom: Platform-specific build errors

Common causes:

  1. Missing system dependencies (check platform-specific deps above)

  2. Rust compilation errors (run cargo build locally)

  3. Tauri configuration issues (validate src-tauri/tauri.conf.json)

Debug steps:

  1. Check the GitHub Actions logs for the specific platform that failed

  2. Replicate locally on that platform (or use a VM/Docker)

  3. Run the exact build command CI uses:

Release Failures

Symptom: Tag push doesn't trigger release, or release is incomplete

Common causes:

  1. Tag doesn't match v* pattern (must start with v)

  2. Version mismatch between package.json and tauri.conf.json

  3. Missing GITHUB_TOKEN permissions

Verification:

Running Builds Locally

Development Builds

Fast iteration with hot reload:

Changes to React code hot-reload instantly. Changes to Rust require a restart.

Production Builds

Build optimized binaries:

Cross-Platform Builds

macOS only - Can cross-compile for both architectures:

Cross-compiling between platforms (e.g., Windows on macOS) is not supported by Tauri. Use GitHub Actions for multi-platform builds.

Viewing CI Artifacts

After a Build workflow completes successfully:

  1. Go to the GitHub Actions run

  2. Scroll to the bottom to see "Artifacts"

  3. Download artifacts for your platform:

    • skelenote-macOS-ARM

    • skelenote-macOS-Intel

    • skelenote-Windows

    • skelenote-Linux

Artifacts are kept for 90 days (GitHub default).

Future Improvements

Planned CI/CD enhancements:

  • Code signing for macOS and Windows (requires certificates)

  • Automated notarization for macOS

  • Automated testing on real devices (macOS, Windows, Linux VMs)

  • Performance benchmarking in CI

  • Bundle size tracking

  • Automatic changelog generation from commits

Last updated