-
-
Notifications
You must be signed in to change notification settings - Fork 47
108 lines (92 loc) · 4.37 KB
/
Copy pathci.yml
File metadata and controls
108 lines (92 loc) · 4.37 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
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]
env:
# Skip the rclone/Go build + link check in CI. The build.rs will emit
# cargo:warning=... instead of panicking when Go or the rclone source
# tree isn't available. Clippy still type-checks the FFI module — it
# just doesn't actually link librclone.a. Release builds (which DO
# need rclone) should run in a separate workflow with Go + rclone
# checked out, NOT set this env var.
LIBRCLONE_SKIP_LINK_CHECK: '1'
steps:
- name: Checkout Code
uses: actions/checkout@v7
# 1. Setup Node.js with caching (Only on Linux for Angular lints)
- name: Setup Node
if: matrix.os == 'ubuntu-22.04'
uses: actions/setup-node@v7
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 (Only on Linux for Angular lints)
- name: Install Node Dependencies
if: matrix.os == 'ubuntu-22.04'
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: |
npx eslint "**/*.{ts,html}"
npx prettier --check "**/*.{ts,html,scss,json}"
# 7. Check if Rust backend compiles (Desktop, Web Server, Mobile feature targets)
- name: Run Clippy (Desktop)
run: cargo clippy --features desktop --no-default-features -- -D warnings
working-directory: src-tauri
- name: Run Clippy (Web Server)
shell: bash
run: |
mkdir -p ../dist/rclone-manager/browser
TAURI_CONFIG=$(cat ./tauri.conf.headless.json) cargo clippy --features web-server --no-default-features -- -D warnings
working-directory: src-tauri
- name: Run Clippy (Mobile)
run: cargo clippy --features mobile --no-default-features -- -D warnings
working-directory: src-tauri
# 8. Check Rust Formatting (Only on Linux to avoid CRLF differences)
- name: Check Formatting (Rust)
if: matrix.os == 'ubuntu-22.04'
run: cargo fmt -- --check
working-directory: src-tauri