Skip to content

chore: 发布 v2.10.0 #28

chore: 发布 v2.10.0

chore: 发布 v2.10.0 #28

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
# 同一分支上新的推送会取消仍在跑的旧任务,避免排队浪费
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_INCREMENTAL: 0
CARGO_TERM_COLOR: always
jobs:
frontend:
name: 前端检查 (tsc / eslint / prettier / build / 集成检查)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Setup pnpm
uses: pnpm/action-setup@v6
with:
version: 9
# check-justfloat.mts 直接 import .ts 源码,需要 Node 的原生类型擦除(22.6+)
- name: Setup Node.js
uses: actions/setup-node@v7
with:
node-version: '22'
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: TypeScript
run: pnpm exec tsc --noEmit
- name: ESLint
run: pnpm lint
- name: Prettier
run: pnpm format:check
- name: Production build
run: pnpm build
# 含 check-versions.mjs:顺带校验 AGENTS.md 要求的 5 处版本号一致
- name: 集成检查
run: pnpm test
backend:
# 必须双平台:udev.rs 是 #[cfg(target_os = "linux")] 门控的,Windows 上根本不编译;
# 反过来 Windows 专属分支在 Linux 上也看不见。只跑单平台会让另一边的 cfg 代码
# 一路裸奔到发版构建才暴露。
name: Rust 检查 (${{ matrix.os_name }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
os_name: linux
- os: windows-latest
os_name: windows
steps:
- uses: actions/checkout@v7
- name: Install Linux dependencies
if: matrix.os_name == 'linux'
run: |
sudo apt-get update
sudo apt-get install -y \
libgtk-3-dev \
libwebkit2gtk-4.1-dev \
libayatana-appindicator3-dev \
librsvg2-dev \
libudev-dev \
libusb-1.0-0-dev
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Setup Rust cache
uses: Swatinem/rust-cache@v2
with:
workspaces: './src-tauri -> target'
key: ${{ matrix.os_name }}
# tauri 读 tauri.conf.json 时要求 frontendDist 指向的目录存在
- name: Create placeholder frontend dist
shell: bash
run: mkdir -p dist && echo '<!doctype html><title>ci</title>' > dist/index.html
- name: Clippy
run: cargo clippy --manifest-path src-tauri/Cargo.toml --all-targets -- -D warnings
- name: Tests
run: cargo test --manifest-path src-tauri/Cargo.toml