-
-
Notifications
You must be signed in to change notification settings - Fork 48
86 lines (72 loc) · 3.23 KB
/
Copy pathci.yml
File metadata and controls
86 lines (72 loc) · 3.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: CI (Lint & Compile Check)
on:
push:
branches: [ master, dev ]
pull_request:
branches: [ master, dev ]
jobs:
validate:
name: Check on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, windows-latest, macos-latest]
steps:
- name: Checkout Code
uses: actions/checkout@v5
# 1. Setup Node.js with caching
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: lts/*
cache: 'npm'
# 2. Setup Rust stable
- name: Setup Rust Stable
uses: dtolnay/rust-toolchain@stable
# 3. Cache Rust compiler targets (per-OS)
- name: Rust Cache
uses: swatinem/rust-cache@v2
with:
workspaces: "./src-tauri -> target"
# 4. Install OS-specific system libraries (Linux only)
- name: Install Linux dependencies
if: matrix.os == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential curl wget file \
libgtk-3-dev libxdo-dev libssl-dev \
libappindicator3-dev librsvg2-dev patchelf xdg-utils
mkdir -p /tmp/ubuntu-packages
cd /tmp/ubuntu-packages
wget https://launchpadlibrarian.net/723972773/libwebkit2gtk-4.1-0_2.44.0-0ubuntu0.22.04.1_amd64.deb
wget https://launchpadlibrarian.net/723972761/libwebkit2gtk-4.1-dev_2.44.0-0ubuntu0.22.04.1_amd64.deb
wget https://launchpadlibrarian.net/723972770/libjavascriptcoregtk-4.1-0_2.44.0-0ubuntu0.22.04.1_amd64.deb
wget https://launchpadlibrarian.net/723972746/libjavascriptcoregtk-4.1-dev_2.44.0-0ubuntu0.22.04.1_amd64.deb
wget https://launchpadlibrarian.net/723972735/gir1.2-javascriptcoregtk-4.1_2.44.0-0ubuntu0.22.04.1_amd64.deb
wget https://launchpadlibrarian.net/723972739/gir1.2-webkit2-4.1_2.44.0-0ubuntu0.22.04.1_amd64.deb
wget https://launchpadlibrarian.net/606433947/libicu70_70.1-2ubuntu1_amd64.deb
wget https://launchpadlibrarian.net/606433941/libicu-dev_70.1-2ubuntu1_amd64.deb
wget https://launchpadlibrarian.net/606433945/icu-devtools_70.1-2ubuntu1_amd64.deb
wget https://launchpadlibrarian.net/595623693/libjpeg8_8c-2ubuntu10_amd64.deb
wget https://launchpadlibrarian.net/587202140/libjpeg-turbo8_2.1.2-0ubuntu1_amd64.deb
wget https://launchpadlibrarian.net/592959859/xdg-desktop-portal-gtk_1.14.0-1build1_amd64.deb
sudo apt-get install -y /tmp/ubuntu-packages/*.deb
# 5. Clean Install npm dependencies (uses cache)
- name: Install Node Dependencies
run: npm ci
# 6. Run frontend lints (Only on Linux to avoid duplicate work)
- name: Run Lints (Angular)
if: matrix.os == 'ubuntu-22.04'
run: |
npm run lint
npm run format:check
# 7. Check if Rust backend compiles (Checks ALL features & target-specific code per OS)
- name: Run Clippy (Rust)
run: cargo clippy --all-targets --all-features -- -D warnings
working-directory: src-tauri
# 8. Check Rust Formatting
- name: Check Formatting (Rust)
run: cargo fmt -- --check
working-directory: src-tauri