- Frontend: type-check + build (ubuntu-latest) - Rust: cargo check + clippy (ubuntu-latest) - Tauri build: Windows (MSVC) + Linux, on push to main - Upload build artifacts - rust-toolchain.toml for consistent Rust version
111 lines
3.0 KiB
YAML
111 lines
3.0 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths-ignore:
|
|
- '**.md'
|
|
- '.gitignore'
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
# ─── Frontend: lint + type-check + build ──────────────────────
|
|
frontend:
|
|
name: Frontend
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: pnpm/action-setup@v4
|
|
with:
|
|
version: 9
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
cache: pnpm
|
|
|
|
- run: pnpm install --frozen-lockfile
|
|
|
|
- name: Type check
|
|
run: npx vue-tsc --noEmit
|
|
|
|
- name: Build
|
|
run: pnpm build
|
|
|
|
# ─── Rust: check + clippy ─────────────────────────────────────
|
|
rust:
|
|
name: Rust
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
|
with:
|
|
target: x86_64-unknown-linux-gnu
|
|
|
|
- name: Install system deps
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev \
|
|
librsvg2-dev patchelf libgtk-3-dev libsoup-3.0-dev libjavascriptcoregtk-4.1-dev
|
|
|
|
- name: Check
|
|
run: cargo check --manifest-path src-tauri/Cargo.toml
|
|
|
|
- name: Clippy
|
|
run: cargo clippy --manifest-path src-tauri/Cargo.toml -- -D warnings
|
|
|
|
# ─── Tauri build (Windows) ────────────────────────────────────
|
|
tauri-build:
|
|
name: Tauri Build
|
|
needs: [frontend, rust]
|
|
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- os: windows-latest
|
|
target: x86_64-pc-windows-msvc
|
|
- os: ubuntu-latest
|
|
target: x86_64-unknown-linux-gnu
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: pnpm/action-setup@v4
|
|
with:
|
|
version: 9
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
cache: pnpm
|
|
|
|
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
|
with:
|
|
target: ${{ matrix.target }}
|
|
|
|
- name: Install Linux deps
|
|
if: matrix.os == 'ubuntu-latest'
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev \
|
|
librsvg2-dev patchelf libgtk-3-dev libsoup-3.0-dev libjavascriptcoregtk-4.1-dev
|
|
|
|
- run: pnpm install --frozen-lockfile
|
|
|
|
- name: Build Tauri app
|
|
run: pnpm tauri build --target ${{ matrix.target }}
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: mqttx-${{ runner.os }}
|
|
path: src-tauri/target/release/bundle/ |